Skip to content

refactor(sdk-api): make SJCL the single v1 decrypt engine - #10144

Merged
pranavjain97 merged 1 commit into
masterfrom
pranavjain/wcn-3873-sdk-use-sjcl-as-the-single-v1-decrypt
Nov 10, 2026
Merged

pranavjain97 merged 1 commit into
masterfrom
pranavjain/wcn-3873-sdk-use-sjcl-as-the-single-v1-decrypt

Conversation

@pranavjain97

@pranavjain97 pranavjain97 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Makes SJCL the only v1 decrypt engine on every runtime: assertSafeLegacyV1Envelope screens the envelope (iter cap 100k, ccm-only, read with SJCL's own decoder), then sjcl.decrypt. Removes the native node:crypto decoder, the Node SJCL fallback, and the browser branch. The two parsers could disagree on what a valid envelope is (whitespace-key bypass, WCN-3831), and clients have hit the fallback warning in the field, so the native path buys nothing.

Ticket: WCN-3873

@linear-code

linear-code Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

WCN-3873

Every runtime now screens the v1 envelope with the shared
assertSafeLegacyV1Envelope guard from sdk-core (iter cap, ccm-only) and
runs sjcl.decrypt; the native node:crypto decoder and the Node SJCL
fallback are gone. decryptV1WithFallback is renamed decryptV1WithSjcl,
and decryptV1, parseV1Envelope and V1_MAX_ITER stay as deprecated exports.

Ticket: WCN-3873
@github-actions

github-actions Bot commented Nov 9, 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 9, 2026 17:32
@pranavjain97
pranavjain97 requested review from a team as code owners November 9, 2026 17:32

@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.

@pranavjain97
pranavjain97 force-pushed the pranavjain/wcn-3873-sdk-use-sjcl-as-the-single-v1-decrypt branch from 053ff53 to 597a5a8 Compare November 9, 2026 19:56

@vibhavgo vibhavgo 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

@pranavjain97
pranavjain97 merged commit 7e320de into master Nov 10, 2026
27 checks passed
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