jsrsasign implements signing, validation, certificates, CMS, timestamps, and JWS/JWT/JWK handling in JavaScript with no external crypto dependencies.
Overview
jsrsasign is a pure JavaScript cryptography library covering digital signatures, public-key infrastructure, and related message formats. It wraps RSA, RSAPSS, ECDSA, and DSA signing and verification, hash and MAC calculation in a Java JCE–style API, and ASN.1 encoding for certificates, CRLs, CSRs, CMS SignedData, RFC 3161 timestamps, CAdES structures, and JSON Web Signature, Token, and Key data.
KEYUTIL loads RSA, elliptic-curve, and DSA keys from PEM PKCS#1, PKCS#5, PKCS#8, and X.509 certificate forms. Parsers and generators handle X.509 certificates and CSRs, CMS signatures, and simple ASN.1 structures without requiring another crypto dependency.
The package targets Node.js via npm and browser use through script tags or CDNs. An add-on architecture supports custom X.509 extensions and OIDs. W3C Web Crypto API support appears in newer releases alongside modernization of the codebase.
Project maintainers have announced end of support for the library and deprecation of npm packages; consumers should weigh that timeline when adopting it for new work.
Key features
- RSA and ECDSA digital signatures
- X.509 certificate and CSR handling
- ASN.1 encode and parse utilities
- CMS SignedData and timestamps
- JWS JWT and JWK support
- PKCS private and public key loading
- CRL and OCSP-related structures
- Standalone JavaScript implementation
Use cases
- Signing and verifying messages in Node
- Parsing X.509 certificates in the browser
- Building JWT-based authentication flows
- Generating CMS signed data
- Prototyping PKI operations without native crypto