Skip to main content

Keys, Certificates & Tokens

RSA Decryption

Process key or token data with RSA Decrypt and explicit format settings. Enter the key material, choose the required format, then review the result.

Tool workspace

Your input stays in this browser.

Add the required input to continue.

Needs input

Run the tool when your input is ready.

Options

Use RSA-OAEP for new encryption. Other schemes support compatibility. RAW has no padding and is unsafe for new encryption.

Your result appears here

Process key or token data with RSA Decrypt and explicit format settings. Enter the key material, choose the required format, then review the result.

This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.

RSA Decryption recovers a short UTF-8 message from RSA ciphertext with the matching private key. Choose the same scheme and digest that the sender used. The default is RSA-OAEP with SHA-256 for both the OAEP hash and MGF1.

The result is the original message as UTF-8 text. The tool rejects output that is not valid UTF-8. A mismatched key, scheme, or digest produces an error, not partial text.

  • Decrypt a short OAEP test message produced by another library or by OpenSSL.
  • Confirm that a public key and a private key belong to the same pair.
  • Find which digest setting a legacy system used for its ciphertext.

Sources: RFC 8017: RSAES-OAEP encryption scheme

Instructions

  1. Paste the ciphertext and set Ciphertext format to Base64 or Hex.
  2. Paste the private key PEM. Enter Key Password only when the key is encrypted.
  3. Select the same Encryption Scheme and Message Digest Algorithm that the sender used.
  4. Select Decrypt and read the recovered UTF-8 text.
  5. If decryption fails, check the key pair first, then the digest. A wrong digest fails the same way as a wrong key.

Example

Input: The Base64 ciphertext of Hello from RSA Encryption, made with the public key of the same test pair

Settings: RSA Private Key (PEM) from that 2048-bit test pair; Key Password empty. Encryption Scheme RSA-OAEP; Message Digest Algorithm SHA-256; Ciphertext format Base64.

Result: Hello

Message Digest Algorithm SHA-1 fails on this ciphertext. The digest must match the one used for encryption.

Limits

  • OAEP limits the message to modulus bytes minus twice the digest bytes minus 2. A 2048-bit key allows 190 bytes with SHA-256 and 126 bytes with SHA-512.
  • RSAES-PKCS1-V1_5 allows modulus bytes minus 11, which is 245 bytes for a 2048-bit key. Use it only for legacy systems; it is open to padding-oracle attacks.
  • RAW applies no padding and is unsafe for real data. It exists only for compatibility tests.
  • SHA-1 OAEP is listed as legacy. Choose it only when the other side cannot use SHA-256.
  • The OAEP label is always empty. Systems that set a label cannot interoperate with this tool.
  • RSA alone cannot encrypt files or long text. Use a hybrid format, such as OpenPGP or CMS, for larger data.
  • Encryption does not authenticate the sender. Anyone with the public key can create valid ciphertext.
  • Decryption needs the private key in this page. Use a disposable test key, not a production key.