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.
-
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 FileOutput File → Huffman Decoding → Enigma Decryption → Original File
- Language: Java
- Core Concepts: Cryptography, Data Structures, Compression
- Algorithms: Enigma Machine Simulation, Huffman Encoding
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
javac EnigmaHuffman.javajava EnigmaHuffman encrypt-and-encode <input file> <output file>java EnigmaHuffman decrypt-and-decode <input file> <output file>- 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
+-------------------+
