About the RSA Encrypt / Decrypt
Generate a fresh RSA key pair with the browser’s cryptographically secure Web Crypto API, or paste your own PEM keys. Then encrypt small secrets with the public key and decrypt them with the private key, or create and verify digital signatures.
Keys can be exported as PKCS#8/SPKI (BEGIN PRIVATE KEY/BEGIN PUBLIC KEY) or traditional PKCS#1 (BEGIN RSA PRIVATE KEY). Private keys are never stored.
Features
- 1024–4096-bit key generation via Web Crypto
- PKCS#8 / SPKI and PKCS#1 PEM formats
- RSA-OAEP (SHA-1 or SHA-256) and PKCS#1 v1.5 encryption
- SHA-1/256/384/512 with RSA and RSASSA-PSS signatures
- Message size limit check with helpful errors
How to use it
- Generate a key pair or paste existing PEM keys.
- For encryption, choose a padding, enter text and click Encrypt.
- For signatures, open the Sign / Verify tab, sign with the private key and verify with the public key.
Frequently asked questions
Why can I only encrypt short messages?
RSA can encrypt at most the key size minus padding overhead — e.g. 190 bytes with a 2048-bit key and OAEP-SHA256. Real systems use hybrid encryption: encrypt data with AES, then encrypt the AES key with RSA.
Which padding should I use?
Use OAEP for encryption and PSS or PKCS#1 v1.5 for signatures. PKCS#1 v1.5 encryption is legacy and vulnerable to padding-oracle attacks if misused.
Is 2048-bit RSA still secure?
Yes, 2048-bit RSA is considered secure until about 2030. Use 3072 or 4096 bits for long-lived keys.