RSA Encrypt & Decrypt Tool

RSA Encrypt & Decrypt Tool: Imports RSA public key via SubtleCrypto, applies Optimal Asymmetric Encryption Padding (OAEP), and outputs ciphertext.

Rsa Encrypt Decrypt · Client runtimeSandboxed
Formatted results will render here in real time.

About this rsa encrypt & decrypt tool

Imports RSA public key via SubtleCrypto, applies Optimal Asymmetric Encryption Padding (OAEP), and outputs ciphertext Runs entirely in-memory using Web Crypto primitives to keep sensitive tokens, certificates, and cryptographic keys secure from third-party interception.

Encoding & cryptographic principles

Uses Web Crypto RSA-OAEP with SHA-256: encrypt mode imports a public JWK and returns Base64 ciphertext; decrypt mode imports a private JWK and returns plaintext. It does not manage keys or certificate trust.

Worked verification example

Scenario: Decrypt a fixed RSA-OAEP/SHA-256 test ciphertext with its supplied demonstration private JWK.

Sample input:

{"operation":"decrypt","ciphertext":"YuAQ63SptVr5oNkivIjgkuQ3JCCm2QxZFd4XxKWnI0AKcmcwm4YJxlM7tgCBWmiTNZ4Nds+QCr83qFhB9HjVkeJcWicYt2XUOTGs3WEeWPvap8QdWn47iwI8HB1hEGjhHy5SbPRMmNKCfmB1c62caAxYYywb2/sbUSEDepMw1w2g4cY/1l8/CLJvU+1H7Y3LY/LxAY4+SC+/f0/ZCJIHTsaTmgxEdw8fbQBD18NhykBNXj9jTwkplldnHilDrnUARm3kAWOJ4LPE+H3tBAeWaBOrdto0Un4Moi5vqzxVTeH9A7TE9/jVg/bbByYRBoWEF7I9E/XX6GzwRGy/T8IAVQ==","privateJwk":{"key_ops":["decrypt"],"ext":true,"alg":"RSA-OAEP-256","kty":"RSA","n":"9SHR_b6xqNROoH78sF_REygJALD2cQhlaIEfMRQ4c2CXYqeWzCyCrQz-dJLL7LK62B4cza8Sl2Lxf6TTaqZ8iTKbGFYKqOZxJNuZ71FAXgk0o6ld6fme83_JTYDJBUVzaliqTyd05pedzBHVQnk4Bv_tV6145P5WE6_Nbk3v4POzGsAGFNtRGDEp6pmNzu5GRqEGPVC9Tu4HaUY2_NRNifkZ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gs-rw4YzfXUp9RawZ6KND7tw1FXs1QW__-jbRTl70FWz7bAe2ji1kbhO1TRzs7bV4MvQ13p1pZdbpsbGQJcr8Fs","qi":"aFfxe93h8HvWOf-_CVtHcSfr4lZ5RahJKC9xXWVsWPsCptiCZ6r8jTaQRf8FwluST7RMRTOxmMjP9XuoxZVS6aitxx4akpTQJx3g9QZh5vItdcv0KmDbr-PZZ0x8gDYmUsHEsEdU7fpqr_WcRyirct6jQDX9ZQXPAstYDfXHy_c"}}

Processing: Imports the supplied private JWK, decrypts the Base64 ciphertext using RSA-OAEP/SHA-256, and returns UTF-8 plaintext. This public test key must not protect real secrets.

Illustrative output:

{ "algorithm": "RSA-OAEP-SHA256", "operation": "decrypt", "plaintext": "CZOA Secret Payload 2026" }

Security parameters & input constraints

The UTF-8 plaintext limit is RSA modulus bytes minus 66 for SHA-256 OAEP; larger input is rejected. The page does not create keys, transport ciphertext or secure the exposed private JWK. Invalid keys or ciphertext cause Web Crypto errors.

Cryptographic digests, encoded strings, and signatures generated by RSA Encrypt & Decrypt Tool should be verified against target authentication systems before production use.

Client-side Web Crypto boundary

Key derivation, hashing, and encoding in RSA Encrypt & Decrypt Tool execute in local memory using Web Crypto APIs without remote socket transmission.

Cryptographic specifications & RFC standards

Technical specifications and cryptographic RFC standards governing algorithms and key representations:

RSA Encrypt & Decrypt Tool verification · Audit standards

How to use it

  1. Generate an RSA-OAEP key pair first; enter JSON with operation encrypt, its publicJwk and plaintext.
  2. Run Web Crypto RSA-OAEP-SHA-256 locally and read Base64 ciphertext.
  3. For decrypt, supply operation decrypt, the matching privateJwk and ciphertext; read plaintext.

Frequently asked questions

Which operation and fields are accepted?+

`operation` defaults to `encrypt` only when missing or `null`; empty and unknown values are rejected. Encryption requires `publicJwk`; text is formed as `String(plaintext || text || "")`. Decryption requires `privateJwk` and `ciphertext`.

How do I encrypt and decrypt a message?+

Generate keys, submit `{ "operation": "encrypt", "publicJwk": { ... }, "plaintext": "abc" }`, then copy its `ciphertext` into `{ "operation": "decrypt", "privateJwk": { ... }, "ciphertext": "..." }`. The matching private key returns `abc`.

What limits RSA-OAEP plaintext?+

The tool measures UTF-8 bytes and limits plaintext to modulus bytes minus 66 for SHA-256 OAEP. It reports the calculated maximum when the text is too long.

Can I use the signing JWK to encrypt?+

No. Encryption imports an RSA-OAEP `publicJwk` or `privateJwk`. The separately generated RSASSA signing JWKs have different permitted operations.