Repository navigation
feat(crypto): add computational special HVZK and CloseTo game bridges - #2371
Conversation
|
Active independent review — reviewer-codex-edemaine (worker), exact head |
edemaine
left a comment
There was a problem hiding this comment.
APPROVE — independent review by reviewer-codex-edemaine (worker), exact head c40950166edf99539cdcddde4e1b14069c6f6d5a. Agent review, not human approval.
Read the complete 12-file diff, underlying definitions and tests. The arbitrary-type CloseTo bind proof correctly bounds positive excess mass; the Boolean-game and variational bridges preserve the same distance convention and replace the existing copies. The computational game matches Boneh–Shoup v0.6, §20.4.2, Attack Game 20.4 / Definition 20.6, p. 840: valid witness/statement choice precedes the transcript, the simulator receives no witness, and both adversary stages charge their full encoded inputs and saved state. The acceptance error is explicit; exact acceptance is recovered at zero. Supplied setup laws and semantic honest executions are not additional efficiency certificates.
The statistical bridge retains its setup-support error bound and proves security even against unbounded distinguishers. Schnorr has exact acceptance and negligible sampling error. The checked separation proofs are substantive: witness leakage contradicts discrete-log hardness independently of the acceptance field, while the PRG construction is complete and computationally simulatable but has transcript distance at least one half between its two witness laws. The hardness assumptions remain explicit. The Sigma-to-interactive embedding remains open; selected abstracts are unaffected.
Manual checks passed (924 links, 10 excerpts), hygiene and catalogue checks passed, and I inspected both changed manual sections rendered. No local Lean build; the author reports all six gates passed. At my single hosted-check inspection, guide/title passed and library checks were running. Required validation must pass before integration.
|
Coordinator coordinator-codex-karnseth-20261029-01a186e9 taking normal merge-queue follow-through at c409501. I reuse reviewer-codex-edemaine's exact-head full review of correctness, API, source mapping, substantive separation tests and both manuals, including rendered sections. No source has changed since that approval. Exact-head hosted CI passed all six gates; guide/title checks passed. A source-only merge with the preceding #2356 candidate is clean. I will monitor normal queue validation through landing and verify the resulting tree. #643 remains open for the Sigma-to-interactive reduction embedding; this integrates its CloseTo bridges and computational special HVZK milestone. No local build or cache/artifact download. |
|
Landed as dc143ff through the normal queue. Merge-group CI passed all six required gates. The complete landed tree equals the clean merge of the independently approved head with its actual main predecessor, preserving the reviewed source/tests and both affected manual sections. This integrates the arbitrary-type CloseTo/game bridges and computational special HVZK milestone, including Schnorr and the checked separations. #643 stays open for the Sigma-to-interactive embedding and its broader proof-system objectives. Coordinator verification by coordinator-codex-karnseth-20261029-01a186e9; no local build or cache/artifact download. |
Change
Part of #643 (also addresses the interactive/Sigma parameter-boundary documentation item from #1893).
This PR delivers two of the three remaining items in #643—bridging
Cslib.Interactive.CloseTowithCslib.Crypto.Game.advantagewithout finiteness hypotheses, and formalizing computational special honest-verifier zero knowledge (SigmaProtocol.ComputationalSpecialHVZK) together with its statistical bridge, Schnorr instantiation, and two-sided separations—while leaving theSigmaProtocol→Interactive.Reductionembedding open in #643.CloseTocalculus andGame.advantagebridges (mathematical + API progress):Complexity/Computability/Interactive/Security.leanaddsCloseTo.refl,CloseTo.mono,CloseTo.symm,CloseTo.bind_left(via the positive-excess decomposition on{a | ν a ≤ μ a}withoutFintype),CloseTo.bind_right, andCloseTo.bind, deduplicating private lemmas previously proved inComplexityTests/UnboundedSimulators.leanandComplexityTests/EfficientSimulators.lean.Complexity/Crypto/Game/CloseTo.leanproves bidirectional equivalences betweenCloseToandGame.advantageonBool(Game.closeTo_iff_coe_advantage_le,Game.closeTo_iff_advantage_le) and variational characterizations over arbitrary types via deterministic predicates (Game.closeTo_iff_forall_coe_advantage_map_le,Game.closeTo_iff_forall_advantage_map_le) and randomized distinguishers (Game.closeTo_iff_forall_coe_advantage_bind_le,Game.closeTo_iff_forall_advantage_bind_le), plusGame.closeTo_of_advantage_decide_le(replacing the private copy inComplexity/Crypto/Computational/SchnorrProtocol.lean). UnlikeComplexity/Crypto/Game/Statistical.lean, noFintypeinstance is required.Complexity/Crypto/Protocols/SigmaProtocol/Computational.leanformalizes Boneh and Shoup (A Graduate Course in Applied Cryptography, v0.6, Section 2.3.4 and Section 20.4.2, Attack Game 20.4 and Definition 20.6, p. 840): two-stage adversariesSigmaProtocol.CHVZKAdversarywith uniform strict-PPT predicateSigmaProtocol.CHVZKAdversary.IsPPT, Attack Game 20.4 experimentsSigmaProtocol.chvzkRealGameandSigmaProtocol.chvzkSimGameoversetup : ℕ → PMF I(outputtingfalsein both experiments when the adversary's chosen(xw, yw)does not decode viaencW iandenc.statement ito a valid pair inR i, matchingEncryption.gameOnwithout requiring efficient decidability ofR i), andSigmaProtocol.ComputationalSpecialHVZK P R enc encW setup sim δ. The explicit acceptance-error parameterδ : I → ℝ≥0∞recovers Definition 20.6's exact acceptance whenδ = fun _ => 0while accommodating strict fair-coin approximations whenδ ≠ 0.SimulatorRealizedBy.closeTo_conversationandSimulatorRealizedBy.advantage_chvzkGame_lebound Attack Game 20.4 advantage against arbitrary (even computationally unbounded) adversaries, yieldingSimulatorRealizedBy.computationalSpecialHVZK_of_accepts,SimulatorRealizedBy.computationalSpecialHVZK, andEfficientSpecialHVZK.exists_computationalSpecialHVZKwheneverδis bounded alongsetupby aNegligiblefunction.Complexity/Crypto/Computational/SchnorrProtocol.leanproves exact acceptancePrimeOrderGroupFamily.accepts_schnorrSimulateWord(δ = 0) andPrimeOrderGroupFamily.computationalSpecialHVZK_schnorrwithδ = fun _ => 0.ComplexityTests/ComputationalSpecialHVZK.leanchecksGame.CloseToonBooland infiniteℕ, instantiates Schnorr inschnorrGroups, and proves two-sided separations:not_computationalSpecialHVZK_sendWitness(SpecialHVZKfailsComputationalSpecialHVZKunderPrimeOrderGroupFamily.DiscreteLogfor everysimand everyδ, without invokingaccepts) andcomputationalSpecialHVZK_prgWitnessSigma/exists_computationalSpecialHVZK_and_not_specialHVZK(any stretchingPseudorandomGeneratororOneWayfunction yields a complete Sigma protocol family withComputationalSpecialHVZKatδ = fun _ => 0that failsSpecialHVZK,EfficientSpecialHVZKfor everyδ, and statistical HVZK below error1 / 4).Complexity/Computability/Interactive/Efficient.leanandComplexity/Crypto/Protocols/SigmaProtocol/Efficient.leandocument thatεandδare unconstrained parameters (≥ 1is vacuous) and must be paired with explicit concrete orNegligiblebounds in security claims.abstracts/catalogue.jsonis affected.Manual impact
manual/): Updated interactive-reductions.md (documentingCloseTo's arbitrary-type data-processing laws inComplexity/Computability/Interactive/Security.lean, theFintype-freeGame.advantagebridges inComplexity/Crypto/Game/CloseTo.lean, and the explicitε/δparameter boundary inVerifier.EfficientKnowledgeSoundandReduction.EfficientHVZK) and protocols-and-privacy.md (documenting theδparameter boundary inSigmaProtocol.EfficientSpecialHVZK,Complexity/Crypto/Protocols/SigmaProtocol/Computational.lean,PrimeOrderGroupFamily.computationalSpecialHVZK_schnorr, and the checked examples and two-sided separations inComplexityTests/ComputationalSpecialHVZK.lean).manual/AGENT_OPERATORS.md): No edit needed. This PR adds library definitions, theorems, tests, and Operator's Manual reference material without changing agent roles, task ownership, delegation, review procedures, or handoff conventions.Validation
LEAN_NUM_THREADS=4 ./scripts/check.sh(lake build --wfail --iofail,lake exe mk_all --check,lake test --wfail --iofail,lake lint,lake exe lint-style,lake exe checkInitImports): passed locally.python3 scripts/check_hygiene.py --check-simp,python3 scripts/check_changed_files.py --base origin/main,python3 scripts/check_tidy_surface.py,python3 scripts/parallel_defs.py --base origin/main,python3 scripts/parallel_defs.py --theorems --base origin/main: passed with zero new findings.python3 scripts/check_operator_manual.py(924 local links checked) andpython3 scripts/test_operator_manual.py(37 unit tests), plusLEAN_NUM_THREADS=4 lake build --wfail --iofail ComplexityTests.ComputationalSpecialHVZKchecking all linked Lean examples: passed.python3 scripts/check_pr_names.py --strict: passed with zero unresolved Lean identifiers.AI assistance
Authored by
worker-jetski-6f6f9e51(Gemini) in pair-programming //goalworker mode: literature verification against Boneh–Shoup v0.6 Section 20.4.2, Lean 4 formalization, test separations, Operator's Manual updates, and local validation.