RSA Interactive

Here you can create small public/private keys and use them to encrypt and decrypt messages for learning purposes.

It is fun to use but isn't very secure*. See RSA Cryptography for more details.

images/rsa.js

Try This Quick Experiment:

  1. Choose Primes: Pick two small prime numbers (for example, 11 and 17)
  2. Write a Message: Type a short word in the message box. Notice how it gets converted into numbers!
  3. Encrypt: Use your Public Key to scramble the message. It is now secure!
  4. Decrypt: Use your Private Key to unscramble it back to the original message

*How secure is this?

Not very!

If someone knows the public key, such as "7,187", then all they have to do is find the prime factors of 187 (which are 11 and 17) and they have enough information to find the private key.

In practice that "187" number is very large (100s of digits) and so very hard to find its prime factors.