🔐 Post-Quantum File Compression + Encryption (ML-KEM-1024 + AES-GCM + LZMA)
PQFileCompressAndLock is a post-quantum secure tool that performs:
-
📦 Compression (LZMA SDK)
-
🔐 Encryption (ML-KEM-1024 + AES-256-GCM)
-
🔄 Decompression + Decryption
-
✔️ Integrity Verification (SHA-256)
Designed to protect files against classical and quantum attacks.
1️⃣ High-Level Workflow
PQFileCompressAndLock works in a single step for the user, but internally it performs:
-
Compress file →
.lzma -
Generate Kyber-1024 keypair
-
Generate shared secret
-
Encrypt using AES-256-GCM
-
Package everything into a final encrypted file
Decryption performs the reverse process.
2️⃣ Main Features
📦 LZMA Super-Compression
Reduces file size before encryption.
🔐 Post-Quantum ML-KEM-1024
Key encapsulation resistant to quantum attacks.
🔑 AES-256-GCM
Authenticated encryption with integrity built-in.
🔍 Integrity Test Mode (--verify)
SHA-256 comparison of original vs restored file.
3️⃣ Folder Structure
The program automatically creates:
These are per-encryption ephemeral keys.
⚠️ They must remain next to the executable for decryption to work.
4️⃣ ⭐ Usage Summary (Very Simple)
🔐 Encrypt
🔓 Decrypt
✔️ Verify Integrity
5️⃣ Sender Instructions (Encrypting a File)
🎯 Goal: deliver a post-quantum encrypted file to the recipient.
Step 1 — Run encryption
What happens internally
-
LZMA compression
-
Key generation
-
Shared secret encapsulation
-
AES-256-GCM encryption
-
Output file saved as
secure_output.enc
Step 2 — Send file
You send only:
Nothing else.
🚫 Never send:
-
keys/kyber.prv -
keys/kyber.pub -
keys/cipher.key
These must stay local.
6️⃣ Recipient Instructions (Decrypting a File)
🎯 Goal: restore the original file.
Step 1 — Place encrypted file next to the program
Example:
Step 2 — Run decryption
The system automatically:
-
Loads Kyber keys
-
Decapsulates shared secret
-
Decrypts using AES-GCM
-
Decompresses LZMA
-
Outputs
restored.pdf
Step 3 — Optional integrity check
If identical:
7️⃣ Security Model — Very Clear for Clients
✔️ Post-quantum safe (ML-KEM-1024)
Protection even against future quantum computers.
✔️ AES-256-GCM authenticated encryption
Data confidentiality + integrity.
✔️ Keys are ephemeral per operation
Every encrypted file uses new keys and new symmetric secrets.
✔️ No password-based encryption
Your clients never need to choose passwords or manage keyfiles manually.
8️⃣ What the Sender Must Know
✔ Run encryption
✔ Send encrypted file
✔ Keep local keys untouched
✔ They never need to decrypt anything
9️⃣ What the Recipient Must Know
✔ Keep the keys/ folder safe
✔ Run decryption
✔ Use --verify if needed
✔ Keys are automatically managed
🔟 Quick Cheat Sheet (for printing)
🎉 Final Notes for the Customer
PQFileCompressAndLock provides military-grade, quantum-resistant, and fully automatic file security.