RSA Encrypt / Decrypt
Securely encrypt and decrypt messages using RSA asymmetric encryption directly in your browser.
Enter the public key to use for encryption.
Enter the private key to use for decryption.
Error
How RSA Encryption Works
RSA (Rivest–Shamir–Adleman) is a public-key cryptosystem that is widely used for secure data transmission. It is also one of the oldest. The acronym RSA comes from the surnames of Ron Rivest, Adi Shamir, and Leonard Adleman, who publicly described the algorithm in 1977.
Encryption Process
In an RSA cryptosystem, the encryption key is public and it is different from the decryption key which is kept secret (private). In RSA, this asymmetry is based on the practical difficulty of the factorization of the product of two large prime numbers, the "factoring problem".
- Public Key: Used to encrypt messages. Anyone can have this key.
- Private Key: Used to decrypt messages. Only the recipient should have this key.
Supported Padding Schemes
This tool supports multiple padding schemes to ensure compatibility with various systems and security standards:
- RSAES-PKCS1-V1_5: The most common legacy padding scheme. Widely compatible but less secure than OAEP against certain attacks.
- RSAES-OAEP: Optimal Asymmetric Encryption Padding. Recommended for new applications. Uses SHA-1 by default.
- RSAES-OAEP/SHA-256: A more secure variant of OAEP using SHA-256 for hashing.
- RSAES-OAEP/SHA-256/MGF1-SHA-1: A specific configuration often used in certain cryptographic libraries (e.g., Java, .NET).
- NONE (Raw RSA): Performs raw modular exponentiation without any padding. Warning: This is insecure for general use and should only be used for testing or specific protocol implementations.
This tool runs entirely in your browser using JavaScript. Your keys and data are never sent to any server.