feat(sdk-api): add v2 encrypt/decrypt using Argon2id#8495
Merged
pranavjain97 merged 4 commits intomasterfrom Apr 17, 2026
Merged
feat(sdk-api): add v2 encrypt/decrypt using Argon2id#8495pranavjain97 merged 4 commits intomasterfrom
pranavjain97 merged 4 commits intomasterfrom
Conversation
dfae16d to
0b1a2ad
Compare
597e548 to
c111d99
Compare
b816e65 to
a9be0b8
Compare
mrdanish26
reviewed
Apr 16, 2026
f05550c to
15275f9
Compare
Add encryptV2() and decryptV2() alongside existing v1 SJCL functions. V2 uses Argon2id (m=64MiB, t=3, p=4) for KDF and WebCrypto AES-256-GCM for symmetric encryption. Self-describing JSON envelope stores all parameters for forward compatibility. Existing v1 encrypt/decrypt is untouched. No call site changes. WCN-30 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> TICKET: WCN-30
Add decryptAsync() that auto-detects v1 (SJCL) or v2 (Argon2id) envelopes. This is the non-breaking migration path for clients to move from sync decrypt() to async before the breaking release. - decryptAsync() on encrypt.ts and BitGoAPI - decryptAsync on BitGoBase interface - Tests for v1 and v2 auto-detection, wrong password rejection WCN-30 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> TICKET: WCN-30
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> TICKET: WCN-30
15275f9 to
f4ae573
Compare
mrdanish26
approved these changes
Apr 16, 2026
zahin-mohammad
approved these changes
Apr 17, 2026
Contributor
zahin-mohammad
left a comment
There was a problem hiding this comment.
minor nits, can address in a follow up.
pranavjain97
commented
Apr 17, 2026
Contributor
Author
pranavjain97
left a comment
There was a problem hiding this comment.
will address comments in followup, non blocking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add encryptV2() and decryptV2() alongside existing v1 SJCL functions. V2 uses Argon2id (m=64MiB, t=3, p=4) for KDF and WebCrypto AES-256-GCM for symmetric encryption. Self-describing JSON envelope stores all parameters for forward compatibility.
Existing v1 encrypt/decrypt is untouched. No call site changes.