Remove aes_armv8 flag - #1249
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the removal of the Code Review Details
|
| [target.wasm32-unknown-unknown] | ||
| rustflags = ['--cfg', 'getrandom_backend="wasm_js"'] | ||
| runner = 'cargo run -p wasm-bindgen-cli-runner --bin wasm-bindgen-test-runner' |
There was a problem hiding this comment.
❓ QUESTION: The tree still resolves aes 0.8.4 alongside aes 0.9.1 — was the loss of ARMv8 acceleration for the 0.8.x path intended?
Details
The default-on ARMv8 backend applies to aes 0.9, which bitwarden-crypto uses (aes 0.9.1), so removing the flag there is a no-op — good.
However, Cargo.lock also pins aes 0.8.4, pulled in transitively via snow → aes-gcm 0.10.3. In aes 0.8.x the ARMv8 hardware backend is still gated behind the aes_armv8 cfg (that gating is exactly what the 0.9 changelog removed). The AESGCM Noise cipher suite is negotiable in the IPC handshake (crates/bitwarden-ipc/src/crypto_provider/noise/handshake.rs:39-40), so on native aarch64 builds (Android arm64-v8a, iOS) that path now falls back to the software AES backend.
This is a performance regression only — the RustCrypto software AES implementation is constant-time, so there's no timing side-channel — and IPC transport is not a hot path relative to vault crypto. Just confirming this tradeoff was intentional rather than an unnoticed side effect of the second aes version. If undesired, either keep the flag or nudge snow/aes-gcm to a version on aes 0.9.
There was a problem hiding this comment.
Android and ios do not use IPC. This can be ignored.
🔍 SDK Breaking Change DetectionSDK Version:
Breaking change detection uses the build of the SDK from this branch, including any incompatibities pre-existing on or merged into this branch. Check the workflow logs to confirm. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1249 +/- ##
=======================================
Coverage 85.09% 85.09%
=======================================
Files 477 477
Lines 65934 65934
=======================================
Hits 56109 56109
Misses 9825 9825 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
📔 Objective
This has been enabled by default in
aes 0.9already: https://github.com/RustCrypto/block-ciphers/blob/master/aes/CHANGELOG.md#changed🚨 Breaking Changes