Skip to content

feat(sdk-api): hkdf caching encryption for multi call operations#8508

Draft
pranavjain97 wants to merge 1 commit intoWCN-30-v2-encrypt-decryptfrom
pranavjain/wcn-31-phase-1-hkdf-caching-layer-for-multi-call-operations
Draft

feat(sdk-api): hkdf caching encryption for multi call operations#8508
pranavjain97 wants to merge 1 commit intoWCN-30-v2-encrypt-decryptfrom
pranavjain/wcn-31-phase-1-hkdf-caching-layer-for-multi-call-operations

Conversation

@pranavjain97
Copy link
Copy Markdown
Contributor

No description provided.

@linear
Copy link
Copy Markdown

linear bot commented Apr 14, 2026

@pranavjain97 pranavjain97 force-pushed the pranavjain/wcn-31-phase-1-hkdf-caching-layer-for-multi-call-operations branch from 7794281 to fe17e9c Compare April 14, 2026 19:41
@pranavjain97 pranavjain97 force-pushed the WCN-30-v2-encrypt-decrypt branch 2 times, most recently from b816e65 to a9be0b8 Compare April 15, 2026 19:18
@pranavjain97 pranavjain97 force-pushed the pranavjain/wcn-31-phase-1-hkdf-caching-layer-for-multi-call-operations branch 3 times, most recently from cd7d17d to 80f7404 Compare April 15, 2026 19:39
Introduces createEncryptionSession() that runs Argon2id once and derives
per-call AES-256-GCM keys via HKDF (<1ms each), eliminating repeated
expensive KDF calls in multi-encrypt/decrypt flows.

- createEncryptionSession() in encrypt.ts: Argon2id -> HKDF CryptoKey
- EncryptionSession interface: encrypt(), decrypt(), destroy()
- V2Envelope extended with optional hkdfSalt for session-produced envelopes
- decryptV2 handles both standalone and session envelopes
- decryptAsync fix: v2 errors no longer fall through silently to v1
- 12 new tests covering round-trip, interop, destroy guard, cross-session rejection

WCN-31

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pranavjain97 pranavjain97 force-pushed the pranavjain/wcn-31-phase-1-hkdf-caching-layer-for-multi-call-operations branch from 80f7404 to 125015d Compare April 15, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant