Skip to content

[WIP] exploring a BlockCipher marker trait (not for merge)#353

Closed
tarcieri wants to merge 2 commits intomasterfrom
cipher/block-cipher-marker-trait
Closed

[WIP] exploring a BlockCipher marker trait (not for merge)#353
tarcieri wants to merge 2 commits intomasterfrom
cipher/block-cipher-marker-trait

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Nov 1, 2020

Attempt at refactoring BlockCipher into a trait which marks a type as being capable of both Encrypt and Decrypt.

As far as I can tell this requires the unfortunate change of making the block size and parallel block parameters generic.

Closes #349

Adds `Encrypt` and `Decrypt` traits which can be used in cases where
e.g. only the encryption portion of a block cipher is used, as in
CTR mode.

This PR does not otherwise attempt to add things like a blanket impl.
Attempt at refactoring `BlockCipher` into a trait which marks a type as
being capable of both `Encrypt` and `Decrypt`.

As far as I can tell this requires the unfortunate change of making the
block size and parallel block parameters generic.
@tarcieri tarcieri requested a review from newpavlov November 1, 2020 16:57
@tarcieri tarcieri marked this pull request as draft November 1, 2020 16:58
@tarcieri
Copy link
Member Author

tarcieri commented Nov 1, 2020

Closing this in favor of @newpavlov's suggestion from #352.

@tarcieri tarcieri closed this Nov 1, 2020
@tarcieri tarcieri deleted the cipher/block-cipher-marker-trait branch November 24, 2020 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant