Files
arcanum/docs/THREAT_MODEL.md
T

4.7 KiB
Raw Blame History

Arcanum threat model

Scope: the arcanum crate v0.1.0 — the X-Wing hybrid KEM, the key schedule, the WireGuard PSK derivation and the sealing helper. Not audited.

Assets

  1. The responder's hybrid secret key (a 32-byte seed).
  2. Each exchange's shared secret and the Session derived from it.
  3. Each epoch's WireGuard pre-shared key.
  4. The plaintext inside a sealed box.

Adversaries and what Arcanum protects against

Adversary Can do Protected? Why
Harvest now, decrypt later Records every control-channel message and WireGuard packet today; gets a large quantum computer later Yes, the main goal The PSK comes from X-Wing. Shor breaks X25519, but ML-KEM-768 is believed to resist quantum attack, and X-Wing's secret is secure if either half is. WireGuard mixes the PSK into its key schedule, so recorded traffic stays confidential.
Classical passive eavesdropper Records traffic, no quantum computer Yes Both halves hold.
A future break of ML-KEM (cryptanalysis or an implementation bug) Recovers ss_M Yes, classically X25519 still protects the secret (hybrid).
A break of X25519 Recovers ss_X Yes ML-KEM still protects it.
Active attacker who modifies ciphertexts Flips bytes in transit Detected or harmless Changed ct_M → ML-KEM implicit rejection gives an unrelated secret; changed ct_X → different ss_X; the transcript hash binds both. The peers' PSKs differ and WireGuard simply fails to handshake. Low-order X25519 values are rejected with a typed error.
Malformed or hostile input Sends wrong lengths, invalid ML-KEM keys, random bytes No panic, typed error Tests 5 and the fuzz target.
Epoch confusion Replays an old exchange for a new epoch Harmless The epoch number is in every PSK derivation; an attacker who cannot decapsulate cannot compute any epoch's PSK.

What Arcanum does NOT protect against

Not protected Why, and who has to handle it
Endpoint compromise Malware on a device reads keys and plaintext from memory. Zeroisation narrows the window; it does not close it. Keys at rest belong in Custos or Tessera.
Traffic analysis Who talks to whom, when and how much is visible on the wire. Padding and cover traffic are the Stealth transport's job (Day 7), and only partly.
Man in the middle on the public key Arcanum v1 does not authenticate. An attacker who substitutes the responder's public key learns that exchange's PSK. In Via, WireGuard's static keys still authenticate the tunnel, so the attacker gets back to classical security, not to plaintext; Via must also sign the Arcanum public key with the device's Tessera key (Day 3). Post-quantum authentication (ML-DSA) is not in v1.
A quantum attacker who is also active today Without post-quantum authentication, an active quantum attacker could impersonate a peer in real time. v1 targets the passive harvest-now threat.
Bad randomness The caller supplies the RNG. A broken RNG breaks every scheme. The _derand functions are for known-answer tests; reusing their seeds is catastrophic.
Side channels Timing and cache behaviour are those of ml-kem, x25519-dalek, sha3 and chacha20poly1305. Arcanum adds only fixed-length, data-independent glue, but has not been measured.
Reusing one session for many epochs Supported, but a leaked session reveals every epoch's PSK derived from it. Forward secrecy needs one exchange per epoch.
Denial of service An attacker on the path can always drop packets.
Legacy peers Classic WireGuard peers (routers, third-party clients) get no Arcanum PSK and are labelled "not post-quantum" by Via.

Trust assumptions

  • ML-KEM-768 is IND-CCA2 secure against quantum adversaries (FIPS 203).
  • X25519 is a secure Diffie–Hellman group against classical adversaries (RFC 7748).
  • SHA3-256, SHAKE256 and HKDF-SHA-256 behave as their standards say; X-Wing's security argument (draft-connolly-cfrg-xwing-kem-11) holds.
  • The vetted crates implement those standards correctly; the known-answer tests check the parts Arcanum uses, not everything.
  • The caller authenticates the responder's public key and supplies a cryptographically secure RNG.

Blast radius if Arcanum is wrong

Via uses Arcanum only as the WireGuard PSK. A total failure of Arcanum (for example, both peers derive a predictable PSK) reduces a Via tunnel to plain WireGuard: still authenticated and encrypted classically, but open to harvest-now-decrypt-later. It never reduces it below WireGuard. Sealing (Custos, Tabellarius) is different: there Arcanum is the only layer, which is why those migrations wait for the audit.