HANDOVER: the builder's counts (121 tests in debug and release, clippy, fmt, the zeroize probe, deny, audit, a 605 s fuzz run with no crash), seven mutation checks, the vector sources, and what is not verified. docs/02_signatures.md: an "As built" section (the raw interface stays hedged, the canonical Ed25519 key check, label lengths, the order of the binding checks, crate features); the gap on verify_strict is answered (it accepts both RFC 10073 vectors and agrees with all 151 Wycheproof verdicts), and the subsets and stack copies are listed as gaps. The app context prefix in the AppContext paragraph is corrected to domi/arcanum/v2/sig/app/. README: signatures in the summary, a usage sketch, the new fuzz target.
2.1 KiB
Arcanum
Arcanum is the shared post-quantum crypto core of the Domi ecosystem. It is one small Rust crate that gives every Domi product a hybrid key exchange: ML-KEM-768 (FIPS 203) combined with X25519, so a shared secret stays safe as long as either of the two holds.
Since v0.2.0 it also signs: a hybrid ML-DSA-65 + Ed25519 signature, exactly RFC 10073
id-MLDSA65-Ed25519-SHA512, which stays unforgeable while either half holds, and a helper that
binds an X-Wing public key to its owner.
Via Domi uses it first, to derive and rotate the WireGuard pre-shared key. Canalis, Custos sealing and Tabellarius are expected to adopt it later.
- No primitive is written here. ML-KEM, X25519, ML-DSA, Ed25519, SHA-2, SHA-3, HKDF and ChaCha20-Poly1305 come from vetted RustCrypto and dalek crates.
- No I/O, no network, no clock. Randomness is passed in by the caller.
- No
unsafecode.
Use
let init = arcanum::exchange::initiate(&my_secret, &peer_public, context, &mut rng)?;
// send init.ciphertext() to the peer, which calls exchange::respond and sends back ct_ri
let session = init.finish(&ct_ri)?;
let psk = session.wireguard_psk(arcanum::epoch_at(unix_seconds)); // one exchange per 120 s epoch
let ctx = arcanum::sign::AppContext::new(b"plans")?;
let sig = signing_key.sign(plan_bytes, &ctx, &mut rng)?; // 3373 bytes
signing_key.verifying_key().verify(plan_bytes, &ctx, &sig)?; // 1984-byte public key
let binding = arcanum::sign::bind_kem_key(&signing_key, device_id, xwing_sk.public_key(), (from, until), &mut rng)?;
Checks
cargo test # KATs, binding, epochs, malformed input, golden vectors, feature graph
cargo deny check
cargo audit
cargo +nightly fuzz run --release untrusted_input -- -max_total_time=600
cargo +nightly fuzz run --release signatures -- -max_total_time=600
Not audited. Nothing here is called secure before an external audit.
The design, the risks and the threat model are in docs/.
Licence
CPAL-1.0, see LICENSE. Attribution Information (Exhibit B): "Built on Domi",
Copyright (c) 2026 Marek Novák, https://aula.marek-novak.cz.