Docs / Security

Threat model

What pqlock protects, against whom, and what it deliberately leaves to the application.

01Adversaries and promises

AdversaryPromiseMechanism
Harvest now, decrypt laterSealed data stays confidentialML-KEM in every suite; hybrid suites hold if either half holds
Network or storage attacker who flips, truncates, splices or replays bytesNo plaintext from a modified envelope, no oracleHeader as AAD and in the KDF, commitment checked in constant time before decryption, one error type
Multi-key attackerA ciphertext cannot open under two keys32-byte key commitment
Forger, classical or quantumNo valid signature, token or audit entry without the keyComposite signatures, both halves always verified
Downgrade attackerCannot select a weaker suite or algorithmNo negotiation: the suite comes from the bytes and must match the key; tokens accept only ML-DSA-65
Malformed inputNo crash, hang or undocumented exceptionStrict parsers, fuzzed on every build
Local timing observerpqlock's own compare and parse paths do not leak secretsConstant-time commitment compare, branch-free base64url check, measured every build

02Out of scope

03Known residual risks

04How it is tested

CheckScope
Spec vectors148 vectors, byte for byte, in all three SDKs
Cross-language matrix54 of 54 pairs: seal or sign in one SDK, open or verify in each other
NIST ACVPKnown-answer tests through each engine
FuzzingEvery parser, every build
Timingdudect-style tests on pqlock's compare and parse paths
End to end8 real applications deployed and run on every change

pqlock v0.1.0 · unaudited preview · source of truth: spec/