diff --git a/HANDOVER.md b/HANDOVER.md index 6840f37..51e5e16 100644 --- a/HANDOVER.md +++ b/HANDOVER.md @@ -2,6 +2,65 @@ Newest entry first. Where this file and the code disagree, the code wins and the next entry says so. +## 2026-11-26 — v0.2.0, QA review answered (builder), still on `feature/signatures`, not merged, not tagged + +QA's review (`Via/qa/review-arcanum-pr2.md`, head `d56ee10`): no blocker, no major, 12 minors (S-01 to +S-12). Answered in `99db18a..` this entry; QA's proof tests (`qa_sig_review.rs`) ported where they pin +something, into the existing test files. + +**Fixed:** +- S-01, S-02, S-03: tests pin `verify_strict` (a small-order R in the Ed25519 half is refused), the order + of checks in `verify_binding` (a forged window outside `now` is `InvalidSignature`, never + `OutsideValidity`) and two independent seeds in `generate` (exactly 64 bytes drawn, in order). QA's + mutations now fail: Q1 `verify_strict` → `verify` fails `a_small_order_r_in_the_ed25519_half_is_refused`; + Q3 `now` checked first fails `a_forged_window_that_excludes_now_is_invalid_signature_not_outside_validity`; + Q4 the Ed25519 seed copied from the ML-DSA seed fails `generate_draws_two_independent_seeds`. +- S-05: an ML-DSA-65 key with t1 = 0 is refused as `InvalidVerifyingKey`; removing the check fails + `an_ml_dsa_key_with_zero_t1_is_refused`. +- S-09: `AppContext::new` is a `const fn` taking `&'static [u8]`, the only constructor; a consumer passing a + runtime `Vec` does not compile (`sig_hygiene`, E0597/E0716). **API change** from `d56ee10`. +- S-10: `deny.toml` bans `legacy_compatibility` on `ed25519-dalek` and `curve25519-dalek`, and + `ed25519-dalek/hazmat`; enabling either in `Cargo.toml` fails `cargo deny --offline check bans` (checked, + reverted). +- S-06: the docs no longer claim timing hides which half failed; it does not, harmlessly (public data only). + `&` became `&&`; no behaviour change. +- S-04: the zeroize probe also watches the canary key's expanded ML-DSA K and a window of encoded s1; QA's + Q15 (an unwiped `to_expanded()` copy in `SigningKey`) now fails the probe. +- S-11: stack need documented on `SigningKey`, measured with `tests/sig_stack.rs`: release overflows at + 128 KiB and fits in 256 KiB; Arcanum's debug profile overflows at 256 KiB and fits in 512 KiB. A thread + that is too small aborts the process. **Consumers that sign on small threads (worker pools, async + blocking pools, JNI): give them at least 512 KiB.** The release figure is pinned by a test (ignored in + debug). +- The expanded key moves about 35 kB (34,992 B) through the stack when a key is built, not 64 kB. + +**Recorded as gaps** (docs/02_signatures.md, and THREAT_MODEL for S-04): S-04's `rnd`/ρ''/y stack residue +inside `ml-dsa`; S-07, the composite is a **separate** identity, never a wrapped Tessera Ed25519 seed +(recommendation under open question 1; `from_bytes` cannot detect reuse); S-08, a binding does not tie +`id` to `vk` and has no serial (Day 3's replay design with QA E-07; also on `verify_binding`'s docs); +S-12, none of the 9 ML-DSA-65 "modified z" sigVer cases at `a7f283cd` reaches the ‖z‖∞ bound (largest +|z| 524,077 < 524,092, decoded by script from the original file), so no ACVP case could be added; only +Wycheproof tests the bound. + +**Counts, run by the builder** at `0b2480b` (this entry only adds docs), Windows 10, `cargo 1.99.0`: + +| Run | Result | +|:--|:--| +| `cargo test` (debug) | **126 passed, 0 failed, 5 ignored** (the release-only stack test and four stack measurements) | +| `cargo test --release` | **127 passed, 0 failed, 4 ignored** (the four measurements) | +| `cargo clippy --all-targets --all-features -- -D warnings` | clean | +| `cargo fmt --check` (crate, probe, fuzz) | clean | +| `zeroize-probe` (`--test-threads=1`) | 1 passed (now also K and s1 of the expanded key) | +| `cargo deny --offline check` | advisories ok, bans ok, licenses ok, sources ok | +| fuzz `signatures` (rebuilt: `src/` and the target changed) | **601 s, 181,113 executions, 0 crashes, 0 artifacts** (301 exec/s, coverage 3,564), on `0b2480b` | + +`cargo audit` was not re-run (no dependency changed except the `curve25519-dalek` dev-dependency, +already in the lock). New since `d56ee10`: 3 tests (S-01 to S-03), 1 (S-05), 1 doctest (the `const` +`AppContext`), `sig_stack.rs` (1 + 4 ignored). + +**For consumers, added:** ban `ed25519-dalek/legacy_compatibility` and `curve25519-dalek/legacy_compatibility` +in `deny.toml`, next to `ed25519-dalek/hazmat`; build `AppContext`s as `const`s; check that `vk` is the +right key for `id` before trusting `verify_binding`, and refuse bindings older than the newest per `id`. + ## 2026-11-25 — v0.2.0 built (builder), on `feature/signatures` (PR #2), not merged, not tagged **What it adds:** `arcanum::sign`, hybrid signatures ML-DSA-65 + Ed25519, exactly RFC 10073