Skip to content

deps: migrate AEAD stack to the RustCrypto 0.11 generation - #23

Merged
nadimkobeissi merged 2 commits into
symbolicsoft:mainfrom
10d9e:deps/aead-011-migration
Jul 28, 2026
Merged

deps: migrate AEAD stack to the RustCrypto 0.11 generation#23
nadimkobeissi merged 2 commits into
symbolicsoft:mainfrom
10d9e:deps/aead-011-migration

Conversation

@10d9e

@10d9e 10d9e commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Migrates the AEAD dependencies from the RustCrypto 0.10 generation to 0.11:

Crate From To
aes-gcm 0.10 0.11
chacha20poly1305 0.10 0.11
aead 0.5 0.6
aes 0.8 0.9
ghash 0.5 0.6
polyval 0.6 0.7

This puts the entire production dependency tree on a single RustCrypto generation; cargo tree -e normal --duplicates is now empty.

Code changes:

  • The std feature now forwards only to subtle/std — the 0.11 AEAD crates dropped their std features.
  • seal/open use Nonce::try_from instead of the deprecated, panicking Nonce::from_slice, with failures mapped to SealError/OpenError.
  • The zeroize features remain enabled on all six crates.

Tested on the pinned 1.96.0 toolchain: full test matrix (KAT + differential), clippy -D warnings, no-std check on thumbv7em-none-eabihf, cargo audit.

🤖 Generated with Claude Code

Move aes-gcm and chacha20poly1305 from 0.10 to 0.11, with the matching
aead 0.6, aes 0.9, ghash 0.6, and polyval 0.7. The rest of the crate
already sits on the digest-0.11 / crypto-common-0.2 generation (sha2
0.11, hkdf 0.13, elliptic-curve 0.14, rand_core 0.10); the 0.10-line
AEADs were the last holdout, and the sole reason production builds
compiled two copies of crypto-common, cipher, cpufeatures, aead, and
friends. After this change the normal-dependency tree carries a single
generation of every RustCrypto core crate.

Migration notes:
- aes-gcm/chacha20poly1305 0.11 dropped their std features (error types
  implement core::error::Error unconditionally), so the crate's std
  feature now only forwards to subtle/std.
- The zeroize pass-through features survive: ghash 0.6 and
  chacha20poly1305 0.11 expose explicit zeroize features; aes 0.9,
  polyval 0.7, and aes-gcm 0.11 expose it as an implicit optional-dep
  feature.
- Nonce::from_slice (panicking) is deprecated in hybrid-array; the
  seal/open paths now use the fallible TryFrom conversion mapped to
  SealError/OpenError, consistent with the crate's no-unreachable-panic
  posture.

Verified on the pinned 1.96.0 toolchain: full test matrix including
RFC 9180 KATs and the hpke-rs differential suite, clippy -D warnings,
no-std check on thumbv7em-none-eabihf, and a clean cargo audit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@10d9e
10d9e marked this pull request as draft July 28, 2026 14:09
@10d9e
10d9e marked this pull request as ready for review July 28, 2026 14:15
…D implementations

This commit cleans up the ChaCha20Poly1305 and AES GCM implementations by removing outdated comments regarding nonce-length invariants and the use of `from_slice`. The changes enhance code clarity and maintain consistency with the recent migration to the RustCrypto 0.11 generation.
@nadimkobeissi

Copy link
Copy Markdown
Member

Nice, thanks.

@nadimkobeissi
nadimkobeissi merged commit 57f2307 into symbolicsoft:main Jul 28, 2026
14 checks passed
nadimkobeissi added a commit that referenced this pull request Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants