refactor(crypto): implement AES256-CBC, AES256-CBC-HMAC256 hazmat primitives - #1263
Conversation
ee8473c to
4c7be80
Compare
🔍 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❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1263 +/- ##
========================================
Coverage 85.79% 85.80%
========================================
Files 487 490 +3
Lines 69999 70140 +141
========================================
+ Hits 60059 60182 +123
- Misses 9940 9958 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| impl From<SymmetricEncryptionError> for CryptoError { | ||
| fn from(_: SymmetricEncryptionError) -> Self { | ||
| CryptoError::KeyDecrypt |
There was a problem hiding this comment.
Will update in the future. Please note, mac should ALWAYS be checked before the padding, otherwise we may allow a padding oracle.
|
Despite the AEAD bits living on this stack, do not feel the need to wait for it. The refactor can merge even without the aead stuff. |
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the new Code Review DetailsNo blocking findings. Notes considered and cleared during review:
This PR carries the |
… implement AES256-CBC, AES256-CBC-HMAC256 hazmat primitives (bitwarden/sdk-internal#1263)
Implements aes256-cbc (as legacy compat for old user-keys), and AES256-CBC-HMAC-SHA256 in the hazmat module. This will replace the
aes.rsfile at the crate root. These implementations are close to being zero-copy. Only the plaintext buffer that is passed out is allocated.https://bitwarden.atlassian.net/browse/PM-40756