RustCrypto / traits

Collection of cryptography-related traits
581 stars 190 forks source link

CFB8 BufEncryptor/Decryptor? #1270

Closed valaphee closed 1 year ago

valaphee commented 1 year ago

While trying to work with cfb8 in tokio codecs, I have the issue that I can't use the Decryptor/Encryptor decrypt, encrypt methods, as they require ownership, which after knowing that for generalization there are also BufEncryptor/Decryptor, for example like in cfb-mode is understandable.

But there seems to be no BufEncryptor/Decryptor for cfb8. Which theoretically would also work with modifying the AsyncStreamCipher, and use mut borrowing (which I had done here https://github.com/RustCrypto/traits/pull/1261)

The correct solution would be to implement BufEncryptor/Decryptor for the CFB8?

And the cfb8-mode crate doesn't belong to RustCrypto? (is version 0.0.0)

newpavlov commented 1 year ago

See https://github.com/RustCrypto/block-modes/issues/31