RSA Encryption/Decryption Tool
RSA is an asymmetric encryption algorithm that uses a pair of keys: a public key for encryption and a private key for decryption. This tool supports key generation (1024/2048/4096-bit), PKCS1 v1.5 and OAEP padding schemes, and multiple hash algorithms.
Generate RSA Key Pair
Encrypt
Decrypt
What is RSA?
RSA (Rivest-Shamir-Adleman) is a public-key cryptosystem that is one of the oldest and most widely used asymmetric encryption algorithms. Unlike symmetric encryption, RSA uses two different keys: a public key that can be freely shared for encryption, and a private key that must be kept secret for decryption.
RSA is commonly used for secure data transmission, digital signatures, and key exchange. While powerful, RSA is slower than symmetric algorithms and can only encrypt small amounts of data directly. For larger data, RSA is typically used to encrypt a symmetric key, which then encrypts the actual data (hybrid encryption).
Key Features
- Asymmetric encryption with public/private key pairs
- Key sizes: 1024, 2048, or 4096 bits (2048-bit recommended)
- Padding schemes: PKCS1 v1.5 (legacy) and OAEP (recommended)
- OAEP hash algorithms: SHA-1, SHA-256, SHA-384, SHA-512
Security Notice
RSA-2048 with OAEP padding and SHA-256 is considered secure for most applications. RSA-1024 is deprecated and should not be used for new applications. RSA-4096 provides the highest security but with performance trade-offs.
Never share your private key. All encryption/decryption operations are performed locally in your browser - no keys are transmitted to any server.
Privacy & Security
All RSA operations including key generation, encryption, and decryption are performed entirely in your browser using the forge library. Your keys and data never leave your device, ensuring complete privacy and security.
About RSA Encryption/Decryption Tool
Encrypt and decrypt data using RSA asymmetric encryption with public/private key pairs, PKCS1 v1.5 and OAEP padding
Generate RSA key pairs and test public-key encryption/decryption with supported key sizes, padding schemes, hashes, and encodings.
Key features
- Security task Generate RSA key pairs and test public-key encryption/decryption with supported key sizes, padding schemes, hashes, and encodings.
- Required material Use a PEM public key for encryption and its matching PEM private key for decryption, or generate a new 1024/2048/4096-bit pair.
- Parameters that must match Prefer OAEP with SHA-256 for new interoperability tests; keep padding, hash, and data encoding identical on both sides.
- Result and verification The output contains the generated PEM keys, encoded ciphertext, or restored plaintext for payloads small enough for the selected RSA parameters.
How to use RSA Encryption/Decryption Tool
Follow this workflow to work with RSA keys and ciphertext safely and accurately.
- Provide the required material Use a PEM public key for encryption and its matching PEM private key for decryption, or generate a new 1024/2048/4096-bit pair.
- Match security parameters Prefer OAEP with SHA-256 for new interoperability tests; keep padding, hash, and data encoding identical on both sides.
- Run the operation Run the operation locally, keep sensitive RSA keys and ciphertext out of logs and screenshots, and never assume a successful transformation proves secure deployment.
- Verify before use The output contains the generated PEM keys, encoded ciphertext, or restored plaintext for payloads small enough for the selected RSA parameters.
Usage tips
- Use RSA-2048 or stronger for current systems; 1024-bit keys are obsolete.
- Never share the private key or paste a production private key into an untrusted browser context.
- Use hybrid encryption: RSA protects a random symmetric key and authenticated encryption protects the actual data.