-
Notifications
You must be signed in to change notification settings - Fork 67
Closed
Description
All three of these crates use highly similar (copypasta) buffering logic:
Original ctr code:
Derived chacha20 and salsa20 code:
- https://github.com/RustCrypto/stream-ciphers/blob/master/chacha20/src/cipher.rs
- https://github.com/RustCrypto/stream-ciphers/blob/master/salsa20/src/cipher.rs
The main problem is the ctr is presently specialized to Ctr128 and intended to operate in conjunction with a block cipher, whereas it'd be nice if ChaCha20 and Salsa20 took an integer (32-bit and 64-bit respectively) used to compute the block, but reused the same buffering logic as Ctr128.
ChaCha20 could also benefit from parallel block computation via its AVX2 backend.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels