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
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 writetype ParBlocksSize = C::ParBlocksSize
, becauseParBlocksSize
is bounded byArrayLength<Block<Self>>
.TODO:
BufEncryptor
andBufDecryptor
generic over method block size