What Is RSA?
RSA (Rivest–Shamir–Adleman) is one of the first and most widely-used public key cryptography algorithms. It enables secure communication without the two parties needing to share a secret in advance — solving the fundamental problem of key exchange over insecure channels.
How Public Key Cryptography Works
RSA generates a key pair — a mathematically linked public key and private key. Anything encrypted with the public key can only be decrypted by the private key, and vice versa. You can share your public key freely; only you hold the private key.
This asymmetry enables two critical operations:
- Encryption: Anyone can encrypt a message to you using your public key. Only your private key can decrypt it.
- Digital signatures: You sign a message with your private key. Anyone can verify the signature using your public key, proving it came from you.
What Do Key Sizes Mean?
RSA key sizes (1024, 2048, 4096 bits) refer to the size of the modulus — a large number used in the mathematical operations. Larger keys are harder to crack but slower to compute.
- 1024-bit: Obsolete. NIST deprecated this in 2010. Do not use.
- 2048-bit: Current standard. Used by most SSL/TLS certificates and SSH keys. Sufficient until at least 2030.
- 4096-bit: High security for sensitive long-term applications. Significantly slower than 2048-bit.
What Is PEM Format?
PEM (Privacy Enhanced Mail) is the most common format for storing RSA keys. It is Base64-encoded with a header line like -----BEGIN RSA PRIVATE KEY-----. PEM is supported by OpenSSL, nginx, Apache, Python, Node.js and virtually every programming environment.
Generate RSA Keys Free
Our RSA Key Generator creates 2048 or 4096-bit key pairs server-side using PHP's OpenSSL library. Keys are never stored or logged — they are returned directly to your browser.


