How hartwell-labs/quantum-shield works
pqguard is a Rust CLI for post-quantum file encryption using ML-KEM-768 and AES-256-GCM. The user-facing workflow begins with CLI command dispatch: generate keypairs, encrypt for one or more recipients, decrypt with a private key, or inspect/verify files. File workflows load key material and use the cryptographic layer for encapsulation, derivation, encryption, parsing, and decryption. The excerpts show the main command routes and file operations; capabilities are represented at their implementing modules, without inferring unsampled internals.
Main entry points: encrypt.rs File encryption · main.rs Command dispatch · decrypt.rs File decryption · keygen.rs Key generation and info
Components 9
CLI
- Command dispatch
src/main.rs
Key management
- Key generation and info
src/keygen.rs - Key file access
src/keyfile.rs
File workflows
- File encryption
src/encrypt.rs - File decryption
src/decrypt.rs
Cryptography
- KEM and envelope crypto
src/crypto.rs
Other components
- CLI user
- Key files
- Encrypted files
Connections 15
- CLI user → Command dispatch: selects command
src/main.rs - Command dispatch → Key generation and info: dispatches keygen/info
src/main.rs - Command dispatch → File encryption: dispatches encrypt/verify
src/main.rs - Command dispatch → File decryption: dispatches decrypt
src/main.rs - Key generation and info → KEM and envelope crypto: generates keys
src/keygen.rs - Key generation and info → Key files: writes keypair
src/keygen.rs - Key file access → Key generation and info: re-exports loaders
src/keyfile.rs - Key file access → Key files: loads key data
- File encryption → Key file access: loads recipient keys
src/encrypt.rs - File encryption → KEM and envelope crypto: seals envelope
src/encrypt.rs - File encryption → Encrypted files: writes envelope
src/encrypt.rs - File encryption → Encrypted files: reads to verify
src/encrypt.rs - File decryption → Key file access: loads private key
src/decrypt.rs - File decryption → Encrypted files: reads envelope
src/decrypt.rs - File decryption → KEM and envelope crypto: opens envelope
src/decrypt.rs