Commit Graph

6 Commits

Author SHA1 Message Date
mnovak abcc375741 fix: AppContext::new is a const fn over a &'static label (QA S-09)
A label is one fixed string per purpose; taking any runtime bytes let a
consumer derive it from a peer name, a file name or a message field, and
two purposes could then collide. AppContext::new now takes
&'static [u8] and is a const fn, so contexts are built as consts and a bad
label fails the consumer's build; there is no runtime constructor (the
simplest API: one constructor, no escape hatch until a need appears).

Tests: a const OK and a const EMPTY context; sig_hygiene refuses a
consumer that passes a runtime Vec (E0597/E0716); the one test that needs
runtime labels (flipping label bytes) leaks them on purpose. The random
labels in sig_malformed and fuzz mode 5's AppContext part are dropped (the
raw-ctx part of mode 5 stays). A doctest shows the const pattern, and
docs/02_signatures.md says so.
2026-11-26 03:45:39 +01:00
mnovak d56ee10f0d docs: HANDOVER for v0.2.0, the as-built notes and the answered verify_strict gap
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.
2026-11-25 13:46:43 +01:00
mnovak c7294612ae docs: v0.2.0 design, hybrid signatures ML-DSA-65 + Ed25519 per RFC 10073
Mark decided on 2026-11-25 to add post-quantum signatures before Day 3, so
exchanged X-Wing keys can be authenticated post-quantum. The construction is
RFC 10073 id-MLDSA65-Ed25519-SHA512, byte for byte, on ml-dsa =0.1.2 and
ed25519-dalek =3.0.0. Covers the crate choices and the API traps (the crate's
Signer/Verifier traits use an empty context and sign deterministically), the
Arcanum contexts, a key-binding helper, the eight mandatory tests with their
vector sources (ACVP after the 2026-07-31 sigVer correction, Wycheproof, the
RFC's Appendix E), risks and gaps. Tests and code follow.
2026-11-25 11:10:31 +01:00
mnovak 96086be4b3 docs: R2-01 to R2-05 decisions, canonical pk_X, and rules for Arcanum's consumers 2026-11-25 08:37:11 +01:00
mnovak e0c6d53a99 docs: record D-QA-1, the mutual exchange (A-15), the hazmat gate (A-35) and the corrected ml-kem fact 2026-11-25 07:47:46 +01:00
mnovak ed9b8a3b17 docs: Day 1 analysis (X-Wing draft -11, key schedule, PSK rotation) and threat model 2026-11-25 07:23:10 +01:00