RSA Key Generator
Generate RSA public and private key pairs
Acerca de RSA
RSA es un algoritmo de cifrado asimétrico que utiliza un par de claves: una pública para cifrar y una privada para descifrar. Es ampliamente utilizado para comunicaciones seguras, firmas digitales y autenticación.
Online RSA Key Generator - Create a Public and Private Key Pair
What is RSA and how does asymmetric encryption work?
RSA (Rivest-Shamir-Adleman) is one of the most widely used asymmetric cryptosystems in the world. Unlike symmetric encryption, where a single key both encrypts and decrypts, RSA uses a mathematically related key pair: a public key you can share freely and a private key you must keep secret. Anything encrypted with the public key can only be decrypted with the private key, and the other way round. That makes secure communication possible without exchanging a secret first, enables authentication through digital signatures, and underpins protocols such as HTTPS, SSH and PGP. This generator creates valid RSA key pairs directly in your browser through the Web Crypto API.
RSA key sizes: 1024, 2048 or 4096 bits?
The key size determines both security and performance. 1024-bit keys are no longer considered safe for long-term use and can fall to an attacker with enough computing power. 2048-bit keys are the current standard, recommended by NIST through 2030 and sufficient for most applications. 4096-bit keys give you maximum security for highly sensitive data or long-lived protection, at the cost of slower generation and processing. For SSH and SSL/TLS certificates, 2048 bits is the acceptable minimum. For code signing or legal documents with an extended validity, consider 4096. This tool lets you choose the size that matches your needs.
Practical uses for the RSA keys you generate
RSA keys have many applications. For SSH, copy your public key into ~/.ssh/authorized_keys on remote servers for password-free login. For file encryption, use the public key to encrypt data only the private key holder can read. For digital signatures, sign documents with your private key to prove authorship, and anyone can verify with your public key. For SSL certificates, generate a CSR (Certificate Signing Request) with your private key. For GPG and PGP, import the keys for encrypted email. One rule matters above all: the private key must NEVER be shared, and if it is ever exposed, generate a new pair immediately.
If you work with this tool, you will probably also find these useful Hash Generator, AES Encryption, HMAC Generator, Bcrypt Generator.
Frequently asked questions
Is it safe to generate RSA keys in the browser?
Yes. This tool uses the native browser Web Crypto API, which implements cryptographically secure key generation. Keys are produced locally on your device and never sent to any server. For high-security environments such as production certificates or long-lived keys, however, consider generating them with local tooling such as OpenSSL or ssh-keygen on a hardened operating system.
What is the difference between PEM and DER format?
PEM (Privacy Enhanced Mail) is the most common format: Base64 encoded with readable headers such as "-----BEGIN PUBLIC KEY-----". It is plain text, easy to copy and compatible with almost every tool. DER (Distinguished Encoding Rules) is a binary format, more compact but not human readable. This tool emits PEM because of its universality.
Can I use these keys for Bitcoin or other cryptocurrencies?
Not directly. Bitcoin and most cryptocurrencies use elliptic curve cryptography, specifically ECDSA over secp256k1, rather than RSA. RSA covers general encryption, SSL/TLS, SSH, document signing and encrypted email. For a cryptocurrency wallet you need a dedicated ECDSA key generator.
How often should I rotate my RSA keys?
It depends on the use. For personal SSH keys, every one to two years, or immediately if you suspect a compromise. For SSL certificates, the current maximum validity is 398 days. For corporate code signing keys, annually. For keys protecting highly sensitive data, consider a shorter cycle. Always generate new keys whenever the private key may have been exposed.