* The keystream function is creating two state block on every call, but just to handle a corner case. Break up the function into separate methods so that the corner case is handled by itself, avoiding unnecessary work most of the time. * Handle offset state internally. While not strictly necessary due to the cipher's use in BIP324, it makes the library much easier to work with (the bug above would probably have been avoided) if the cipher handles the offset state. |
||
---|---|---|
.. | ||
contrib | ||
src | ||
CHANGELOG.md | ||
Cargo.toml | ||
README.md |
README.md
ChaCha20-Poly1305
An authenticated encryption with associated data (AEAD) algorithm implemented with the ChaCha20 stream cipher and the Poly1305 message authentication code (MAC).
This implementation is maintained by the rust-bitcoin community and has a focus on a bare-bones API suitable for the bitcoin ecosystem.
Minimum Supported Rust Version (MSRV)
This library should always compile with any combination of features on Rust 1.63.0.