Skip to content

Python-based command-line toolkit for classical encryption and cryptanalysis, featuring modular cipher implementations and attack utilities.

License

Notifications You must be signed in to change notification settings

ShakalBhau0001/classical-crypto-cli-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—οΈ Classical-Crypto-CLI-Toolkit

Classical Cryptography Command-Line Toolkit

Classical-Crypto-CLI-Toolkit is a Python-based command-line tool for experimenting with classical ciphers and cryptanalysis.
It is designed for students, security enthusiasts, and developers who want to learn or demonstrate classical encryption techniques in a terminal environment.

All operations are local, ensuring full offline use and privacy.


πŸ–₯️ GUI Alternative

For beginners or users who prefer a graphical interface:

πŸ‘‰ A future GUI version could provide the same core features with an easy-to-use desktop interface.

Work in progress


✨ Key Principles

  1. Learning-focused – ideal for beginners exploring cryptography
  2. CLI-centric – intuitive, alias-supported commands
  3. Modular architecture – separates cipher logic from CLI interface

This toolkit is educational, yet fully functional, with each cipher and attack independently usable.


🧩 Included Modules

πŸ” Classical Ciphers

  • Caesar Cipher (caesar, c) – shift-based substitution
  • Playfair Cipher (playfair, pf) – digraph-based substitution
  • Rail Fence Cipher (rail_fence, rf, rail) – transposition cipher
  • Row Column Cipher (row_column, rc, row) – columnar transposition

πŸ§ͺ Attacks

  • Caesar Brute Force (attack c, atk c) – tries all possible shifts
  • Rail Fence Brute Force (attack rf, atk rf) – tries multiple rail numbers

πŸ“ Project Structure

classical-crypto-cli-toolkit/
β”‚
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ utils.py
β”‚   β”œβ”€β”€ ciphers/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ caesar.py
β”‚   β”‚   β”œβ”€β”€ rail_fence.py
β”‚   β”‚   β”œβ”€β”€ row_column.py
β”‚   β”‚   └── playfair.py
β”‚   └── attacks/
β”‚       β”œβ”€β”€ __init__.py
β”‚       β”œβ”€β”€ caesar_brute.py
β”‚       └── rail_fence_brute.py
β”‚
β”œβ”€β”€ cli/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ parser.py
β”‚   └── controller.py
β”‚
β”œβ”€β”€ main.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ LICENSE
└── README.md

βœ” Core logic and CLI interface are strictly separated for maintainability and learning.


πŸš€ Getting Started

1️⃣ Clone Repository

git clone https://github.com/ShakalBhau0001/classical-crypto-cli-toolkit.git
cd classical-crypto-cli-toolkit

2️⃣ Install Dependencies

pip install -r requirements.txt

3️⃣ Run Help Command

python main.py --help

πŸ§ͺ CLI Usage Examples

Syntax

python main.py <cipher> [options]
python main.py <attack> [options]

πŸ” Caesar Cipher

Encrypt

python main.py caesar -e "HELLO WORLD" -s 3
python main.py c -e "HELLO WORLD" -s 3

Decrypt

python main.py caesar -d "KHOOR ZRUOG" -s 3
python main.py c -d "KHOOR ZRUOG" -s 3

πŸ” Playfair Cipher

Encrypt

python main.py playfair -e "HELLO WORLD" -k KEYWORD
python main.py pf -e "HELLO WORLD" -k KEYWORD

Decrypt

python main.py playfair -d "GYIZSCOKCFBU" -k KEYWORD
python main.py pf -d "GYIZSCOKCFBU" -k KEYWORD

πŸ” Rail Fence Cipher

Encrypt

python main.py rail_fence -e "HELLO WORLD" -r 3
python main.py rf -e "HELLO WORLD" -r 3
python main.py rail -e "HELLO WORLD" -r 3

Decrypt

python main.py rail_fence -d "HOLELWRDLO" -r 3
python main.py rf -d "HOLELWRDLO" -r 3
python main.py rail -d "HOLELWRDLO" -r 3

πŸ” Row Column Cipher

Encrypt

python main.py row_column -e "HELLO WORLD" -k KEYWORD
python main.py rc -e "HELLO WORLD" -k KEYWORD
python main.py row -e "HELLO WORLD" -k KEYWORD

Decrypt

python main.py row_column -d "OXELHROXWXLXLD" -k KEYWORD
python main.py rc -d "OXELHROXWXLXLD" -k KEYWORD
python main.py row -d "OXELHROXWXLXLD" -k KEYWORD

πŸ§ͺ Cipher Attacks

Caesar Brute Force

python main.py attack c "KHOOR ZRUOG"
python main.py atk c "KHOOR ZRUOG"

Rail Fence Brute Force

python main.py attack rf "HOLELWRDLO" --max-rails 10
python main.py atk rf "HOLELWRDLO" --max-rails 10

πŸ†˜ Help Commands

Global help

python main.py --help

Module-specific help

python main.py caesar --help
python main.py playfair --help
python main.py rail_fence --help
python main.py row_column --help
python main.py attack --help

⚠️ Important Notes

  • Modules and attacks are not flags
  • Module name must come immediately after main.py
  • Flags are case-sensitive
  • Short and long flags both supported
  • Encrypt = input β†’ output
  • Decrypt = output β†’ original input

πŸ“¦ requirements.txt

cryptography

⚠️ Security Disclaimer

This toolkit is educational and research-focused.
It uses classical ciphers and is not suitable for modern secure communication.
Handle sensitive data with caution.


πŸ›£οΈ Roadmap

  • Add GUI version for beginners
  • Batch processing support
  • Linux & macOS packaging
  • PyInstaller standalone binaries

πŸͺͺ Author

Developer: Shakal Bhau

GitHub: ShakalBhau0001


β€œClassical ciphers teach discipline before modern encryption.”

About

Python-based command-line toolkit for classical encryption and cryptanalysis, featuring modular cipher implementations and attack utilities.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages