Bump aes-gcm from 0.10.3 to 0.11.0 - #186
Conversation
Bumps [aes-gcm](https://github.com/RustCrypto/AEADs) from 0.10.3 to 0.11.0. - [Commits](RustCrypto/AEADs@aes-gcm-v0.10.3...aes-gcm-v0.11.0) --- updated-dependencies: - dependency-name: aes-gcm dependency-version: 0.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
aes-gcm 0.11 moved to the cipher 0.5 / aes 0.9 generation of the RustCrypto stack. The custom `AesGcm<Aes192, U12>` alias uses `aes::Aes192`, so the top-level `aes` dependency must move to 0.9 to satisfy the new KeyInit/cipher 0.5 trait bounds. aes-gcm 0.11's default features enable `getrandom`, which now pulls in getrandom 0.4 (via crypto-common 0.2). That breaks the wasm32 build because the existing wasm getrandom override only covers getrandom 0.2. This crate never uses aes-gcm's RNG helpers (nonces come from the caller-provided iv), so disable the unused feature by using default-features = false with only the `aes` and `alloc` features that the code actually relies on.
There was a problem hiding this comment.
Dependabot review: aes-gcm 0.10.3 -> 0.11.0
This bump does not compile as submitted, so I pushed a follow-up commit to this branch to make it build. Summary below.
Usage in the repo
aes-gcm is only used in attestation-doc-validation/src/nsm/crypto.rs, where CryptoClient implements the cose Encryption/Decryption/Hash traits. Note that the attestation-validation path only exercises the Hash + signature-verification code (get_payload::<CryptoClient>(None) / validate_cose_signature); the AES-GCM encrypt/decrypt functions exist only to satisfy the cose trait bounds and are not exercised by the library or its tests. Runtime risk from the bump is therefore low — the requirement is just that it keeps compiling.
Why it broke
- Native build. aes-gcm 0.11 moves to the
cipher0.5 /aes0.9 generation of the RustCrypto stack (aead 0.5->0.6, cipher 0.4->0.5, ghash 0.5->0.6, ctr 0.9->0.10). The custom aliastype Aes192Gcm = AesGcm<Aes192, U12>usesaes::Aes192from the top-levelaescrate, which was still pinned to^0.8(cipher 0.4 traits), soKeyInit/new_from_sliceno longer satisfied the trait bounds.Aes128Gcm/Aes256Gcmcome from aes-gcm itself and were unaffected. - wasm build. aes-gcm 0.11's
defaultfeatures enablegetrandom, which now pulls ingetrandom 0.4(viacrypto-common 0.2). The crate'swasm32override only pinsgetrandom 0.2(jsfeature), so the wasm build failed with the getrandom 0.4 "wasm_js backend not enabled" error. (aes-gcm 0.10.3's default also enabledgetrandom, but back then it resolved to getrandom 0.2, which is why wasm built fine onmain.)
Fix pushed
aes = "^0.9"
aes-gcm = { version = "^0.11", default-features = false, features = ["aes", "alloc"] }- Bumping
aesto^0.9makesAes192implement the cipher 0.5 traits aes-gcm 0.11 needs (aes 0.9.2 was already in the lockfile via aes-gcm, so no new crates are added on that account). - Disabling default features and enabling only
aes+allocdrops the unusedgetrandomfeature, removing getrandom 0.4 (+ r-efi, rand_core 0.10) from the resolved graph and restoring the wasm build. This preserves every aes-gcm API the code actually uses.
Verification
cargo fmt --check,cargo clippy -- -W clippy::pedantic,cargo check/build(debug + release) for the main crate.cargo testplus bothtime_sensitive_betaandtime_sensitive_gasuites — all pass.cargo checkandcargo build --releaseforwasm-attestation-bindingsonwasm32-unknown-unknown— pass.--lockedbuilds succeed, so the lockfile is consistent.- The changelog shows no algorithmic/behavioral change to AES-GCM itself and no security-relevant regressions; the only fixed constants (P_MAX/A_MAX) are unrelated to this usage.
Conclusion: safe to merge with the pushed fix. (The pre-existing kotlin-attestation-bindings uniffi_bindgen_main build failure also occurs on main and is unrelated to this PR / not part of CI.)
Bumps aes-gcm from 0.10.3 to 0.11.0.
Commits
a10b56faes-gcm v0.11.0 (#852)f042e9caead-stream v0.6.0 (#851)b29735aAdopt Trusted Publishing (#854)a1fe43fxaes-256-gcm: enable and fix workspace level lints (#850)8cf876feax: remove toplevel lint attributes (#849)4661ddfocb3: enable and fix workspace-level lints (#848)c821431eax: enable and fix workspace-level lints (#847)d3684bbdeoxys: enable and fix workspace-level lints (#846)5e016e2chacha20poly1305: enable and fix workspace-level lints (#845)b3524d3ccm: enable and fix workspace-level lints (#844)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)