block-modes
block-modes copied to clipboard
cfb-mode: generic mode block size
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
BufEncryptorandBufDecryptorgeneric over method block size - [ ] Enforce that mode block size must be smaller or equal to cipher block size