Skip to content

deluxe-wizard-seven/crypto-compress-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 Crypto-Compress Pipeline (Enigma-Huffman Secure Encoder)

A two-stage file security system that combines Enigma machine–style encryption with Huffman encoding–based compression.
This project demonstrates pipelined encryption + compression to ensure both data security and storage efficiency.

🚀 Features

  • Enigma Machine Simulation
    Encrypts files with configurable Enigma-style rotor and reflector keys.

  • Huffman Encoder/Decoder
    Compresses encrypted data into a minimal-size representation and restores it back.

  • Decryption & Decompression
    Users can supply the correct Enigma key along with compressed data to fully restore the original file.

  • Pipeline Workflow

    • Input File → Enigma Encryption → Huffman Encoding → Output File
    • Output File → Huffman Decoding → Enigma Decryption → Original File

🛠️ Tech Stack

  • Language: Java
  • Core Concepts: Cryptography, Data Structures, Compression
  • Algorithms: Enigma Machine Simulation, Huffman Encoding

📂 Project Structure

crypto-compress-pipeline/
├── compression/
│   ├── HuffmanEncoderDecoder.java
│   ├── HuffmanTreeBaseNode.java
│   ├── HuffmanTreeInternalNode.java
│   ├── HuffmanTree.java
│   └── HuffmanTreeLeafNode.java
├── encryption/
│   ├── Cipher.java
│   ├── EnigmaMachine.java
│   └── Plain.java
├── EnigmaHuffman.java
├── README.md
└── screenshots/
    └── 1.png

📖 Compilation and Usage

1️⃣ Compilation

javac EnigmaHuffman.java

2️⃣ Encrypt + Compress

java EnigmaHuffman encrypt-and-encode <input file> <output file>

3️⃣ Decompress + Decrypt

java EnigmaHuffman decrypt-and-decode <input file> <output file>

🔄 Pipeline Diagram

  • Encryption & Encoding:
                +------------------+
Input File ---> |   Enigma Cipher  | ---> Encrypted Data
                +------------------+
                          |
                          v
                +------------------+
                |  Huffman Encoder | ---> Compressed Output
                +------------------+
  • Decryption & Decompression:
                    +-------------------+
Compressed File --->|  Huffman Decoder  | ---> Encrypted Data
                    +-------------------+
                             |
                             v
                   +-------------------+
                   |   Enigma Decipher | ---> Restored File
                   +-------------------+

📷 Screenshots

1.png