Skip to content

fix(sdk-api): skip doomed native v1 decrypt attempt in browser - #9535

Merged
pranavjain97 merged 1 commit into
masterfrom
pranavjain/wcn-skip-native-v1-decrypt-in-browser
Aug 20, 2026
Merged

fix(sdk-api): skip doomed native v1 decrypt attempt in browser#9535
pranavjain97 merged 1 commit into
masterfrom
pranavjain/wcn-skip-native-v1-decrypt-in-browser

Conversation

@pranavjain97

Copy link
Copy Markdown
Contributor

browserify-aes (webpack's node:crypto polyfill) has no AES-CCM mode, so native v1 decrypt fails on every call in a real browser bundle, paying for a wasted PBKDF2 run and logging a warning each time before falling back to SJCL. Detect browser runtime and go straight to SJCL, while still enforcing the iter cap to preserve DoS protection.

TICKET: WCN-43

browserify-aes (webpack's node:crypto polyfill) has no AES-CCM mode,
so native v1 decrypt fails on every call in a real browser bundle,
paying for a wasted PBKDF2 run and logging a warning each time before
falling back to SJCL. Detect browser runtime and go straight to SJCL,
while still enforcing the iter cap to preserve DoS protection.

TICKET: WCN-43
@pranavjain97
pranavjain97 merged commit 6edc05a into master Aug 20, 2026
25 checks passed
@linear-code

linear-code Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

WCN-2361

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