Encryption & Ciphers
Explore classical and modern encryption methods with step-by-step working. Covers everything on the GCSE and A-Level specs.
Caesar Cipher
Caesar cipher: Each letter is shifted by a fixed number of positions in the alphabet. A shift of 13 is called ROT-13. Non-alphabet characters are left unchanged. It is a symmetric cipher; the same key decrypts as encrypts (use shift 26-n to decrypt).
Output
-
Letter Mapping
Run to see mapping.
Vigenère Cipher
Vigenère cipher: Each letter is shifted by the corresponding letter of a repeating key. Much harder to crack than Caesar since different letters can encrypt to the same ciphertext letter. Key is repeated to match the message length.
Output
-
Step-by-Step Working
Run to see working.
Vernam Cipher (One-Time Pad)
Vernam cipher: Each letter is XORed with the corresponding key letter. The key must be: the same length as the message, truly random, and used only once. It is theoretically unbreakable; without the key, every plaintext is equally likely.
Output
-
XOR Working (bit by bit)
Run to see XOR table.
RSA Key Generation
RSA uses small primes here for clarity. Real RSA uses primes with hundreds of digits. The security comes from the difficulty of factoring n = p×q.
Select p and q to begin.