Suites
A suite fixes every algorithm for a key and for the bytes it produces. The suite id travels inside each envelope and signature, so there is no negotiation and no downgrade.
01Suites at a glance
| Suite | Seal | Sign | Pick it when |
|---|---|---|---|
PQL-DEFAULT | X-Wing (ML-KEM-768 + X25519), AES-256-GCM | ML-DSA-65 + Ed25519 | Almost always |
PQL-HIGH | ML-KEM-1024 + P-384, AES-256-GCM, SHA-384 KDF | ML-DSA-87 + ECDSA P-384 | NIST category 5 with a classical half, or P-384 for compliance |
PQL-CNSA | ML-KEM-1024, AES-256-GCM, SHA-384 KDF | ML-DSA-87 | CNSA 2.0: post-quantum only, category 5 |
PQL-LEGACY | Never | Never | Importing RSA and ECC keys read-only during migration |
02Sizes in bytes
| Suite | Seal public key | Envelope overhead | Sign public key | Signature |
|---|---|---|---|---|
PQL-DEFAULT | 1,216 | 1,195 | 1,984 | 3,388 |
PQL-HIGH | 1,665 | 1,740 | 2,689 | 4,738 |
PQL-CNSA | 1,568 | 1,643 | 2,592 | 4,642 |
Envelope overhead is fixed: a 10-byte secret and a 10 MB file both carry the same 1,195 bytes in PQL-DEFAULT. Signature sizes include the 15-byte PQLG header.
03Why hybrid
ML-KEM and ML-DSA are new. Hybrid suites combine them with a classical algorithm so that breaking the data requires breaking both: a quantum computer breaks X25519 and Ed25519, and an unexpected classical attack on lattices would need to break those too. PQL-CNSA is the exception: CNSA 2.0 requires post-quantum algorithms alone, so it has no classical fallback.
04Choosing a suite
Set the suite once for the whole application in pql.policy.yaml, or per keyset when creating it. Existing data keeps opening under its original suite, because the suite is read from the bytes.
Token keysets are PQL-DEFAULT only. Data-key records used by seal_batch, stream and rotate have a fixed size for PQL-DEFAULT, so the seal keyset behind them stays on PQL-DEFAULT until a later record format.
pqlock v0.1.0 · unaudited preview · source of truth: spec/