Skip to content

GeminoLibi/crypt-tick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” crypt-tick

crypt-tick Logo

A Bespoke Multi-Layer Cryptographic Tool

Encrypting data through multiple layers with random salts and encrypted decryption keys

Python Cryptography License


๐Ÿš€ What is crypt-tick?

crypt-tick is a sophisticated cryptographic tool that applies multiple layers of encryption to your data using randomly selected methods and randomly generated salts. The unique feature is that it creates an encrypted decryption key that contains all the instructions needed to decrypt your data, but the key itself is encrypted!

Think of it as a cryptographic onion ๐Ÿง… - each layer adds another level of security, and only with the correct password can you peel back the layers to reveal your original data.

โœจ Key Features

  • ๐Ÿ”€ Multi-Layer Encryption: Apply multiple encryption methods in sequence
  • ๐ŸŽฒ Random Method Selection: Each layer uses a randomly chosen encryption method
  • ๐Ÿง‚ Random Salt Generation: Random-length salts (8-40 bytes) for each layer
  • ๐Ÿ”‘ Encrypted Decryption Key: The key itself is encrypted and contains all instructions
  • ๐Ÿ“ String & File Support: Encrypt/decrypt both strings and files
  • ๐ŸŽจ Beautiful CLI Interface: Interactive mode with colored output
  • โšก Multiple Encryption Methods: AES-256-GCM, ChaCha20-Poly1305, Fernet, XOR-Custom, Base64, ROT13
  • ๐Ÿ›ก๏ธ Authenticated Encryption: Uses GCM and Poly1305 for integrity protection

๐Ÿ› ๏ธ Installation

Prerequisites

  • Python 3.8 or higher
  • cryptography library (optional but recommended)

Install Dependencies

pip install cryptography

Download

git clone <repository-url>
cd crypt-tick

๐ŸŽฏ Quick Start

Interactive Mode (Recommended)

python crypt-tick.py --interactive

Command Line Examples

Encrypt a string:

python crypt-tick.py --encrypt-string "Hello, World!" --password "mypassword" --methods "AES-256-GCM,XOR-Custom,Base64" --layers 3

Encrypt a file:

python crypt-tick.py --encrypt-file "secret.txt" --password "mypassword" --methods "ChaCha20-Poly1305,Fernet" --layers 5

Decrypt a string:

python crypt-tick.py --decrypt-string "encrypted_base64_data" --password "mypassword"

๐Ÿ“– How It Works

Encryption Process

  1. Input: Your data (string or file)
  2. Layer Application: Apply multiple encryption layers with random methods
  3. Salt Generation: Generate random-length salts for each layer
  4. Key Creation: Create an encrypted "instruction manual" for decryption
  5. Output: Encrypted data + encrypted decryption key

Decryption Process

  1. Key Decryption: Use password to decrypt the instruction key
  2. Instruction Reading: Parse the decryption instructions
  3. Reverse Processing: Apply decryption methods in reverse order
  4. Salt Usage: Use stored salts to derive keys
  5. Output: Original data restored

Example Encryption Flow

Original Data: "Hello, World!"
    โ†“ Layer 1: AES-256-GCM (random salt: 23 bytes)
    โ†“ Layer 2: Base64 encoding
    โ†“ Layer 3: XOR-Custom (random salt: 15 bytes)
Encrypted Data: "qqy7KdTUb/aYnIeMSJz68M2YAgE="

๐Ÿ”ง Available Encryption Methods

Method Description Security Level Availability
AES-256-GCM AES-256 in GCM mode (authenticated encryption) โญโญโญโญโญ Requires cryptography
AES-256-CBC AES-256 in CBC mode โญโญโญโญ Requires cryptography
ChaCha20-Poly1305 ChaCha20-Poly1305 authenticated encryption โญโญโญโญโญ Requires cryptography
Fernet Fernet symmetric encryption (AES-128 + HMAC) โญโญโญโญ Requires cryptography
XOR-Custom Custom XOR encryption with key expansion โญโญ Always available
Base64 Base64 encoding (obfuscation, not encryption) โญ Always available
ROT13 ROT13 cipher (Caesar cipher variant) โญ Always available

๐ŸŽฎ Interactive Mode

The interactive mode provides a user-friendly interface:

================================================================================
                                                                                
                    BESPOKE CRYPTOGRAPHIC TOOL                                 
                                                                                
              Multi-Layer Encryption with Random Salts                          
                                                                                
================================================================================

Main Menu:
1. Encrypt String
2. Encrypt File
3. Decrypt String
4. Decrypt File
5. View Available Methods
6. Exit

Interactive Features

  • Guided Encryption: Step-by-step process for encrypting data
  • Method Selection: Choose from available encryption methods
  • Layer Configuration: Set number of encryption layers (1-10)
  • File Management: Automatic file naming and organization
  • Error Handling: Clear error messages and recovery options

๐Ÿ“ File Structure

crypt-tick/
โ”œโ”€โ”€ crypt-tick.py          # Main application
โ”œโ”€โ”€ logo.jpg              # Application logo
โ””โ”€โ”€ README.md             # This file

๐Ÿ” Security Features

Key Derivation

  • PBKDF2: Uses 100,000 iterations for key derivation
  • SHA-256: Secure hash function for key derivation
  • Random Salts: Unique salt for each encryption layer

Encryption Security

  • Authenticated Encryption: GCM and Poly1305 provide integrity protection
  • Random IVs/Nonces: Fresh random values for each encryption
  • Multiple Layers: Each layer adds another level of security
  • Encrypted Instructions: Decryption key is itself encrypted

Salt Generation

  • Random Lengths: Salts are 8-40 bytes in length
  • Cryptographically Secure: Uses secrets module for randomness
  • Unique Per Layer: Each layer gets its own unique salt

๐Ÿ“‹ Command Line Options

python crypt-tick.py [OPTIONS]

Options:
  --interactive, -i           Run in interactive mode
  --encrypt-string STRING     Encrypt a string
  --decrypt-string STRING     Decrypt a string
  --encrypt-file FILE         Encrypt a file
  --decrypt-file FILE         Decrypt a file
  --password, -p PASSWORD     Password for encryption/decryption
  --methods METHODS           Comma-separated list of encryption methods
  --layers LAYERS             Number of encryption layers (default: 3)
  --output, -o OUTPUT         Output file path
  --help, -h                  Show help message

๐Ÿ’ก Usage Examples

Example 1: Encrypting a Secret Message

python crypt-tick.py --encrypt-string "My secret message" --password "secure123" --methods "AES-256-GCM,ChaCha20-Poly1305,Fernet" --layers 5

Output:

Starting encryption with 5 layers...
Layer 1/5: ChaCha20-Poly1305
Layer 2/5: Fernet
Layer 3/5: AES-256-GCM
Layer 4/5: ChaCha20-Poly1305
Layer 5/5: Fernet

Encrypted data (base64): [encrypted_data]
Decryption key: [encrypted_key_json]

Example 2: Encrypting a File

python crypt-tick.py --encrypt-file "document.pdf" --password "filepass" --methods "AES-256-GCM,XOR-Custom" --layers 3

Output:

Starting encryption with 3 layers...
Layer 1/3: XOR-Custom
Layer 2/3: AES-256-GCM
Layer 3/3: XOR-Custom

File encryption successful!
Encrypted file: document.pdf.encrypted
Decryption key: document.pdf.encrypted.key

Example 3: Interactive File Encryption

python crypt-tick.py --interactive

Then follow the prompts:

  1. Select "2. Encrypt File"
  2. Enter file path: secret.txt
  3. Enter password: mypassword
  4. Select methods: all (or specific methods)
  5. Set layers: 4

๐Ÿ” Decryption Key Structure

The encrypted decryption key contains:

{
  "key_metadata": {
    "method": "AES-256-GCM",
    "salt": "base64_encoded_salt",
    "salt_length": 35,
    "iv": "base64_encoded_iv",
    "iv_length": 28,
    "key_length": 32,
    "timestamp": "2025-10-11T11:37:07.052704"
  },
  "encrypted_instructions": "encrypted_json_with_decryption_steps"
}

The encrypted_instructions contains the full decryption recipe:

  • Which methods were used
  • In what order
  • What salts were used
  • All metadata needed for decryption

โš ๏ธ Important Security Notes

  1. Password Security: Choose strong, unique passwords
  2. Key Storage: Keep your decryption keys secure
  3. Backup: Always backup your encrypted data and keys
  4. Testing: Test decryption before deleting original files
  5. Method Selection: Use strong encryption methods for sensitive data

๐Ÿ› Troubleshooting

Common Issues

"Encryption method not available"

  • Install cryptography: pip install cryptography

"Decryption failed"

  • Check password correctness
  • Verify decryption key integrity
  • Ensure all required methods are available

"File not found"

  • Check file paths
  • Ensure files exist and are readable

Debug Mode

For verbose output, you can modify the script to add debug logging.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit:

  • Bug reports
  • Feature requests
  • Code improvements
  • Documentation updates

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Built with Python's cryptography library
  • Uses secrets module for secure random generation
  • Inspired by the concept of cryptographic onions

Made with ๐Ÿ” by crypt-tick

Encrypting the world, one layer at a time

About

Crytographic Suite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages