Repository navigation
Done
Labels
Description
Summary
cas-lib currently runs two RustCrypto generations side by side: digest 0.10 (sha2 0.10, sha3 0.10, blake2 0.10, hmac 0.12, pbkdf2 0.12) and digest 0.11 (pulled in by hkdf 0.13, rsa 0.10, hpke 0.15, x25519-dalek 3). That's why Cargo.toml has the sha2-hkdf = { package = "sha2", version = "0.11" } alias. This issue moves the hash, HMAC and PBKDF2 crates to digest 0.11.
| Crate | Current | Target |
|---|---|---|
| sha2 | 0.10.9 (+ 0.11.1 via sha2-hkdf alias) |
0.11.2 |
| sha3 | 0.10.8 | 0.12.0 |
| blake2 | 0.10.6 | 0.11.0 |
| hmac | 0.12.1 (0.13.0 already in the tree via hkdf) | 0.13.0 |
| pbkdf2 | 0.12.2 | 0.13.0 |
pbkdf2 has to move with sha3, because password_hashers/pbkdf2.rs calls pbkdf2_hmac_array::<Sha3_256, _>, and pbkdf2 0.12 only accepts digest 0.10 hashes.
Work
- Bump the five crates in
Cargo.toml, remove thesha2-hkdfalias and its comment, and switchsha2_hkdf::imports back tosha2::. - Files:
src/hashers/sha2.rs,src/hashers/sha.rs,src/hashers/blake2.rs,src/message/hmac.rs,src/kdf/hkdf.rs,src/key_exchange/x25519.rs,src/pqc/ml_kem.rs,src/password_hashers/pbkdf2.rs. - Hash, HMAC, HKDF and PBKDF2 outputs must be byte-identical before and after. The existing KATs cover this, and they must not be edited to make them pass.
- While here, refresh the semver-compatible lockfile entries (
cargo update -p hpke -p uuid -p zeroize -p sha2@0.11.1 …): hpke 0.15.1→0.15.2, uuid 1.21→1.29.3, zeroize 1.8.2→1.9.2. Dependabot may already cover these.
Notes
cargo audit --deny unsound --deny yankedis clean today, so this is maintenance, not a security fix.- digest 0.10 won't leave the tree completely until slh-dsa moves to 0.2 (tracked separately), and scrypt 0.11 / ed25519-dalek 2 still pull in sha2 0.10.
- Pinned toolchain 1.100.0 meets every target crate's MSRV (highest: sha2 0.11.2 at 1.88).
Acceptance criteria
cargo build --release --lockedandcargo test --release --lockedpass on Linux, Windows and macOS.- NIST/FIPS KATs in
tests/data/and the Wycheproof tests still pass. docs/EXAMPLES.mdupdated if any public signature changes.- PR title follows Conventional Commits (
chore(deps): …, orfeat!:/fix!:if the public API breaks). Don't bump the crate version or editCHANGELOG.mdby hand.
Activity