Commit Graph

4 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 ddda8415eb test: fuzz target for the signature API (mandatory test 6)
fuzz/fuzz_targets/signatures.rs: raw bytes into VerifyingKey, Signature,
SigningKey and AppContext; and the input XORed into a valid verifying key,
signature, message, raw ctx, key-binding id/window/time, X-Wing key and
binding signature. Beyond "never panics" it asserts that only the exact
signed bytes verify.

Run on 5a52854 plus this target, Windows 10, nightly 1.102.0
(739adecd4 2026-11-24), libFuzzer + ASan (MSVC 14.44 asan runtime),
corpus and artifacts on D:, 12 seed inputs: 605 s, 38,609 executions,
63 exec/s, 0 crashes, 0 artifacts, coverage 3,549, 122 corpus units.
2026-11-25 13:33:53 +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 c7d050ed65 test: the six mandatory tests, pinned KAT vectors, fuzz target and cargo-deny config (written before the code) 2026-11-25 07:28:48 +01:00