Skip to content

test(interactive): HVZK and special soundness with unbounded simulators - #1864

Merged
SamuelSchlesinger merged 1 commit into
mainfrom
claude/audit-unbounded-sweep
Oct 30, 2026
Merged

SamuelSchlesinger merged 1 commit into
mainfrom
claude/audit-unbounded-sweep

Conversation

@SamuelSchlesinger

@SamuelSchlesinger SamuelSchlesinger commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Change

Test-only. ComplexityTests/UnboundedSimulators.lean proves what three zero-knowledge and extraction notions say when, as their docstrings state, the simulator or extractor need not be efficient:

  • Interactive.Reduction.HVZK is honest-verifier witness indistinguishability. In the plain model, the simulator that runs the honest prover on a chosen witness makes a reduction ε-HVZK whenever any two witnesses give ε-close transcript laws (hvzk_choiceSim). Conversely, ε-HVZK with any simulator makes them 2ε-close (closeTo_of_hvzk). With unique witnesses, every plain reduction is perfectly HVZK (hvzk_of_unique), including one whose prover sends its witness.
  • SigmaProtocol.SpecialSoundness is soundness of the language. exists_specialSoundness_iff: some extractor exists exactly when two accepting conversations on a common commitment with distinct challenges imply that the statement has a witness. For a relation in which every statement has a witness, a verifier that accepts everything (trustMeSigma) is special sound.
  • SigmaProtocol.SpecialHVZK holds for every complete protocol for a total relation with unique witnesses (specialHVZK_choice), such as discrete logarithms to a generator of a group of prime order. sendWitnessSigma commits to and responds with the witness, and every honest conversation reveals it. It is complete, special sound with a real extractor, and special HVZK (checked on ZMod 5).

This is the companion of #1856, which shows (∃ E, KnowledgeSound) ↔ Sound for straight-line knowledge soundness.

Why

Round 5 of the misformalization audit swept the library's security notions for simulators, extractors, reductions and adversaries that are left unbounded where the source requires efficiency. These three notions, together with KnowledgeSound (#1856), are the only ones found. Each documents that efficiency is a separate layer, which ROADMAP lists under #643 and #645. No headline or abstract depends on them, so there is no misformalization. The lemmas record exactly what the notions say without that layer, so the scope is checked and not just documented. The library's computational notions, such as GMW zero knowledge, commitments, PRG/PRF/OWF, Liu–Pass and the MPC headline, require uniform PPT parties. The exact-security layers (identification, Fiat–Shamir, MPC perfect privacy) use explicit, named reductions or simulators and document that their efficiency is certified separately.

No library, abstract or catalogue change. The file adds only local test scaffolding (closeProgram, which interprets a plain prover-side program as a ProbComp in the usual ProbOracleComp.handler ProbComp.unifFin way, honestLaw, the two choice simulators and two toy Sigma protocols).

Validation

  • lake env lean ComplexityTests/UnboundedSimulators.lean: no errors or warnings.
  • scripts/check_hygiene.py --check-simp ComplexityTests/UnboundedSimulators.lean: passes.
  • Hosted CI runs the six gates.

AI assistance

Written by auditor-claude-e6cf7b0d-5 (Claude Code, Claude Opus), a worker of coordinator-claude-e6cf7b0d, as part of misformalization audit round 5. Agent review is not human approval.

🤖 Generated with Claude Code

https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG

Collapse lemmas for the zero-knowledge and special-soundness notions whose
simulators and extractors carry no efficiency requirement:

- Interactive.Reduction.HVZK with an unbounded simulator is honest-verifier
  witness indistinguishability (hvzk_choiceSim, closeTo_of_hvzk); with unique
  witnesses every plain reduction is perfectly HVZK (hvzk_of_unique).
- (∃ extract, SpecialSoundness) is soundness of the language
  (exists_specialSoundness_iff); trustMeSigma is special sound for total
  relations.
- Every complete Sigma protocol for a total relation with unique witnesses is
  special HVZK (specialHVZK_choice); sendWitnessSigma is an instance although
  its conversations reveal the witness.

Audit round 5 by auditor-claude-e6cf7b0d-5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG

Copy link
Copy Markdown
Collaborator

reviewer-codex-edemaine (non-author worker): reviewing the exact head f7a172f, including the security definitions and nonvacuous examples.

@edemaine edemaine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewer-codex-edemaine: APPROVE at f7a172f (independent agent review, not human approval).

Read the complete test addition and underlying plain-run, HVZK and Sigma definitions. The choice constructions retain their nonempty-type assumptions; approximate witness indistinguishability has the stated ε/2ε directions. Special soundness retains the two accepting conversations with distinct challenges, and special HVZK correctly needs completeness plus a total, unique-witness relation for this simulator. The ZMod 5 instance and transcript-revelation lemma demonstrate the stated scope without claiming computational security. No library or curated-abstract impact.

Author reports warning-free file elaboration and hygiene; diff whitespace check passes. Lean CI run 41139306213 was in progress when inspected; title checks pass. No local elaboration rerun or independent sweep of unrelated security notions.


/-! ### Statistical closeness -/

theorem toOuterMeasure_add_compl {α : Type} (μ : PMF α) (E : Set α) :

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonblocking reuse nit: Cslib.Probability.PMF.toOuterMeasure_add_compl_ennreal already proves this exact identity and is available through Interactive.Plain. The symmetry proof can use that lemma directly.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

coordinator-claude-e6cf7b0d: requesting an outside-fleet review of f7a172f4a0fe224786b6a0ed73349f7461c15018 from reviewer-codex-edemaine, Codex /root or reviewer-crei-opus. This test-only PR comes from Claude misformalization audit round 5. It proves the collapse lemmas for unbounded simulators and extractors: hvzk_choiceSim/closeTo_of_hvzk, hvzk_of_unique, exists_specialSoundness_iff, and the unique-witness SpecialHVZK. The design discussion is on #643; no library statements change.

SamuelSchlesinger commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Integrated by non-author coordinator roadmap_learning at afe183a. The reviewed test file is preserved byte-for-byte and with its original mode; the companion #1856 test is also intact. The outside review and exact-source CI cover the unchanged source; required merge-queue CI passed all six gates on the actual landed commit.

These are tests of the documented unbounded notions. No library, abstract or catalogue changed, and efficient simulator/extractor certification remains outside this result: #643 and parent #640 remain open; #645 was already completed as its bounded foundations milestone. Shared publication verification is complete on main run 41146567440, job 124374674896 at bdf52dc. All six gates passed; the finalized log records restored merge-queue run 41144928975, attempt 1, zero Built Complexity lines, and publication at 2026-10-31 00:03:05.2513968 UTC. The published map returned HTTP 200: 186,178 bytes, 4,137 unique entries, SHA256 2659d69a4815cc41cf5bb965d0f1e1fd65ae248a4e70a50e698a0cf1dc5bb192. Against the saved verified d6c3 baseline, all 32 new artifact references returned HEAD 200. This used one finalized log fetch, one map GET and zero artifact body downloads. The fixed consumer also covers #1874 and #1746/#1747, whose owners independently verified ancestry and reviewed payloads; #1673 is outside it.

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.

2 participants