Skip to content

Soumit-Santra/Cryptography-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Cryptography Tool

Python Platform Education Security

Created by Soumit Santra β€” Educational Cryptography & Cryptanalysis Tool
Β© 2026 [Soumit Santra]. All rights reserved.


⚠️ CRITICAL LEGAL & ETHICAL NOTICE

THIS TOOL IS STRICTLY FOR EDUCATIONAL AND AUTHORIZED RESEARCH ONLY!

  • DO NOT USE for illegal activities, unauthorized access, or malicious purposes
  • OBTAIN EXPLICIT PERMISSION before testing on any systems you don't own
  • CRYPTANALYSIS TOOLS are for learning purposes and authorized security research only
  • THE AUTHOR IS NOT RESPONSIBLE for misuse, damages, or illegal activities
  • SOME TECHNIQUES may be illegal in your jurisdiction - check local laws

Ethical Use Only:

  • Educational learning and understanding cryptographic concepts
  • Authorized security research and penetration testing
  • Academic coursework and research projects
  • Personal skill development in controlled environments
  • Never use against systems without explicit written permission

πŸ“š Educational Purpose

This tool is designed to help students, researchers, and security professionals understand:

  • Classical cipher mechanisms and their vulnerabilities
  • Modern cryptographic implementations
  • Cryptanalysis techniques and their limitations
  • Security analysis methodologies
  • The evolution from classical to modern cryptography

✨ Features

πŸ›οΈ Classical Ciphers

  • Caesar Cipher - Enhanced with extended character set
  • VigenΓ¨re Cipher - Polyalphabetic substitution
  • Playfair Cipher - Digraph substitution cipher
  • Rail Fence Cipher - Zigzag transposition
  • Atbash Cipher - Alphabet reversal
  • ROT13 - Simple letter rotation

πŸ”€ Encoding/Decoding

  • Base64 encoding and decoding
  • Hexadecimal conversion
  • Binary representation
  • Morse Code translation

πŸ” Modern Cryptography

  • Fernet symmetric encryption (AES-based)
  • RSA asymmetric encryption
  • Elliptic Curve Cryptography (ECC)
  • Digital Signatures (RSA/ECDSA)
  • HMAC (Message Authentication Code)
  • Password-based Encryption (PBKDF2)

πŸ” Analysis Tools

  • Frequency Analysis with visualization
  • Language Detection using statistical methods
  • Chi-squared Analysis for cipher identification
  • Entropy Analysis for randomness testing
  • N-gram Analysis for pattern recognition
  • Index of Coincidence calculations

πŸ› οΈ Cryptanalysis (Educational)

  • Caesar Brute Force with language scoring
  • VigenΓ¨re Key Length estimation
  • Kasiski Examination for repeated sequences
  • Statistical Cipher Identification
  • Markov Chain Analysis

πŸ•΅οΈ Steganography

  • Image Steganography (LSB method)
  • Text Steganography (whitespace encoding)
  • Audio and file format steganography (scaffolds)

πŸ›‘οΈ Advanced Features

  • Hash Functions (MD5, SHA family)
  • Key Generation utilities
  • Secure Key Storage in memory
  • Quantum-resistant algorithm scaffolds
  • Timing Attack simulation

πŸ› οΈ Requirements

  • Python 3.7+
  • pip (Python package manager)

πŸ“¦ Dependencies (requirements.txt)

pycryptodome
cryptography
requests
colorama
tqdm
Pillow
Package Version Purpose
pycryptodome β‰₯ 3.20.0 AES, RSA, PKCS1_OAEP ciphers
cryptography β‰₯ 42.0.0 Fernet, PBKDF2, ECC, ECDSA
requests β‰₯ 2.31.0 PyPI version checking at startup
colorama β‰₯ 0.4.6 Colored terminal output
tqdm β‰₯ 4.66.0 Progress bars
Pillow β‰₯ 10.0.0 Image steganography (PIL)

Note: The script also auto-installs and auto-updates all dependencies on first run β€” no manual setup needed if you prefer that.


πŸ’» Installation

⚑ Quick Start (Auto-install)

Just run the script β€” it will automatically detect, install, and update all required packages:

python crypto_tool.py

πŸ“‹ Install via requirements.txt (Recommended)

# 1. Clone the repository
git clone https://github.com/Soumit-Santra/Cryptography-Tool
cd Cryptography-Tool

# 2. (Optional) Create a virtual environment
python -m venv venv

# Activate on Windows:
venv\Scripts\activate

# Activate on macOS/Linux:
source venv/bin/activate

# 3. Install all dependencies at once
pip install -r requirements.txt

# 4. Run the tool
python crypto_tool.py

πŸ”„ Update Dependencies

To update all packages to their latest versions:

pip install -r requirements.txt --upgrade

πŸͺŸ Windows

python crypto_tool.py

Dependencies install automatically on first run.

🍎 macOS / 🐧 Linux

python3 crypto_tool.py

If you encounter permission issues:

pip install -r requirements.txt --user

🚦 Usage

Interactive Menu System

Run the script and choose from 44+ different cryptographic operations:

CLASSIC CIPHERS:
1. Caesar Cipher (Enhanced)
2. Vigenère Cipher
3. Playfair Cipher
[...]

MODERN ENCRYPTION:
19. Fernet (Encrypt/Decrypt)
20. RSA (Encrypt/Decrypt)
[...]

ANALYSIS TOOLS:
12. Frequency Analysis
13. Language Detection
[...]

Example Usage

Encrypt with Caesar Cipher:

Choose option: 1
Encrypt or Decrypt? (e/d): e
Enter text: Hello World
Enter shift value: 3
Encrypted: Khoor Zruog

Frequency Analysis:

Choose option: 12
Enter text for frequency analysis: HELLO WORLD
[Displays frequency histogram]

RSA Key Generation:

Choose option: 21
Enter key size (default 2048): 2048
[Generates and displays RSA key pair]

πŸ“Š Educational Examples

Classical Cipher Breaking

Learn how classical ciphers can be broken:

  • Use frequency analysis to identify substitution patterns
  • Apply statistical methods to determine cipher types
  • Understand the importance of key length in security

Modern Cryptography

Explore secure implementations:

  • Generate proper cryptographic keys
  • Understand the difference between symmetric and asymmetric encryption
  • Learn about digital signatures and authentication

Cryptanalysis Techniques

Educational cryptanalysis methods:

  • Kasiski examination for VigenΓ¨re ciphers
  • Statistical analysis for cipher identification
  • Entropy testing for randomness assessment

πŸŽ“ Learning Objectives

This tool helps users understand:

  1. Historical Cryptography - Why classical ciphers are vulnerable
  2. Modern Security - How current systems protect data
  3. Cryptanalysis - Methods for analyzing unknown ciphers
  4. Implementation - Proper use of cryptographic libraries
  5. Security Principles - Best practices in cryptographic design

βš–οΈ Legal Considerations

Allowed Uses

  • βœ… Educational learning and coursework
  • βœ… Authorized security research
  • βœ… Academic research projects
  • βœ… Personal skill development
  • βœ… Penetration testing with written permission

Prohibited Uses

  • ❌ Unauthorized system access
  • ❌ Breaking encryption without permission
  • ❌ Illegal surveillance or espionage
  • ❌ Academic dishonesty or cheating
  • ❌ Any malicious or harmful activities

πŸ”’ Security Notes

  • Keys are stored in memory only during execution
  • No persistent key storage by default
  • Educational implementations may not be production-ready
  • Some algorithms are deprecated (MD5, etc.) - included for learning only
  • Use production libraries for real applications

🚨 Responsible Disclosure

If you discover vulnerabilities in the educational implementations:

  1. Do not exploit them maliciously
  2. Document the issue responsibly
  3. Use findings for educational purposes only
  4. Consider contributing improvements

🀝 Contributing

Contributions welcome for:

  • Educational improvements
  • Additional cipher implementations
  • Better documentation
  • Security enhancements
  • Bug fixes

Please ensure all contributions maintain the educational focus and ethical guidelines.


πŸ“š Further Reading

Recommended Resources:

  • "Applied Cryptography" by Bruce Schneier
  • "Cryptography Engineering" by Ferguson, Schneier, and Kohno
  • "The Code Book" by Simon Singh
  • NIST Cryptographic Standards
  • Academic cryptography courses

⚠️ Final Warning

This tool contains powerful cryptanalysis capabilities. Use them responsibly:

  • Never attempt to break encryption without explicit authorization
  • Respect privacy and legal boundaries
  • Use knowledge gained for constructive purposes
  • Remember that unauthorized access is illegal in most jurisdictions
  • When in doubt, don't use the tool

The power to understand cryptography comes with the responsibility to use that knowledge ethically.


πŸ“„ License

This educational tool is provided for learning purposes. Users are responsible for ensuring their use complies with applicable laws and ethical standards.


"Knowledge is power, but with power comes responsibility. Use cryptographic knowledge to protect, not to harm."

About

All-in-one cryptography and cryptanalysis tool with classical ciphers, modern encryption (RSA, Fernet), hashing, steganography, and security analysis features.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages