RustCrypto / block-modes

Collection of generic block mode algorithms written in pure Rust
64 stars 12 forks source link

cfb8 Buf Encryptor and Decryptor #31

Open wyatt-herkamp opened 1 year ago

wyatt-herkamp commented 1 year ago

@tarcieri mentioned in the zulip chat that CFB8 needs something similar to #17 

Currently the Encryptor and Decrytor methods are one shot and that would result in a lot of cloning 

https://rustcrypto.zulipchat.com/#narrow/stream/260036-general/topic/.28no.20topic.29/near/319304450

newpavlov commented 1 year ago

As a temporary workaround you could cast &mut [u8] to &mut [GenericArray<u8, U1>] and use the encrypt_blocks_mut method. But I agree that inherent "buffering" methods would be a good addition (note that no buffering is needed in practice, since the mode already operates on byte granularity).

xTachyon commented 9 months ago

I am also interested in this. Currently I'm using 0.7.1 which seems to be the last version in which you could do this, but it's not ideal at all.

tarcieri commented 9 months ago

@xTachyon it needs a PR with functionality similar to #17 (or perhaps we could upstream the core of that somewhere so it can be reused)