Move to rand 0.10 and aes 0.9

Both are API renames rather than behaviour changes, but this is the AACS
and CSS crypto path, so it is verified by output rather than by the fact
that it compiles.

rand: `RngCore` no longer sits at the crate root -- `fill_bytes` moved to
the re-exported `Rng` trait -- and `thread_rng()` is now `rng()`.

aes: the cipher traits gained their `BlockCipher` prefix and
`generic_array::GenericArray` became `Array`. The obvious translation
uses `Array::from_slice`, which is deprecated in the new version and
would fail clippy's `-D warnings`; these use the `From<[T; N]>`
conversion the crate points at instead.

The proof this is byte-exact is `test_aes_cmac_nist_kat_full_block`,
which checks the exact MAC from NIST SP 800-38B Appendix D.1 -- a wrong
byte order or a mis-sized array cannot produce that value. All 95 tests
pass in both debug and release.
This commit is contained in:
Matthew Jackson
2026-08-09 17:50:01 -07:00
parent 5fd090fc8e
commit f0d936f4b6
4 changed files with 28 additions and 28 deletions
+2 -2
View File
@@ -24,5 +24,5 @@ num-bigint = "0.5"
num-traits = "0.2"
sha1 = "0.10"
sha2 = "0.11"
aes = "0.8"
rand = "0.8"
aes = "0.9"
rand = "0.10"