Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cfb-mode: generic mode block size #32

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

cfb-mode: generic mode block size #32

wants to merge 4 commits into from

Conversation

newpavlov
Copy link
Member

It makes the cfb8 crate redundant and enables support of other CFB variants.

Unfortunately, it's currently impossible to preserve parallel decryption since ParBlocksSize gets tied to block size, which could be different for an underlying cipher and used mode, i.e. AES-CFB8 has cipher and mode block sizes equal to 16 and 1 respectively. In other words, with the current trait design we can not write type ParBlocksSize = C::ParBlocksSize, because ParBlocksSize is bounded by ArrayLength<Block<Self>>.

TODO:

  • Make BufEncryptor and BufDecryptor generic over method block size
  • Enforce that mode block size must be smaller or equal to cipher block size

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.

None yet

1 participant