RSA Demonstrator
Educational RSA key generation, encryption, and decryption
About this calculator
The RSA Demonstrator is an educational tool that walks through the RSA public-key cryptosystem from end to end. Pick two primes p and q; it derives the modulus n = p·q, Euler's totient φ(n) = (p−1)(q−1), a public exponent e coprime to φ(n), and the matching private exponent d = e⁻¹ mod φ(n). It then encrypts a message as c = mᵉ mod n and decrypts it back as cᵈ mod n, showing the full key pair and the round-trip. All arithmetic is exact. Useful for learning how public-key encryption, modular exponentiation, and modular inverses fit together.
How to use the RSA Demonstrator tool
- Enter or paste your input into the field.
- Read the output — it updates instantly as you type.
- Adjust the options, if any, to fit your use case.
- Copy the page URL to share the exact result.
Common examples
- p=61, q=53, e=17 → n=3233, φ=3120, d=2753; encrypt 65 → 2790, decrypt 2790 → 65
- p=11, q=13, e=7 → n=143, φ=120, d=103; encrypt 9 → 48, decrypt 48 → 9
- p=17, q=23, e=3 → n=391, φ=352, d=235; encrypt 100 → 213, decrypt 213 → 100
- p=61, q=53, e=15 → e shares the factors 3 and 5 with φ=3120, so no private key exists
- p=4 is not prime, so RSA cannot start — the modulus would not be a product of two primes
Frequently asked questions
How does the RSA Demonstrator tool work?
Enter or paste your input and the tool processes it directly in your browser, showing the result immediately. Nothing you type is uploaded to a server — the entire computation happens on your device.
When would I use the RSA Demonstrator tool?
It is handy for development, debugging, design and administration tasks — whenever you need this transformation or check done quickly without installing anything or trusting a third-party service with your data.
How reliable are the results?
The tool implements the relevant standard or specification directly, so its output matches what compliant software produces. Edge cases such as empty or malformed input are reported clearly instead of failing silently.
Can I share a specific result with someone else?
Yes. Your input updates the URL, so copying the address bar and sharing the link reopens the tool in the same state for whoever clicks it.