A command-line Python script that implements the classic Caesar and Vigenère ciphers. It's a straightforward, interactive tool for encrypting, decrypting, and exploring how to crack historical encryption techniques.
- Caesar Cipher (Encrypt/Decrypt): Shift letters by a specific key to create ciphertext or reverse it to read hidden text.
- Vigenère Cipher (Encrypt/Decrypt): Use a keyword to apply multiple Caesar ciphers, making it much harder to crack.
- Brute Force Attack: Try all 25 possible Caesar shifts. The script automatically flags outputs that contain common English words.
- Frequency Analysis: Analyze the letter frequency of a text and visualize it with a bar chart to help crack substitution ciphers.
- Strength Report: Analyzes the length, shift value, and symbol usage of your message to provide a basic security rating.
- Additional Tools: Random Key Encrypt, ROT13, Shift Comparison, and File Encryption capabilities.
You'll need Python installed to run the script. No external dependencies are required.
- Clone or download the repository.
- Open your terminal and navigate to the project folder.
- Run the script:
python cipher.pyWhen you start the tool, you'll see an interactive menu:
ββββββββββββββββββββββββββββββββββββ
β CIPHER TOOLKIT β
β βββββββββββββββββββββββββββββββββββ£
β 1 Β· Encrypt Caesar β
β 2 Β· Decrypt Caesar β
β 3 Β· Brute Force Attack β
β 4 Β· Strength Report β
β 5 Β· Frequency Analysis β
β 6 Β· Random Key Encrypt β
β 7 Β· ROT13 β
β 8 Β· Compare All Shifts β
β 9 Β· Vigenere Encrypt β
β 10 Β· Vigenere Decrypt β
β 11 Β· Encrypt File β
β 12 Β· About Cipher β
β q Β· Quit β
ββββββββββββββββββββββββββββββββββββ
Select an option by typing the corresponding number or letter.
- When prompted for a shift value, enter a number between 1 and 25. Invalid inputs will default to a shift of 3.
- The brute-force option outputs all possible combinations and marks readable English results with a
β readable?tag.
The Caesar cipher is historically significant but computationally trivial to crack today. It is essentially a toy cipher and takes less than a millisecond for a computer to break.
Do not use this for actual security. For real-world applications, rely on modern standards like AES for encryption and algorithms like bcrypt or Argon2 for password hashing.