diff --git a/Cargo.lock b/Cargo.lock index 3dd2f3c8..09621daa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -834,7 +834,7 @@ dependencies = [ [[package]] name = "ssh-cipher" -version = "0.4.0-rc.0" +version = "0.4.0" dependencies = [ "aead", "aes", diff --git a/ssh-cipher/CHANGELOG.md b/ssh-cipher/CHANGELOG.md index c9d2e855..769f7a69 100644 --- a/ssh-cipher/CHANGELOG.md +++ b/ssh-cipher/CHANGELOG.md @@ -4,6 +4,34 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.4.0 (2026-12-04) +### Changed +- Raise the minimum supported Rust version from 1.85 to 1.87 ([#610]) +- Update the optional `encoding` feature to `ssh-encoding` v0.4. When decoding a + `Cipher`, pass a `&mut Decoder` to `Decode::decode` ([#618], [#668]) + +### Fixed +- Implement `BlockModeDecrypt::decrypt_with_backend` for `Decryptor`. Both CBC and CTR + now support decrypting from one buffer into another without panicking ([#640]) +- Check key and IV lengths against the selected cipher in `Encryptor::new` and + `Decryptor::new`. A mismatched key returns `Error::KeySize` and a mismatched IV + returns `Error::IvSize` ([#642]) +- Correct the key order in the `ChaCha20Poly1305` packet encryption documentation and + example. The first 32 bytes encrypt the body and derive the Poly1305 key. The last + 32 bytes encrypt the packet length ([#649]) + +### Security +- Require `ctutils` v0.4.8 for the `chacha20poly1305` feature, including upstream + constant-time fixes for mask generation and `u128` comparisons ([#610], [RUSTSEC-2026-0385]) + +[#610]: https://github.com/RustCrypto/SSH/pull/610 +[#618]: https://github.com/RustCrypto/SSH/pull/618 +[#640]: https://github.com/RustCrypto/SSH/pull/640 +[#642]: https://github.com/RustCrypto/SSH/pull/642 +[#649]: https://github.com/RustCrypto/SSH/pull/649 +[#668]: https://github.com/RustCrypto/SSH/pull/668 +[RUSTSEC-2026-0385]: https://rustsec.org/advisories/RUSTSEC-2026-0385.html + ## 0.3.0 (2026-06-28) ### Added - `Decryptor` and `Encryptor` ([#253], [#533], [#534]) diff --git a/ssh-cipher/Cargo.toml b/ssh-cipher/Cargo.toml index 4b2eb34d..3017dd85 100644 --- a/ssh-cipher/Cargo.toml +++ b/ssh-cipher/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ssh-cipher" -version = "0.4.0-rc.0" +version = "0.4.0" description = """ Pure Rust implementation of SSH symmetric encryption including support for the modern aes128-gcm@openssh.com/aes256-gcm@openssh.com and chacha20-poly1305@openssh.com algorithms as well diff --git a/ssh-key/Cargo.toml b/ssh-key/Cargo.toml index 17fc5d8e..87af53a1 100644 --- a/ssh-key/Cargo.toml +++ b/ssh-key/Cargo.toml @@ -23,7 +23,7 @@ version = "0.4" features = ["base64", "derive", "digest", "pem", "ctutils", "zeroize"] [dependencies] -cipher = { package = "ssh-cipher", version = "0.4.0-rc.0", features = ["encoding", "zeroize"] } +cipher = { package = "ssh-cipher", version = "0.4", features = ["encoding", "zeroize"] } ctutils = { version = "0.4.8", default-features = false } signature = { version = "3", default-features = false } zeroize = { version = "1.9", default-features = false } diff --git a/ssh-protocol/Cargo.toml b/ssh-protocol/Cargo.toml index 9216e989..830fa221 100644 --- a/ssh-protocol/Cargo.toml +++ b/ssh-protocol/Cargo.toml @@ -16,7 +16,7 @@ edition = "2024" rust-version = "1.87" [dependencies] -cipher = { package = "ssh-cipher", version = "0.4.0-rc.0", default-features = false } +cipher = { package = "ssh-cipher", version = "0.4", default-features = false } encoding = { package = "ssh-encoding", version = "0.4", default-features = false } key = { package = "ssh-key", version = "0.7.0-rc.13", default-features = false }