Keys, Certificates & Tokens
RSA Encryption
Encrypt a short message with an RSA public key using RSA-OAEP, SHA-256 by default. Get Base64 or hex ciphertext, made in your browser.
This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.
RSA-OAEP uses the selected digest for both its hash and MGF1. The OAEP label stays empty.
The result contains ciphertext in the selected output format.
- Encrypt a short secret, such as an API token, for a holder of an RSA public key.
Set the public key and OAEP digest
- Paste a PUBLIC KEY or RSA PUBLIC KEY PEM block.
- Enter the message text.
- Choose the encryption scheme and digest required by the recipient, then select Encrypt.
Encrypt Hello with an RSA public key
Input: Hello
Settings: RSA Public Key (PEM) from a new 2048-bit test pair; Encryption Scheme RSA-OAEP; Message Digest Algorithm SHA-256; Ciphertext format Base64
Result: A 344-character Base64 ciphertext that decodes to 256 bytes. The exact text changes on each run.
OAEP padding is random, so two runs give different ciphertexts. Both decrypt to Hello with the matching private key.
Message size and padding compatibility
- OAEP message capacity depends on key size and digest size. Use hybrid encryption for larger data.
- RAW has no padding; PKCS#1 v1.5 and SHA-1 options serve legacy compatibility.
- Encryption does not authenticate the sender.