A Python cryptography tool that encrypts, decrypts, and brute force cracks Caesar Cipher messages — delivered with commentary from Gandalf the Grey. Built as part of a cybersecurity learning journey.
One of the oldest encryption techniques in history — used by Julius Caesar himself to send secret military messages. Every letter in a message is shifted by a fixed number of positions in the alphabet.
Example with shift of 3: A → D B → E Hello → Khoor
To decrypt, simply shift back by the same number. The shift value is the "key."
| Feature | Description |
|---|---|
| Encrypt | Convert any message into cipher text using a shift key |
| Decrypt | Reverse a cipher text back to the original message |
| Brute Force | Try all 25 possible shifts to crack an unknown cipher |
| Gandalf Mode | In-character reactions from Gandalf for every operation |
python caesarcipher.pyThen choose from the menu:
- Encrypt a message
- Decrypt a message
- Brute force crack a message
- Quit
- ASCII values — how computers store characters as numbers (
ord()andchr()) - Modulo arithmetic — how the alphabet wraps around using
% 26 - Brute force attacks — why limited keyspaces are dangerous
- Encryption vs Decryption — two sides of the same mathematical operation
- Why Caesar Cipher is insecure — only 25 possible keys, crackable instantly
Caesar Cipher is not secure by modern standards — a computer can brute force all 25 possible keys in milliseconds. Modern encryption like AES-256 has 2²⁵⁶ possible keys — more than the number of atoms in the observable universe.
Understanding weak encryption helps you understand why strong encryption matters.
Ryan — github.com/Patharx
"Keep your secrets well, and trust them only to the worthy." 🧙