RSA Key Generator
Generate RSA key pairs
Frequently Asked Questions
How does RSA key generation work?
RSA generates two large prime numbers (p, q), computes n = p × q, calculates the totient φ(n) = (p-1)(q-1), chooses public exponent e (commonly 65537), and computes private exponent d where e × d ≡ 1 mod φ(n). The public key is (n, e), private key is (n, d).
What RSA key size should I use?
2048-bit: minimum recommended, secure until ~2030. 3072-bit: recommended for medium-term security. 4096-bit: long-term security, slower operations. 1024-bit: deprecated and insecure. NIST recommends 2048-bit minimum for current use.
What is the difference between RSA public and private keys?
The public key encrypts data and verifies signatures. Share it freely. The private key decrypts data and creates signatures. Keep it secret. Data encrypted with the public key can only be decrypted with the matching private key, and vice versa.
How do I use RSA keys for SSH authentication?
Generate a key pair. Add the public key to the server's ~/.ssh/authorized_keys. Keep the private key on your local machine. SSH uses the private key to prove identity without sending passwords. Use ssh-keygen -t rsa -b 4096 to generate.
What is the difference between RSA and ECC keys?
RSA uses integer factorization (large keys: 2048-4096 bits). ECC uses elliptic curve math (smaller keys: 256-384 bits for equivalent security). ECC-256 ≈ RSA-3072 in strength. ECC is faster and uses less bandwidth. Both are widely supported.