RSA public-key encryption, decryption and signatures
RSA with PEM keys: encrypt with the public key and decrypt with the private one (PKCS#1 v1.5 or OAEP), sign with the private key and verify with the public one (SHA-1/256/384/512), with long input chunked to the modulus size and concatenated. Everything runs locally.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
Everything is computed locally; keys and plaintext are never uploaded.
Enter content to see the result
Key bits: 0 · Input bytes: 0 · Output bytes: 0
What this tool does
- Encrypt a short payload with a public key for the private-key holder to decrypt.
- Sign with a private key and verify with the public one to detect tampering.
- Debug decryption or verification failures caused by key format or padding mismatches.
Example
Input
hello
Output
# RSA public-key encryption / padding=pkcs1 hash=sha256 # keyBits=1024 groupBytes=117 groups=1 # cipherBytes=128 # cipherHex=2a2cf1c288afffa204d85f2eb98ebb507344775cbc33002725ec4c2e477006e02678f10f1787939191f62cb70a63252a076ae899b967a34b685f5b36bf7282e8bfefe55d08075eb2f718344ecb6abd553b028e5260a42fc15626bc43b4b086a997414c9f8462664c1aec4bc2ca904f0e77a7534f088300edd9fefc912721d907 # cipherBase64=Kizxwoiv/6IE2F8uuY67UHNEd1y8MwAnJexMLkdwBuAmePEPF4eTkZH2LLcKYyUqB2romblno0toX1s2v3KC6L/v5V0IB16y9xg0TstqvVU7Ao5SYKQvwVYmvEO0sIapl0FMn4RiZkwa7EvCypBPDnenU08IgwDt2f78kSch2Qc=
Without a key option the tool uses a built-in 1024-bit demo key so you can inspect the output shape before pasting your own PEM; that demo key ships with the page, so never use it for real secrets.
Frequently asked questions
Is it production-grade encryption?
No — this is a demo and debugging tool. Two limits: (1) without a key it uses a fixed 1024-bit demo key shipped with the page, so anyone can decrypt the ciphertext; it is only meant for inspecting the output shape. (2) The padding randomiser is derived from (message, modulus), so the same plaintext always produces the same ciphertext — handy for reproducible tests, but it does not satisfy the randomised padding required by RFC 8017. For real work use OpenSSL or node:crypto with at least 2048-bit keys.
How much data can be encrypted?
It is limited by modulus size minus padding overhead: at most 117 bytes per block for a 1024-bit key with PKCS#1 v1.5 and 62 bytes with OAEP-SHA256. The tool chunks and concatenates automatically, so long input still works and the ciphertext is a multiple of the block size (128 bytes for 1024 bits). It only refuses input when the key is too small for even one block.
Why might verification fail?
Usually one of three reasons: the public key does not match the signing key, the padding is wrong (PKCS#1 v1.5 and OAEP are incompatible), or the original message changed. Each is reported separately.
Does it support PSS padding?
No. This tool implements EMSA-PKCS1-v1_5 (deterministic signatures); PSS is a different randomised scheme and is out of scope.
What key formats are accepted?
PKCS#8 or PKCS#1 PEM. If you have a JWK or raw hex, convert it to PEM first.
Keywords:OAEPPKCS#1RSA