Public and Private Key Generator
Generate secure RSA and ECDSA key pairs locally in your browser using the Web Crypto API. Features entropy collection, PEM export, and key strength analysis.
About
This tool leverages the native window.crypto API to generate cryptographically secure SSH and encryption keys entirely within your browser client. Unlike server-side generators, your private key never traverses a network, eliminating the risk of interception or database leaks.
We support both RSA (Rivest - Shamir - Adleman) and ECDSA (Elliptic Curve Digital Signature Algorithm). RSA relies on the practical difficulty of factoring the product of two large prime numbers, p and q. ECDSA offers equivalent security at smaller key sizes by utilizing the algebraic structure of elliptic curves over finite fields, resulting in faster computations and less bandwidth usage.
Formulas
RSA Public Key Generation:
Where n is the modulus. The public exponent e is typically 65537.
Elliptic Curve Equation (Weierstrass Form):
Security relies on the discrete logarithm problem: finding k given Q = kG.
Reference Data
| Algorithm | Key Size | Security Level (Bits) | Recommended Use | Est. Quantum Resistance |
|---|---|---|---|---|
| RSA | 1024-bit | 80 | Legacy / Testing (Unsafe) | Broken |
| RSA | 2048-bit | 112 | Standard Web/SSH | Low |
| RSA | 4096-bit | 140+ | Long-term Cold Storage | Moderate |
| ECDSA | P-256 | 128 | Modern Mobile/Web | Moderate |
| ECDSA | P-384 | 192 | Top Secret (NSA Suite B) | High |
| ECDSA | P-521 | 256 | Maximum Assurance | Very High |