Skip to content

feat(benches): criterion benches for signature verification (#89)#111

Merged
avrabe merged 1 commit into
mainfrom
feat/criterion-benches-sig-verification
May 12, 2026
Merged

feat(benches): criterion benches for signature verification (#89)#111
avrabe merged 1 commit into
mainfrom
feat/criterion-benches-sig-verification

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 11, 2026

Implements #89. Adds criterion-driven benchmarks for the four signature-verification hot paths so silent crypto-path regressions can be caught before they ship.

Bench groups

Group Measures Traceability
`ed25519_verify` `pk.verify(msg, sig)` over a fixed 44-byte payload CR-1, CR-3, RFC 8032
`dsse_parse_and_verify` `DsseEnvelope::from_json` → `verify` of an in-toto-shaped payload signed Ed25519 CR-3, CR-8
`merkle_validation` `verify_inclusion_proof` for leaf 0 of complete-binary trees, parameterised `&[8, 64, 512, 4096]` leaves CR-3, CR-5, CR-8
`cert_chain_validation` `KeylessSignature::from_bytes` + `MAX_CHAIN_DEPTH` check, parameterised `&[1, 2, 4, 8]` (matches audit PR #98) CR-7, CR-8

Deferred

  • SLH-DSA bench — issue feat: post-quantum signature support (SLH-DSA / FIPS 205) #46 (not yet implemented).
  • CI job (sanity run on PR, full run nightly) — separate follow-up. This PR lands the harness only so baselines can be captured.
  • Full WebPKI cert-chain path — skipped in the cert-chain bench because it needs Fulcio root + integrated_time fixtures that would dominate the measurement. The parse + length-bound is the actual pre-WebPKI hot path.

Validation

  • `cargo build -p wsc --benches` clean
  • `cargo test -p wsc --bench verification_benchmarks --release` runs all 10 bench permutations to "Success"
  • Capture numeric baselines on CI's blessed runner — done in the follow-up CI PR

Implements #89. Verifies CR-1, CR-3, CR-7, CR-8.

@temper-pulseengine
Copy link
Copy Markdown

Automated review for PR #111

pulseengine/sigil:feat/criterion-benches-sig-verification → pulseengine/sigil:main

Verdict: 💬 Comment

Summary: The pull request is approved.

Findings: 0 mechanical (rivet) · 1 from local AI model.

Findings (1):

  1. src/lib/Cargo.toml:109
    criterion = { version = "0.5", features = ["html_reports"] }
    
    The criterion feature is added to the [dev-dependencies] section of the Cargo.toml file, which is necessary for running signature-verification benchmarks using Criterion.

Generated by a local AI model and post-validated against a strict JSON contract. Each finding includes the verbatim line being criticised — verify by reading the file at the cited location.

Reviewed at 7fe1f07

avrabe added a commit that referenced this pull request May 11, 2026
Patch release bundling four merged PRs:
  #107 — cargo-deny CI step hardening (closes #103)
  #108 — discharge lemma_le64_injective Verus admit (audit C-1 partial)
  #109 — repair fuzz_public_key target (audit follow-up from #98)
  #110 — clear 3 RUSTSEC advisories via dep bumps (fixes #102)

Companion work on 0.8.2+next:
  #111 — criterion benches for signature verification (#89)
  #112 — lift Kani wasm_module mask; document merkle + format

See CHANGELOG.md for the full release notes.

Trace: skip

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds criterion-driven benchmarks for the four signature-verification hot
paths: Ed25519 verify, DSSE envelope parse+verify, Merkle tree validation
(parameterised by leaf count), and cert-chain validation (parameterised
by chain length, matching MAX_CHAIN_DEPTH=8 from audit PR #98).

SLH-DSA bench deferred to issue #46. CI integration deferred to a
follow-up PR — this commit only lands the bench harness so baselines
can be captured.

Traceability comments at the top of the bench file link each group to
its CR-* artifact.

Implements: #89
Verifies: CR-1, CR-3, CR-7, CR-8

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avrabe avrabe force-pushed the feat/criterion-benches-sig-verification branch from 7fe1f07 to 8732faf Compare May 12, 2026 04:18
@avrabe avrabe merged commit 8b435b8 into main May 12, 2026
20 checks passed
@avrabe avrabe deleted the feat/criterion-benches-sig-verification branch May 12, 2026 05:01
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant