diff --git a/.github/workflows/chacha20.yml b/.github/workflows/chacha20.yml index 20c4d2de..27e8051f 100644 --- a/.github/workflows/chacha20.yml +++ b/.github/workflows/chacha20.yml @@ -79,6 +79,9 @@ jobs: # Tests for the AVX-512 backend avx512: + # It looks like Intel blocks `curl` downloads, so the job is disabled + # until a fix is found + if: false runs-on: ubuntu-latest strategy: matrix: diff --git a/chacha20/CHANGELOG.md b/chacha20/CHANGELOG.md index 32c5df8a..66ce3da3 100644 --- a/chacha20/CHANGELOG.md +++ b/chacha20/CHANGELOG.md @@ -5,6 +5,12 @@ 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.10.1 (UNRELEASED) +### Added +- `ChaCha20LegacyCore` type and `Nonce` type alias ([#570]) + +[#570]: https://github.com/RustCrypto/stream-ciphers/pull/570 + ## 0.10.0 (2026-02-07) ### Added - `rand_core` v0.10 support ([#333], [#513]) diff --git a/chacha20/Cargo.toml b/chacha20/Cargo.toml index 76a0a7a7..2d9d6f55 100644 --- a/chacha20/Cargo.toml +++ b/chacha20/Cargo.toml @@ -45,6 +45,7 @@ missing_debug_implementations = "warn" missing_docs = "warn" trivial_casts = "warn" trivial_numeric_casts = "warn" +unreachable_pub = "warn" unused_lifetimes = "warn" unused_qualifications = "warn" diff --git a/chacha20/src/chacha.rs b/chacha20/src/chacha.rs index 1105f1a7..b9b9eaff 100644 --- a/chacha20/src/chacha.rs +++ b/chacha20/src/chacha.rs @@ -1,4 +1,4 @@ -pub use cipher::{ +use cipher::{ IvSizeUser, KeyIvInit, KeySizeUser, StreamCipherCoreWrapper, array::Array, consts::{U12, U32, U64}, diff --git a/chacha20/src/legacy.rs b/chacha20/src/legacy.rs index 9ec0d94a..3f6de311 100644 --- a/chacha20/src/legacy.rs +++ b/chacha20/src/legacy.rs @@ -1,7 +1,6 @@ //! Legacy version of ChaCha20 with a 64-bit nonce -use crate::chacha::Key; -use crate::{ChaChaCore, R20}; +use crate::{ChaChaCore, Key, R20, variants::Legacy}; use cipher::{ IvSizeUser, KeyIvInit, KeySizeUser, StreamCipherCoreWrapper, array::Array, @@ -10,7 +9,6 @@ use cipher::{ /// Nonce type used by [`ChaCha20Legacy`]. pub type LegacyNonce = Array; -use crate::variants::Legacy; /// The ChaCha20 stream cipher (legacy "djb" construction with 64-bit nonce). pub type ChaCha20Legacy = StreamCipherCoreWrapper; diff --git a/chacha20/src/lib.rs b/chacha20/src/lib.rs index bb867e5f..dbf726cb 100644 --- a/chacha20/src/lib.rs +++ b/chacha20/src/lib.rs @@ -19,11 +19,13 @@ mod rng; mod xchacha; #[cfg(feature = "cipher")] -pub use chacha::{ChaCha8, ChaCha12, ChaCha20, Key, KeyIvInit}; +pub use chacha::{ChaCha8, ChaCha12, ChaCha20, Key, Nonce}; #[cfg(feature = "cipher")] pub use cipher; +#[cfg(feature = "cipher")] +pub use cipher::KeyIvInit; #[cfg(feature = "legacy")] -pub use legacy::{ChaCha20Legacy, LegacyNonce}; +pub use legacy::{ChaCha20Legacy, ChaCha20LegacyCore, LegacyNonce}; #[cfg(feature = "rng")] pub use rand_core; #[cfg(feature = "rng")] diff --git a/chacha20/src/xchacha.rs b/chacha20/src/xchacha.rs index 66e236bf..6f8b05d1 100644 --- a/chacha20/src/xchacha.rs +++ b/chacha20/src/xchacha.rs @@ -1,7 +1,7 @@ //! XChaCha is an extended nonce variant of ChaCha use crate::{ - CONSTANTS, ChaChaCore, R8, R12, R20, Rounds, STATE_WORDS, quarter_round, variants::Ietf, + CONSTANTS, ChaChaCore, Key, R8, R12, R20, Rounds, STATE_WORDS, quarter_round, variants::Ietf, }; use cipher::{ BlockSizeUser, IvSizeUser, KeyIvInit, KeySizeUser, StreamCipherClosure, StreamCipherCore, @@ -13,9 +13,6 @@ use cipher::{ #[cfg(feature = "zeroize")] use zeroize::ZeroizeOnDrop; -/// Key type used by all ChaCha variants. -pub type Key = Array; - /// Nonce type used by XChaCha variants. pub type XNonce = Array;