Skip to content

feat(sdk-core): upgrade v1 user keys to argon2 on sign - #10129

Open
pranavjain97 wants to merge 7 commits into
masterfrom
pranavjain/wcn-285-sdk-silent-v1-to-v2-re-encryption-of-user-key-on-transaction
Open

pranavjain97 wants to merge 7 commits into
masterfrom
pranavjain/wcn-285-sdk-silent-v1-to-v2-re-encryption-of-user-key-on-transaction

Conversation

@pranavjain97

@pranavjain97 pranavjain97 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Adds opt-in upgrading of v1 user keys to v2 (argon2) encryption when a user signs. The upgrade runs in the background, after signing, and never blocks or fails the signing call.

Enabling it

  • New BitGo constructor option upgradeEncryptionOnSign (default false), read through bitgo.isUpgradeEncryptionOnSignEnabled().
  • New per-call upgradeEncryption?: boolean on signing options, which overrides the constructor setting. It is never sent to the server.

Where it runs

  • wallet.signTransaction (multisig, TSS, OFC), wallet.signMessage, wallet.signTypedData
  • pendingApproval.approve (TSS recreate and sign)
  • Lightning payInvoice and withdrawOnchain (user auth key)

Safety

  • The new encryption is decrypted again and compared with the original before it is written.
  • The write includes the current encryptedPrv, so the server rejects it if the key changed in the meantime. That case is reported as skipped: keyChanged.
  • Concurrent upgrades of the same key share one request.
  • After a failure the key stays as it was, and the next sign tries again.

Issue Number

WCN-285

@linear-code

linear-code Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

WCN-285

@pranavjain97 pranavjain97 changed the title feat(sdk-core): upgrade v1 user keys to v2 on sign feat(sdk-core): upgrade v1 user keys to argon2 on sign Nov 4, 2026
@pranavjain97
pranavjain97 force-pushed the pranavjain/wcn-285-sdk-silent-v1-to-v2-re-encryption-of-user-key-on-transaction branch from 587e6a1 to c20c23b Compare November 4, 2026 21:05
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Compatibility checks are failing on Node.js 27-nightly (experimental, non-blocking). This does not block merge, but it signals an incompatibility to fix before this release becomes supported.

View run

@pranavjain97
pranavjain97 marked this pull request as ready for review November 4, 2026 21:42
@pranavjain97
pranavjain97 requested review from a team as code owners November 4, 2026 21:42

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@s84krish s84krish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

This branch has not been deployed

No deployments
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.

2 participants