A tiny, zero-dependency JavaScript library for OpenSSL RSA encryption, decryption, and key generation in browsers and Node.js.
JSEncrypt is a lightweight JavaScript library that performs OpenSSL-compatible RSA encryption, decryption, and key generation. It solves the problem of implementing secure cryptographic operations in web and Node.js applications without relying on external dependencies or complex setups. The library supports both synchronous and asynchronous patterns and works with standard PEM-formatted keys.
JavaScript developers building web or Node.js applications that require client-side or server-side RSA encryption, such as securing form data, implementing digital signatures, or encrypting communications between clients and servers.
Developers choose JSEncrypt for its minimal footprint, zero dependencies, and seamless compatibility with OpenSSL. It offers a straightforward API for RSA operations without sacrificing security, making it a reliable choice for projects where bundle size and simplicity are critical.
A tiny (18.5 kB gzip), zero-dependency, Javascript library to perform OpenSSL RSA Encryption, Decryption, and Key Generation.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At only 18.5 kB gzipped, JSEncrypt has negligible impact on application performance and load times, as highlighted in the README's key benefits.
Works seamlessly in both Node.js and browser environments without modifications, supporting universal JavaScript development, as noted in the installation and usage sections.
The library has no external dependencies, improving security by reducing attack surfaces and simplifying integration, which is emphasized as a key advantage.
Direct support for PEM-formatted keys generated with OpenSSL ensures compatibility with standard cryptographic tools, making key management straightforward.
The README explicitly warns that JavaScript-based key generation has less entropy than OpenSSL, making it risky for high-security production use without external key management.
JSEncrypt only supports RSA encryption, decryption, and signatures, lacking other common cryptographic primitives like AES or ECC, which restricts its use cases.
Operations with 4096-bit keys can be slow, especially in browsers, as mentioned in the key generation section, potentially hindering real-time applications.