πŸ›‘οΈΒ Encrypted Storage for Key Folders & Sensitive Artifacts

PQVault is a post-quantum-oriented secure repository designed to store, index, and extract sensitive files such as:

  • ML-KEM / Dilithium keypairs

  • Certificates

  • License files

  • Secret configuration folders

  • Encrypted backups

  • Any security-critical directory the client needs to preserve

The system packs all content into a single file:

Β 
vault.pqv

with integrity verification using CRC32.


1️⃣ What PQVault Is (Explained Simply)

PQVault behaves like a mini secure archive that stores directories containing key files.
It is meant for:

  • Backup of cryptographic keys

  • Secure exporting of a key directory

  • Emergency restoration

  • Offline archival

  • Audit logging of key evolution

Think of it as a quantum-age vault, but simple enough for any professional to use.


2️⃣ What PQVault Stores

When the client runs add <dir>, PQVault stores:

  • ⏰ Timestamp

  • πŸ“ Original directory name

  • πŸ“„ Each file name

  • πŸ“ File size

  • πŸ” CRC32 integrity checksum

  • πŸ’Ύ Raw file contents

Everything is saved inside:

Β 
vault.pqv

Multiple directories can be appended sequentially.


3️⃣ Command Summary (Very Simple)

βž• Add a directory

Β 
PQVault add <folder_with_keys>

πŸ“œ List all stored entries

Β 
PQVault list

πŸ“€ Extract a single file

Β 
PQVault extract <filename>

Extraction restores the file into:

Β 
restore/

4️⃣ How the Client Should Use PQVault

Below is the workflow designed for real-world usage.


🟦 A. Adding Key Folders to the Vault

1. Select the directory you want to store

Example:

Β 
keys/ β”œβ”€ kyber.pub β”œβ”€ kyber.prv β”œβ”€ dilithium.pub β”œβ”€ dilithium.prv

2. Run the add command

Β 
PQVault add keys

3. PQVault will:

  • Read all files

  • Compute CRC32 for each

  • Store metadata + raw file bytes into vault.pqv

  • Append a new vault entry (the vault supports multiple entries)

Output shown to the user:

Β 
[PQVault] Directory added: keys [PQVault] Timestamp: 2025-11-13 10:27:54 [PQVault] Total stored bytes: 4096

🟩 B. Listing What’s Inside the Vault

To check which directories or backups were previously added:

Β 
PQVault list

Example output:

Β 
2025-11-12 08:31:22 | keys_backup 2025-11-13 10:27:54 | keys

Each line displays:

  • Timestamp

  • Origin directory name

This is essential for audit logs and forensic tracking.


πŸŸ₯ C. Extracting a File from the Vault

If the client loses a key and needs to restore it:

1. Run the extract command

Β 
PQVault extract kyber.prv

2. PQVault will:

  • Search for kyber.prv inside vault.pqv

  • Restore it into a folder named:

Β 
restore/

3. Output example:

Β 
[PQVault] Extracted to restore/kyber.prv (2400 bytes)

If the file does not exist:

Β 
[PQVault] File kyber.prv not found in vault.

5️⃣ What PQVault Does Not Do

To avoid confusion:

🚫 PQVault is not an encryption system
🚫 PQVault does not replace PQCypher
🚫 PQVault does not decrypt or encrypt files

It is an offline archive with integrity verification, not a cryptographic cipher.

If the client needs encryption β†’ use PQCypher or PQFileCompressAndLock.
PQVault = storage only.


6️⃣ Best Practices for Clients

βœ”οΈ Keep vault.pqv in multiple secure locations

Preferably:

  • Offline USB

  • Cloud encrypted folder

  • Company backup server

βœ”οΈ Archive keys after each major change

Ex:

Β 
PQVault add keys_v2 PQVault add keys_after_license_change

βœ”οΈ Do not modify vault.pqv manually

It is a binary file with defined structure. Alterations break CRC verification.

βœ”οΈ Use meaningful directory names

Clients should name folders clearly before adding them.


7️⃣ Quick Example Scenario (Realistic)

🎯 Goal: A company wants to back up their PQCypher key directory.

  1. They organize their keys in a folder:

Β 
keys_prod_2025/
  1. They execute:

Β 
PQVault add keys_prod_2025
  1. Months later, they lose dilithium.prv.

  2. They restore with:

Β 
PQVault extract dilithium.prv
  1. File reappears safely under:

Β 
restore/dilithium.prv

πŸŽ‰ Final Client Notes

PQVault is designed for security teams, IT administrators, and engineers who must keep critical files preserved with integrity assurance.

Its simplicity is intentional:

  • no dependencies

  • no external libraries

  • works offline

  • zero configuration