Skip to content

id: verify_strict forgery regressions missing at invites and seitan call sites (P0.11) #1386

Closed

Description

@dezren39

Gap found during #1075 validation (Phase 0 walk, P0.11)

Plan step P0.11 (doc/2026-10-11T11-08-42Z_design_remaining_work/plan-phases.md §5) requires: "verify_strict regressions: a non-canonical signature and a small-order key are rejected at every call site" — test column: regression per call site; property over signature mutations.

Verified on main 0c37bb150aae3f3266b9492010161ad053cb2c4a (2026-10-27):

Covered sites — the shared fixtures in pkgs/id/src/test_forgeries.rs (IDENTITY_KEY small-order key, identity_forgery(), with_non_canonical_s()) are used by per-site regressions at 5 of the 7 direct verify_strict call sites in pkgs/id/src: artifact.rs:306, directory.rs:396, directory_auth.rs:349, directory_log.rs:100, web/identity.rs:373.

Uncovered sites — no small-order / non-canonical-S regression at:

  1. pkgs/id/src/invites/event.rs:126 — InviteEvent::verify_signature. Existing coverage is generic only: pkgs/id/tests/invites.rs a_bad_event_signature_refuses_the_accept_with_no_send (bit flip) and changing_the_role_or_the_expiry_breaks_the_signature (tamper). Neither pins the strict-only rejections (an identity-key forgery that plain verify would accept, or an S+L non-canonical signature).
  2. pkgs/id/src/seitan/accept.rs:142 — accept::verify for seitan proofs. pkgs/id/src/seitan/tests.rs covers wrong key, tampered message bytes, a forged key, and a zero signature, but not the small-order identity forgery or non-canonical S via the shared fixtures.

The indirect 8th site (event headers via p2panda-core AnyHeader::decode, used at pkgs/id/src/chain.rs:323) is upstream code; its mutation resistance is covered locally by pkgs/id/tests/chain_properties.rs (test_a_single_changed_byte_is_always_refused) — no action needed there unless the audit decides otherwise.

Acceptance criteria

  • A regression at the invites site proving verify_signature rejects (a) an invite event signed under the small-order identity key with the identity_forgery() signature, and (b) a valid signature mutated with with_non_canonical_s().
  • A regression at the seitan site proving accept::verify rejects both fixture classes the same way.
  • Tests use the shared crate::test_forgeries fixtures (no new fixture copies) and pass in the normal Rust unit layer.

Filed from #1075 per its rule: every gap gets its own issue, linked from the worked issue. Path to Phase 12 step 4 follow-up (#1235 tier 1).

Activity

  1. added
    kind/testTest coverage, test infrastructure, or test-only fixes
    priority/highImportant and time-sensitive
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    nowOrg Project gate: active priority — orchestrator adds to the board
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  4. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — confirmed, follow-up routed

    • Agent: openchamber scheduled lane (repo-worker-code, lane 335a5d1f), queue task 2568
    • Verdict: CONFIRMED on current main (0e26fa4b3, 2026-11-02). Both named sites still enforce verify_strict with no strict-only forgery regression:
      • pkgs/id/src/invites/event.rs:126 (InviteEvent::verify_signature) — file has zero test occurrences and no test_forgeries use; integration coverage in pkgs/id/tests/invites.rs is bit-flip/tamper only.
      • pkgs/id/src/seitan/accept.rs:142 (accept::verify) — seitan/tests.rs covers wrong key / tampered message bytes only; no small-order-identity or non-canonical-S case.
      • Shared fixtures (IDENTITY_KEY, identity_forgery(), with_non_canonical_s()) are used at 5 sites only (artifact, directory, directory_auth, directory_log, web/identity) — neither of the two sites above.
    • Routing: enqueued scoped small_fix follow-up as queue task 6583 (repo-health:v1:fix:developing-today/code:issue:1386) — one shared-fixture regression per site, no production-code change expected. No competing PR references id: verify_strict forgery regressions missing at invites and seitan call sites (P0.11) #1386; no held/Drew-owned restriction. Issue stays open for the fix task.
  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
  6. added a commit that references this issue on Nov 3, 2026
  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    Done: PR #4676 MERGED (merge commit 6f54447); issue #1386 closed by the merge. The PR adds four tests, no production-code change: InviteEvent::verify_signature (pkgs/id/src/invites/event.rs) and seitan accept::verify (pkgs/id/src/seitan/tests.rs) each reject (a) the small-order identity-key forgery and (b) a genuine signature mutated with with_non_canonical_s, with passing controls. Verified on the laptop at head 5cae4f9: cargo test --lib --no-default-features --features world in pkgs/id — invites + seitan filters pass (35 seitan tests incl. the 2 new), the four new tests pass by name. Codex review completed on 5cae4f9 with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/testTest coverage, test infrastructure, or test-only fixesnowOrg Project gate: active priority — orchestrator adds to the boardpriority/highImportant and time-sensitive

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions