📘 PQFileCompressAndLock — Client Usage Guide

🔐 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:

  1. Compress file → .lzma

  2. Generate Kyber-1024 keypair

  3. Generate shared secret

  4. Encrypt using AES-256-GCM

  5. 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:

 
keys/ ├─ kyber.pub ├─ kyber.prv ├─ cipher.key

These are per-encryption ephemeral keys.

⚠️ They must remain next to the executable for decryption to work.


4️⃣ ⭐ Usage Summary (Very Simple)

🔐 Encrypt

 
PQFileCompressAndLock encrypt <input_file> <output_file>

🔓 Decrypt

 
PQFileCompressAndLock decrypt <input_file> <output_file>

✔️ Verify Integrity

 
PQFileCompressAndLock --verify <original_file> <restored_file>

5️⃣ Sender Instructions (Encrypting a File)

🎯 Goal: deliver a post-quantum encrypted file to the recipient.

Step 1 — Run encryption

 
PQFileCompressAndLock encrypt myfile.pdf secure_output.enc

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:

 
secure_output.enc

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:

 
secure_output.enc PQFileCompressAndLock.exe keys/

Step 2 — Run decryption

 
PQFileCompressAndLock decrypt secure_output.enc restored.pdf

The system automatically:

  • Loads Kyber keys

  • Decapsulates shared secret

  • Decrypts using AES-GCM

  • Decompresses LZMA

  • Outputs restored.pdf

Step 3 — Optional integrity check

 
PQFileCompressAndLock --verify myfile.pdf restored.pdf

If identical:

 
[OK] TEST PASSED :: Files are 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)

 
ENCRYPT: PQFileCompressAndLock encrypt input.txt secure.enc DECRYPT: PQFileCompressAndLock decrypt secure.enc output.txt VERIFY: PQFileCompressAndLock --verify original.txt output.txt

🎉 Final Notes for the Customer

PQFileCompressAndLock provides military-grade, quantum-resistant, and fully automatic file security.

GTranslate

The Edu

Location:
Rio de Janeiro, Brazil

Telephone:
+55(21)965 103 777

Email:
iuri@postquantumapps.com