Public-Key encryption Demo

Step 1: Generate Keys

Press the button to generate a pair of randomly chosen keys.

Public key:   Private key:  

Step 2: Encrypt the message

Now type in a short message and enter one of the keys from above. Then press the button.

Message:   Encryption key:    

The encrypted message:

Step 3: Decrypt the message

Pretend that you have received the encrypted message over the Internet. Now enter an appropriate decryption key and press the "Decode" button.

Hint: If you used one of the two keys generated in step 1, the other key works here.

Decryption key:    

The decrypted message: