Skip to content

Latest commit

Β 

History

History
127 lines (94 loc) Β· 3.39 KB

File metadata and controls

127 lines (94 loc) Β· 3.39 KB

πŸ” Cryptography Algorithm Toolkit

A beginner-friendly, real-time Python project that demonstrates core concepts of modern cryptography using AES (symmetric encryption), RSA (asymmetric encryption),SHA256 (hashing) and Enky (custom XOR-based encryption). Designed to simulate real-world use cases like secure messaging, file encryption, and password hashing.


πŸ“Œ Project Objectives

  • Implement and understand core cryptographic techniques:
    • AES for secure data encryption/decryption
    • RSA for public/private key cryptography
    • SHA256 for one-way data hashing
    • Enky for experimental key-based XOR encryption
  • Provide real-time user interaction
  • Create a modular, scalable architecture
  • Learn encryption workflow with file input/output and key handling

🧰 Technologies & Tools

  • Language: Python 3.8+
  • Libraries Used:
    • cryptography for AES & RSA
    • hashlib for SHA256
    • os, base64, json for file/key management
  • Structure: Modular folder system (/modules)
  • Optional Tools: PyCrypto, OpenSSL, tkinter (for GUI expansion)

πŸ§ͺ Features & Demonstrations

πŸ” AES (Advanced Encryption Standard)

  • Generate and save AES key
  • Encrypt user input messages
  • Decrypt saved encrypted messages
  • Use Fernet for secure symmetric encryption

πŸ”‘ RSA (Rivest–Shamir–Adleman)

  • Generate RSA key pair (public/private)
  • Encrypt a message using the public key
  • Decrypt it using the private key
  • Save/load RSA keys in .pem format

πŸ” SHA256 Hashing

  • Hash plain text securely
  • Hash any file for integrity checking
  • Compare original vs current hash for tamper detection

πŸŒ€ Enky (Custom XOR-Based Encryption)

  • Interactive menu-based encryption/decryption
  • Key-dependent XOR encryption for learning purposes
  • Supports text messages in real-time
  • Optional multi-round encryption or shuffle can be added
  • Fully reversible with the correct key
  • Ideal for experimenting with custom symmetric encryption logic

πŸ’‘ Real-Time Use Cases Simulated

Use Case Crypto Technique Used
Secure messaging AES
Digital signatures RSA
Password storage/verification SHA256
File tampering detection SHA256
Key-based access systems RSA
Experimental learning cipher Enky

πŸ§ͺ Sample Outputs

πŸ” Sample AES Output

Enter message to encrypt: Hello Aakash
Encrypted: gAAAAABo...
Decrypted: Hello Aakash

πŸ” RSA Output

Enter message to encrypt: SecretMessage
Encrypted with Public Key: b'...'
Decrypted with Private Key: SecretMessage

πŸ”SHA256 Output

Input text: AAKASH
Hash: ac98f72f...

πŸŒ€ Enky Output

Enter message to encrypt: AAKASH
Enter key: 234
Encrypted (bytes):  b'\xbagX\xc4\x87\xea'
Decrypted message: AAKASH

πŸ“Œ Future Improvements

βœ… Add GUI with Tkinter or PyQt βœ… Support file encryption/decryption βœ… Add digital signature verification βœ… Use Salted Hashing for password security βœ… Store hash-key mapping securely in a DB (e.g., SQLite) βœ… Expand Enky with multiple rounds and key-based shuffling


Requirements

pip install cryptography pycryptodome

By Aakash