RSA Key Pair Generator
Generate RSA public and private key pairs online with configurable bit sizes. Create secure PEM-formatted RSA keys for encryption and digital signatures.
What is an RSA Key Pair?
RSA (Rivest-Shamir-Adleman) is a widely used asymmetric encryption algorithm that uses a pair of keys: a public key for encryption and a private key for decryption. The RSA Key Pair Generator creates these mathematically linked keys, enabling secure data transmission, digital signatures, and authentication in modern cryptography.
This online RSA key generator creates PEM-formatted RSA key pairs entirely in your browser using the node-forge library. No keys are sent to any server, ensuring your private key remains completely secure. Simply choose your desired key size and click generate to create a new RSA key pair instantly.
How to Use the RSA Key Pair Generator
Using this tool is straightforward:
- Select Key Size: Choose from 512 to 16384 bits. The recommended size for most applications is 2048 bits.
- Generate: Click the generate button to create your RSA key pair.
- Copy Keys: Use the copy buttons to copy the public or private key PEM text to your clipboard.
Each time you click generate, a new unique key pair is created using cryptographically secure random number generation.
Key Size Recommendations
The security of RSA encryption depends on the key size. Here are common recommendations:
- 512 bits: Weak and no longer considered secure. Only use for testing or educational purposes.
- 1024 bits: Deprecated for security use. Still found in some legacy systems.
- 2048 bits: The current industry standard and recommended minimum for most applications.
- 4096 bits: Provides a higher security margin but requires more computational resources.
- 8192+ bits: Very high security but significantly slower key generation and encryption operations.
Common Use Cases
- SSH Authentication: Generate RSA key pairs for secure SSH access to servers.
- SSL/TLS Certificates: Create key pairs for web server certificates.
- Digital Signatures: Sign documents and verify authenticity using RSA signatures.
- Encrypted Communication: Implement secure messaging and data exchange.
- Code Signing: Sign software packages and updates to verify their integrity.
Once you have your RSA keys, use the Encrypt Decrypt tool for encryption and decryption, the JWT Decoder for token inspection, or the HMAC Generator for message authentication.
Frequently Asked Questions
What is the difference between public and private keys?
The public key is shared openly and used to encrypt data or verify signatures. The private key is kept secret and used to decrypt data or create signatures. Data encrypted with the public key can only be decrypted with the corresponding private key, and vice versa.
Is 2048-bit RSA still secure?
Yes, 2048-bit RSA is currently considered secure by NIST and other cryptographic standards bodies. It is expected to remain secure until at least 2030. For applications requiring longer-term security, 4096-bit keys are recommended.
Are my generated keys stored anywhere?
No. This tool runs entirely in your browser using client-side JavaScript. Your keys are generated locally and never sent to any server. Once you close the page or refresh, the keys are gone unless you have copied them.
What is PEM format?
PEM (Privacy-Enhanced Mail) is a base64-encoded format that wraps cryptographic keys with header and footer lines (-----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----). It is the most common format for storing and exchanging RSA keys.
Can I use these keys for SSH?
Yes, you can use the generated RSA keys for SSH authentication. You will need to convert the private key to the OpenSSH format using ssh-keygen if needed, or simply copy the public key content to your server's authorized_keys file.