cipher: fix seeking implementation in the stream cipher wrapper#2052
cipher: fix seeking implementation in the stream cipher wrapper#2052
Conversation
|
Is this really a fix for #1808? I would think a real fix would make the last keystream block usable |
|
See my comment in the issue. I spent a significant time trying to implement the last byte approach, but I couldn't get a satisfying solution. |
|
Another alternative could be to add a special "exhausted" state to the wrapper (either as a separate field, or as part of Considering that users arguably should not rely on the last keystream block in practice, I am not sure it's worth the trouble. |
|
@tarcieri |
### Added - Traits for tweakable block ciphers (#1721) - Methods for writing keystream (#1907) ### Changed - Replaced `generic-array` with `hybrid-array` (#1358) - Rename `BlockCipher*`/`BlockMode*` (#1482) - `BlockEncrypt` => `BlockCipherEncrypt` - `BlockDecrypt` => `BlockCipherDecrypt` - `BlockEncryptMut` => `BlockModeEncrypt` - `BlockDecryptMut` => `BlockModeDecrypt` - Split `BlockBackend` traits into 4 specific traits: (#1636) - `BlockCipherEncBackend` - `BlockCipherDecBackend` - `BlockModeEncBackend` - `BlockModeDecBackend` - Edition changed to 2024 and MSRV bumped to 1.85 (#1759) - Use `block_buffer::ReadBuffer` in `StreamCipherCoreWrapper` (#1959) - Re-export of `crypto-common` moved to `cipher::common` (#2237, #2260) - `crypto-common` dependency bumped to v0.2 (#2276) - `blobby` requirement bumped to v0.4 (#2147) - `inout` dependency bumped to v0.2.2 (#2149) ### Fixed - Bugs in `StreamCipherCoreWrapper` trait implementations (#1421) - Seeking implementation in the stream cipher wrapper (#2052) ### Removed - `std` feature (#1691) - `BlockCipherEncrypt::encrypt_padded*` and `BlockCipherDecrypt::decrypt_padded*` methods. Users of the ECB mode should use the `ecb-mode` crate instead. (#2245) - `AsyncStreamCipher` trait (#2280)
The change forbids seeking to the last keystream block and its application. Additionally, unchecked methods added as an escape hatch.
Closes #1808