Ad Space
Math Calculators

RSA Calculator (Simplified Demo)

Generate a simplified RSA key pair from two small primes, then encrypt and decrypt a small message number.

Modulus n = p × q
Totient φ(n)
Private key d
Encrypted ciphertext
Decrypted message
Ad Space — 300×250

About the RSA Calculator (Simplified Demo)

RSA is a public-key encryption scheme based on the difficulty of factoring the product of two large primes. This simplified demo uses small primes so every step can be computed directly, illustrating the same math used in real cryptography.

Formula: n = pq · φ(n) = (p−1)(q−1) · choose e coprime to φ(n) · find d such that ed ≡ 1 (mod φ(n)) · encrypt: c = me mod n · decrypt: m = cd mod n

Real-world RSA uses primes hundreds of digits long, making factoring n computationally infeasible — this demo is for learning the mechanics only, not for securing real data.

Ad Space