Skip to content

Krish290107/Cipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Cipher Toolkit

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.

Features

  • 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.

Usage

You'll need Python installed to run the script. No external dependencies are required.

  1. Clone or download the repository.
  2. Open your terminal and navigate to the project folder.
  3. Run the script:
python cipher.py

When 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.

Security Note

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.

About

An interactive Python command-line utility for exploring the Caesar cipherβ€”features encryption, decryption, brute-force cracking, and message strength analysis! πŸ›‘οΈβœ¨

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages