We are planning to remove support for crypto-js in Safe Mode. Previously, we used version 3.x (which is being flagged for vulnerabilities), which worked without relying on Node.js or browser APIs. However, newer versions of crypto-js introduce dependencies that are incompatible with the QuickJS runtime, which lacks support for these APIs.
To maintain crypto capabilities in Safe Mode, we are considering adopting SJCL (Stanford Javascript Crypto Library) as a core crypto library. SJCL is written in pure JavaScript, has no external dependencies, and supports essential operations like:
- AES encryption/decryption
- SHA hashing (SHA-1, SHA-256, etc.)
- HMAC generation
- PBKDF2
We’re looking for feedback on this direction, and suggestions for any other crypto libraries that:
- Are implemented in pure JavaScript
- Do not depend on Node.js built-ins or browser-specific APIs (e.g., Web Crypto)
- Can run inside the QuickJS runtime
JIRA
We are planning to remove support for
crypto-jsin Safe Mode. Previously, we used version 3.x (which is being flagged for vulnerabilities), which worked without relying on Node.js or browser APIs. However, newer versions ofcrypto-jsintroduce dependencies that are incompatible with the QuickJS runtime, which lacks support for these APIs.To maintain crypto capabilities in Safe Mode, we are considering adopting SJCL (Stanford Javascript Crypto Library) as a core crypto library. SJCL is written in pure JavaScript, has no external dependencies, and supports essential operations like:
We’re looking for feedback on this direction, and suggestions for any other crypto libraries that:
JIRA