RSA Concept Demo

EDUCATIONAL DEMONSTRATION ONLY — This demonstrates RSA with small primes (p=61, q=53) so you can follow the math by hand. Production RSA uses 2048+ bit primes and the Web Crypto API. Clearly distinguishes key generation, encryption, and decryption steps.

Privacy: this tool processes your data entirely in your browser. Nothing you paste or type is sent to the server.

Text to encrypt with RSA (each character encoded as its byte value).

Result

Enter your values and press Calculate — the result appears here.

Worked examples

Encrypt "HELLO"

  • text = HELLO

Result: Shows p, q, n, φ, e, d and the encryption/decryption process.

Frequently asked questions

Why use small primes?

Small primes make the math followable. Production RSA uses primes with 1024+ digits each, making factoring n computationally infeasible.

What is modular exponentiation?

Computing base^exponent mod modulus efficiently. This is the core operation in RSA — easy to compute, hard to reverse without the private key.

Can I use this for real encryption?

Absolutely not. Use the Web Crypto API or OpenSSL for real RSA. This demo uses tiny numbers that anyone can factor.

Copied!