Zero-dependency end-to-end cryptography suite for the modern web.
AES-256-GCM symmetric encryption, RSA-4096 hybrid asymmetric encryption, ECDH key agreement, digital signatures, JWE compact serialization (RFC 7516), and WebRTC insertable streams — built natively for browser and Node.js Web Crypto API environments.
- 🚀 Try WebCrypt Live Playground: Test AES-256, RSA-4096, ECDH, digital signatures, and file encryption directly in your browser.
- 📚 Documentation Index
npm install webcryptimport{WebCrypt}from"webcrypt";constwc=newWebCrypt();constencrypted=awaitwc.encryptText("Secret message","my-password");constdecrypted=awaitwc.decryptText(encrypted,"my-password");const{ blob, filename }=awaitwc.encryptFile(file,"my-password",{parallelChunks: 4});constdecrypted=awaitwc.decryptFile(blob,"my-password");import{WebCryptAsym}from"webcrypt";constwca=newWebCryptAsym();constkeys=awaitwca.generateKeyPair(4096);constencrypted=awaitwca.encryptText("Secret payload",keys.publicKey);constdecrypted=awaitwca.decryptText(encrypted,keys.privateKey);constaliceKeys=awaitwca.generateECDHKeyPair("P-256");constbobKeys=awaitwca.generateECDHKeyPair("P-256");constencrypted=awaitwca.encryptWithECDH("Confidential data",aliceKeys.privateKey,bobKeys.publicKey);constdecrypted=awaitwca.decryptWithECDH(encrypted,bobKeys.privateKey,aliceKeys.publicKey);constsigningKeys=awaitwca.generateSigningKeyPair("P-256");constsignature=awaitwca.signText("Tamper-proof payload",signingKeys.privateKey);constisValid=awaitwca.verifyText("Tamper-proof payload",signature,signingKeys.publicKey);For complete method signatures, options, and advanced usage, see our detailed documentation sub-documents:
- 📖 Symmetric Encryption API (
WebCrypt) — AES-256-GCM, File Streaming, WebRTC E2EE, LRU Key Cache, HMAC. - 📖 Asymmetric Encryption API (
WebCryptAsym) — RSA-4096 Hybrid, ECDH, Signatures, JWE RFC 7516, HKDF. - 🔒 Cryptographic Architecture & Security — Threat Model, Timing-Safe Helpers, Grover Quantum Resistance.
- ⚛️ Post-Quantum Cryptography Guide — Kyber/Dilithium stubs & liboqs-js migration path.
- 🛡️ Security Policy — Vulnerability reporting and version support table.
MIT © PuterVision LLC