Files
arcanum/HANDOVER.md
T

4.3 KiB
Raw Blame History

Handover — Arcanum

Newest entry first. Where this file and the code disagree, the code wins and the next entry says so.

2026-11-25 — v0.1.0 (owner session)

Who owns this: the Via owner session. Mark's decisions go through the orchestrator session.

Released: v0.1.0, an annotated tag on the --no-ff merge of PR #1 (feature/arcanum, head 96086be plus this file) into main. Not audited. Whether later releases must be signed through Artifex is an open question for Mark; this tag is not signed.

What it is: one #![no_std], #![forbid(unsafe_code)] crate, no I/O, no clock, randomness as a parameter.

  • xwing: X-Wing (ML-KEM-768 + X25519), draft-connolly-cfrg-xwing-kem-11, unmodified (D-QA-1), stricter in two ways invisible to honest peers: low-order X25519 inputs are NonContributory, and a public key whose X25519 half is not canonical is InvalidPublicKey (QA R2-02).
  • The raw one-way KEM is hazmat only (QA R2-01): a release consumer can parse keys and ciphertexts and generate a key pair, but cannot encapsulate, decapsulate or read an X-Wing secret.
  • exchange: the mutual exchange (QA A-15), the full transcript bound in Arcanum's HKDF-SHA-256 layer under domi/arcanum/v1/... labels, Session::wireguard_psk(epoch); RECOMMENDED_EPOCH_SECONDS = 120.
  • seal: a one-shot sealed box, 1137 bytes of overhead, no sender authentication, not HPKE.
  • expand takes exactly one label and one fixed-width field (QA R2-03); the v1 bytes are unchanged (tests/golden_v1.rs).
  • Every function that takes an RNG says it must be the OS RNG or a CSPRNG seeded once from it (QA R2-04).
  • Licence: CustosPublic's CPAL-1.0 text byte for byte, Exhibit A naming Arcanum, Exhibit B "Built on Domi".

Counts, run by the owner session on a fresh clone at 96086be, Windows 10, cargo 1.99.0 stable MSVC:

Run Result
cargo test (debug) 82 passed, 0 failed, 0 ignored
cargo test --release 82 passed, 0 failed, 0 ignored
cargo clippy --all-targets --all-features -- -D warnings clean
cargo fmt --check clean
zeroize-probe (--test-threads=1) 1 passed
cargo deny check advisories ok, bans ok, licenses ok, sources ok
cargo audit 55 crates, 0 vulnerabilities
fuzz untrusted_input 631 s, 172,694 executions, 0 crashes, 0 artifacts (libFuzzer + ASan, nightly 1.102.0, Windows MSVC; coverage 1,812 edges), on 96086be

Mutation checks by the owner session (each reintroduced, seen to fail, reverted):

  • R2-02: skipping the canonical check fails qa_r2_02_non_canonical_x25519_public_key_is_refused.
  • R2-01: making encapsulate and SharedSecret::as_bytes public again fails qa_r2_01_raw_shared_secret_is_not_reachable_without_hazmat. Ungating as_bytes alone does not fail it, correctly: no release function produces a SharedSecret then. The test reaches the secret only through encapsulate, not decapsulate (a minor gap).

For consumers (via, via-core, Canalis, Custos, Tabellarius): depend by git tag, never by path; never enable arcanum/hazmat outside tests, and repeat tests/feature_hygiene.rs's cargo tree check in CI; ban a direct ml-kem dependency in deny.toml (its encapsulate_deterministic is public); pass the OS RNG and grep for from_seed( outside tests/.

Carried to Day 3 (recorded, not Arcanum bugs): no forward secrecy against later theft of both static secret keys (a fresh exchange with an ephemeral key pair per epoch); no key-confirmation message; epoch state and the replay window (A-12, A-13) live in the engine; Initiation<'a> borrows the secret key, which may need an owned variant in async code (a 0.x API change).

Not verified: constant time (QA A-32, dudect, belongs in the Day 7 audit pack on a quiet Linux box); anything on Linux; FIPS 203 from the NIST PDF; RFC 7748's 1,000,000-iteration vector; interop with a non-Rust X-Wing. There is no CI: every number here was run by hand.

2026-11-25 — Day 1 built (builder), reviewed twice (QA)

The builder's PR (67 tests, 661 s of fuzzing) and two QA reviews: the first QA attack plan (Via/qa/01_arcanum_attacks.md), and the second review (Via/qa/review-arcanum-pr1.md, findings R2-01 to R2-05, comments #49902–#49909), answered in 6780abc and 96086be (replies #49927–#49931, summary #49951).