[PM-35105] Add SecretProtectedKeyEnvelope to bitwarden-crypto#1204
[PM-35105] Add SecretProtectedKeyEnvelope to bitwarden-crypto#1204quexten wants to merge 5 commits into
Conversation
Seals a symmetric key with a high-entropy secret of arbitrary length using a cheap KDF (HKDF-SHA256) and AES-256-GCM, via the standardized COSE 'Direct Key with KDF' construction. Unlike the password-protected envelope, it assumes the secret is not brute-forceable, so no memory-hard KDF is needed. Adds the envelope type, the COSE SecretProtectedKeyEnvelope namespace, the extract_single_recipient helper, the UniFFI binding, a usage example, and safe module README docs.
🔍 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 @@
## km/safe-shared-helpers #1204 +/- ##
==========================================================
- Coverage 85.16% 85.11% -0.06%
==========================================================
Files 468 469 +1
Lines 64295 64787 +492
==========================================================
+ Hits 54759 55142 +383
- Misses 9536 9645 +109 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the new No findings at or above the confidence threshold for posting. Code Review DetailsNo blocking issues identified. Notes considered and dismissed during review:
|
|



🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-35105
📔 Objective
Stacked PR 4/4 (on top of #1203).
Adds
SecretProtectedKeyEnvelope: seals a symmetric key with a high-entropy secret of arbitrary length using a cheap KDF (HKDF-SHA256) and AES-256-GCM, via the standardized COSE 'Direct Key with KDF' construction. Unlike the password-protected envelope, it assumes the secret is not brute-forceable, so no memory-hard KDF is needed.Adds the envelope type, the COSE
SecretProtectedKeyEnvelopenamespace, theextract_single_recipienthelper, the UniFFI binding, a usage example, andsafemodule README docs.Base:
km/safe-shared-helpers(#1203).