NIST FIPS 203 · 204 · ARGON2 · AES-256

The Science Behind QSafe

Technical specifications for each cryptographic primitive used in QSafe Vault, with context on the security model and design rationale.

The quantum threat in plain English

Current encryption is based on mathematical problems that are easy to check but hard to solve — like factoring enormous numbers. A classical computer would need billions of years. But quantum computers use a fundamentally different approach: superposition and entanglement allow them to explore exponentially many solutions simultaneously. Shor's Algorithm (1994) showed that quantum computers can factor large numbers and solve elliptic curve problems in polynomial time — directly breaking RSA and ECDH, the pillars of today's internet security. The solution is to use different math that quantum computers also cannot solve.

SHOR'S ALGORITHM

Breaks RSA and ECDH by factoring large integers and solving discrete logarithms exponentially faster than any classical algorithm. All current TLS/HTTPS key exchange is vulnerable.

🧮

GROVER'S ALGORITHM

Provides a quadratic speedup for searching. This halves the effective key length of symmetric ciphers — which is why AES-256 remains secure (256-bit → 128-bit effective), but AES-128 would be marginal.

🔮

HARVEST NOW, DECRYPT LATER

Adversaries collect encrypted traffic today and store it, waiting for quantum computers to arrive. Any data encrypted now with classical algorithms will eventually be readable. Protect it now.

What's inside every encrypted file

🤝
ML-KEM-768
Module Lattice Key Encapsulation · NIST FIPS 203 (2024)
KEY EXCHANGE

ML-KEM (formerly CRYSTALS-Kyber) is used to securely exchange the per-file encryption key. It works by performing key encapsulation: using your public key, a random shared secret is generated along with a ciphertext. Only your secret key can recover the shared secret from that ciphertext. This replaces ECDH — the current standard for key exchange — which is broken by quantum computers.

The security is based on the Module Learning With Errors (MLWE) problem: finding a secret vector given noisy linear equations in a polynomial ring. This problem is believed to be hard for both classical and quantum computers — it has no known polynomial-time quantum algorithm.

The safe analogy: Imagine you can give anyone a special open padlock (your public key). They put a secret message inside, snap the padlock shut, and send it back. Only you have the key to open it. Even if someone watches the entire process and has a quantum computer, they cannot open the padlock without your private key.
Security Level
192-bit (quantum)
Public Key
1,184 bytes
Secret Key
2,400 bytes
Ciphertext
1,088 bytes
Standard
NIST FIPS 203
Basis
Lattice / MLWE
✍️
ML-DSA-65
Module Lattice Digital Signature · NIST FIPS 204 (2024)
SIGNATURES

ML-DSA (formerly CRYSTALS-Dilithium) creates a digital signature over the entire QSAFE container — covering the ciphertext, the encapsulated key, the policy fields, and the header. The signature proves two things: (1) the container was created by the holder of this secret key, and (2) not a single byte has been changed since it was signed. Verification happens before decryption — any tampered file fails immediately.

Security is based on the Module Short Integer Solution (MSIS) and MLWE problems. The signing procedure involves sampling polynomials and computing commitment/response pairs that reveal nothing about the secret key.

The wax seal analogy: When you seal a letter with hot wax and your signet ring, anyone can check the seal is intact and verify it's genuinely yours. If anyone breaks the seal (tampers with the file), the seal shatters — the broken seal is proof of tampering. ML-DSA is the mathematical equivalent of an unforgeable, unbreakable wax seal.
Security Level
128-bit (quantum)
Public Key
1,952 bytes
Secret Key
4,000 bytes
Signature
3,293 bytes
Standard
NIST FIPS 204
Basis
Lattice / MSIS
🔒
AES-256-GCM
Advanced Encryption Standard · Galois/Counter Mode
FILE CIPHER

AES-256-GCM is the world's most widely deployed symmetric cipher, used by governments, militaries, and all HTTPS connections. In GCM mode it provides both confidentiality (encryption) and authenticity (a 128-bit authentication tag). This means if anyone tampers with the ciphertext, decryption fails with an authentication error — even without the signature check.

The key used for AES is derived fresh for each file via HKDF-SHA-256, seeded by the ML-KEM shared secret and a random per-file salt. Even if one file's AES key were somehow compromised, it reveals nothing about any other file.

The cipher analogy: AES is like an incredibly complex Caesar cipher with 256 bits of key — 2²⁵⁶ possible combinations. Even if you could check a trillion combinations per second, trying them all would take longer than the age of the universe multiplied by itself. Grover's algorithm reduces this to 2¹²⁸, which is still astronomical.
Key Size
256 bits
IV / Nonce
96-bit random
Auth Tag
128 bits
Key Source
HKDF-SHA-256
API
Web Crypto (native)
Post-Quantum
Safe (128-bit vs Grover)
🧱
Argon2id
Password-Based Key Derivation · PHC Winner 2015
KEY DERIVATION

Argon2id converts your human-readable password into a cryptographic key. It is deliberately slow and memory-intensive: each attempt requires significant RAM and time, making brute-force password guessing extremely expensive. QSafe uses time cost 3, memory cost 64MB, parallelism 1 — meaning each password attempt takes ~0.5 seconds and 64MB of RAM on modern hardware. An attacker trying a billion passwords per second would be reduced to about 1 attempt per 0.5 seconds.

The maze analogy: Instead of storing your password (or a simple hash), we put it through a maze that takes a fixed amount of time and memory to traverse. Every guess must walk the same maze. The maze design means special hardware (GPU farms, ASICs) gets no meaningful advantage over a regular computer.
Time Cost
3 iterations
Memory Cost
64 MB
Parallelism
1 thread
Output
32 bytes (AES key)
Salt
128-bit random
Winner
PHC 2015

Ready to use the vault?