Alice sends. Bob receives.
First choose symmetric or asymmetric encryption above. We will prepare the keys, write a readable message, lock it into encrypted code, and then ask Bob for the key to unlock it.
Choose a demonstration to explore together. Each tool opens in a focused classroom view.
More classroom tools can be added here as the collection grows.
Turn a message into a mystery. Explore the keys that lock it — and discover who can unlock it.
Alice and Bob each need a copy of the same secret key. Anyone who has that key can encrypt and decrypt their messages.
First choose symmetric or asymmetric encryption above. We will prepare the keys, write a readable message, lock it into encrypted code, and then ask Bob for the key to unlock it.
Share this key privately with your recipient.
Copy the decryption key for later. These are classroom keys; refreshing or changing method clears them.
Plaintext is the original, readable message.
The encryption key is always shown above. Press Encrypt to transform this message into encrypted code.
This is what travels to Bob. It hides the readable message. You can also paste an encrypted code from this lab.
The field starts empty. Paste your saved key, or use a demo key to see what happens.
Go back and decrypt the code with a valid key to reveal the message.
Sending the key beside the encrypted message defeats the purpose. Symmetric encryption is fast, but both people need a secure way to obtain the shared key.
Randomness makes each encryption different. A failed decryption does not reveal the original message.
| Symmetric | Asymmetric | |
|---|---|---|
| Keys | One shared secret | A public/private pair |
| Encrypt with | Shared key | Recipient’s public key |
| Decrypt with | Same shared key | Recipient’s private key |
| In this lab | AES-GCM, 256 bits | RSA-OAEP, 2048 bits, SHA-256 |
| Typical role | Encrypting message data | Protecting small secrets such as session keys |
Real systems often combine both methods: asymmetric cryptography establishes or protects a symmetric session key. Encryption provides confidentiality; it does not by itself prove who sent a message. Base64 is a display encoding, not encryption.
Explore the browser’s Web Crypto API ↗