# travist/jsencrypt

A tiny (18.5 kB gzip), zero-dependency, Javascript library to perform OpenSSL RSA Encryption, Decryption, and Key Generation.

Repository: https://github.com/travist/jsencrypt
Canonical: https://ross.abutalabs.com/products/jsencrypt
Homepage: http://travistidwell.com/jsencrypt
Language: JavaScript
License: NOASSERTION
License Family: other
Last push: 2026-04-08T09:02:21+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 76, release rhythm 35, longevity 100
- inputs: {"age_days": 4947, "days_push": 147, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6804, forks 1995 (observed 2026-08-28T04:09:48.710968+00:00)

## What it is
JSEncrypt is a tiny, zero-dependency JavaScript library for OpenSSL-compatible RSA encryption, decryption, signing, and key generation. It works in both browsers and Node.js, supports PEM-formatted keys, and is built on Tom Wu's jsbn library.

## Use cases
- encrypt data with rsa in javascript
- decrypt rsa encrypted messages in the browser
- generate rsa key pairs in javascript
- sign and verify data with rsa in node.js
- encrypt user credentials before sending to server
- validate jwt tokens with rsa public keys
- encrypt files before upload in the browser
- work with openssl pem keys in javascript

## When to choose
- you need lightweight RSA encryption/decryption in the browser or Node.js with a small bundle size
- you must interoperate with OpenSSL-generated PEM keys
- you want a zero-dependency library with sync and async APIs
- you need RSA signing and verification for tokens or document integrity

## When to avoid
- you need modern AEAD symmetric encryption like AES-GCM or ChaCha20
- you need full TLS/protocol-level security rather than application-level RSA
- you require production-grade in-JavaScript key generation (use OpenSSL instead)
- your environment supports the native Web Crypto API, which is faster and more auditable

## Facets
- artifact type: library
- maturity: active
- function: cryptography, security, sdk
- domain: security, web-development, frontend, developer-tools
- platform: browser, cross-platform
- tags: rsa, encryption, openssl, pem-keys, zero-dependency, digital-signatures, key-generation, javascript, nodejs

## Member repositories
- travist/jsencrypt (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:48.710968+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:42:04.940633+00:00, confidence not recorded.
  - readme: https://github.com/travist/jsencrypt (fetched 2026-08-28T04:09:48.710968+00:00, sha 7081398ae211)
  - homepage: http://travistidwell.com/jsencrypt (fetched 2026-08-29T08:38:35.150684+00:00, sha 332510201ce5)
  - site_page: http://travistidwell.com/jsencrypt/docs (fetched 2026-08-29T08:38:35.159923+00:00, sha 000469a19999)
  - site_page: http://travistidwell.com/jsencrypt/docs/getting-started (fetched 2026-08-29T08:38:35.162668+00:00, sha 5ee20e645d9f)
  - site_page: http://travistidwell.com/jsencrypt/docs/api (fetched 2026-08-29T08:38:35.165332+00:00, sha 3194bfdc1fb2)
  - site_page: http://travistidwell.com/jsencrypt/docs/examples (fetched 2026-08-29T08:38:35.167677+00:00, sha f81210411787)
  - site_page: http://travistidwell.com/jsencrypt/docs/key-management (fetched 2026-08-29T08:38:35.170653+00:00, sha 7a34e0df8480)
  - site_page: http://travistidwell.com/jsencrypt/docs/security (fetched 2026-08-29T08:38:35.172628+00:00, sha e9a3163def8c)
  - registry_npm: https://registry.npmjs.org/jsencrypt (fetched 2026-08-29T08:38:35.174828+00:00, sha c06886146963)
- Data as of 2026-08-30T08:39:29.467469+00:00.
