A command-line tool implementing three classical encryption ciphers in Python.
Shift (Caesar) Cipher Each letter is shifted a fixed number of positions forward or backward in the alphabet. Non-alphabetic characters are preserved. Named after Julius Caesar, who reportedly used a shift of 3.
Substitution Cipher Each letter is replaced by a corresponding letter from a randomly shuffled alphabet permutation. Produces a more complex encryption than the shift cipher since each letter maps to a unique but unpredictable replacement.
Vigenère Cipher Uses a repeating keyword to derive a different shift value for each letter of the plaintext. Significantly harder to break than the Caesar cipher as the same letter can encrypt to different ciphertext letters depending on its position.
Run the tool from the command line:
python3 main.py
You will be prompted to:
- Choose a cipher (Shift, Substitution, or Vigenère)
- Choose to encrypt or decrypt
- Enter your text
- Enter a key (shift value or keyword depending on cipher)
=== Classical Cipher Tool ===
Choose a cipher:
1. Shift (Caesar)
2. Substitution
3. Vigenere
Enter 1, 2 or 3: 3
Encrypt or Decrypt? (e/d): e
Enter text: Hello World
Enter keyword: SECRET
Encrypted: ZINCSZBVSY
classical-ciphers-python/
├── main.py # CLI entry point
├── shift_cipher.py # Caesar/Shift cipher implementation
├── substitution_cipher.py # Substitution cipher implementation
└── vigenere_cipher.py # Vigenère cipher implementation
Python 3.x - no external dependencies.
Part of coursework for COMP2860 Cryptography, University of Leeds.