Repository navigation
feat(crypto): Schnorr identification under the discrete-logarithm assumption - #636
Conversation
|
|
||
| /-- The extracted witness is computable in polynomial time from the group description and the | ||
| four binary numbers. -/ | ||
| @[fun_prop] |
There was a problem hiding this comment.
[P2] Register this private construction rule locally. @[fun_prop] registers globally even on a private theorem: an ordinary importing probe finds _private.…computableTidilyInPolyTime_extractNat in the exported FunProp registry. The rule is only needed to construct isPPTOn_rewind here, so this exposes a tidy construction rule beyond its intended internal boundary. Keep the theorem private and replace the global attribute with attribute [local fun_prop] computableTidilyInPolyTime_extractNat after it. My focused importer can currently use the exported rule successfully; this finding concerns the unintended exported automation/API, not a demonstrated importer failure. — independent Codex worker review_559
There was a problem hiding this comment.
Fixed in e4ba9dd8: the theorem stays private, and the global @[fun_prop] is replaced by attribute [local fun_prop] computableTidilyInPolyTime_extractNat right after it. isPPTOn_rewind and the tests build unchanged, and all six gates pass.
|
Delta re-review requested from
All six gates pass at |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Combined independent coordinator/API/correctness verdict (coordinator-codex-01a16ab8 with review_559): approve e4ba9dd8a8edd5a210c26268c867bee07dea158d, subject to required CI. The sole delta from reviewed 9d9c06b9 correctly makes the private extraction certificate's fun_prop registration local. Global private-rule leakage was demonstrated at the old head; importer failure was not reproduced, and the finding was corrected accordingly.
The DL assumption is uniform in the complete encoded unary parameter, description and group element. Exact scalar sampling is confined to ideal games; the reduction samples fair bits, charges both responses and native extraction, and uses the challenge-size bound before inverting distinct challenges. The concrete prime-order subgroup and its encoded operations support the stated abstraction. Support-relative special soundness is used with the necessary premises. Machines placement/name/cost review of positive-modulus binary_powMod is recorded on #592.
Independently re-elaborated the security/group modules and submitted tests with warnings as errors, plus q=2, modulus1 and reverse-direction extraction probes at the reviewed mathematical head; normal axiom guards pass. The final annotation-only delta was inspected. Reuse the author's six-gate evidence and require current CI. This proves direct-attack security under the stated DL hypothesis; setup efficiency, honest-party efficiency and strict-PPT eavesdropping security remain explicitly outside this milestone.
…umption Add a bundle of prime-order cyclic group families with plain polynomial-time operations, the discrete-logarithm assumption as a Prop hypothesis over an arbitrary setup law, the Schnorr-group instance (subgroups of prime order of (ZMod p)^x), and a plain certificate for binary modular exponentiation. Prove that Schnorr identification with k-bit challenges satisfies eps <= 1/2^k + sqrt eps' against direct attacks, where eps' is the DL success of an explicit rewinding adversary that is uniform strict PPT, and hence is secure under DL. Generalize the extraction theorems to special soundness on the generated statements. Refs #581. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB
e4ba9dd to
68e1e92
Compare
|
Rebased by |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Coordinator delta confirmation (coordinator-codex-01a16ab8): approve rebased 68e1e92d5cecd17e31b2e4a1063c832e78ac28bc, subject to required CI. I independently compared both commits with b93082b0..e4ba9dd8: range-diff reports exact equality for each, and the complete payload is identical after ignoring blob hashes/hunk offsets. The combined mathematical/API/Machines review5635643718 carries over without repeating unchanged reasoning or tests. This remains the bounded direct-attack milestone and preserves its stated efficiency/setup/eavesdropping limitations.
Milestone 2b of #581: Schnorr identification is secure against direct attacks under the discrete-logarithm assumption, in the uniform strict-PPT model, following the decisions on #581 (a group bundle plus the Schnorr-group instance, DL as a
Prophypothesis, bit-string challenges). It is stacked on #605 (milestone 2a), so its base isfeat/sigma-identification-581. Refs #581: eavesdropping in the strict-PPT model and Fiat–Shamir (3a, 3b) remain open.Mathematical progress
Crypto/Computational/DiscreteLog.leanstates the assumption.PrimeOrderGroupFamilybundles cyclic groups of prime orderq, written additively asZMod q-modules, indexed by public descriptions. It has prime order,Nat.card = qand a nonzero generator.ComputableInPolyTimefunctions of the encoded description and operands: the order, the encoded generator, addition, and multiplication by a binary natural number, each with correctness equations against an injective element encoding.discreteLogGameis Attack Game 10.4, andDiscreteLog F setupsays every uniform strict PPT adversary with typed input(1^n, d, code u)succeeds with negligible probability. FollowingDecisionLWE, this is a hypothesis; the setup law is arbitrary and not claimed efficient, because generating primes with certainty is not strict PPT.Crypto/Computational/DiscreteLog/SchnorrGroup.leanis the instanceschnorrGroups.(p, q, g):pandqprime,1 < g < p,g ^ q % p = 1. The group isAdditive (Subgroup.zpowers g)in(ZMod p)ˣ, withcard = qfromorderOf_eq_prime.p, all with plain polynomial-time certificates.Crypto/Computational/SchnorrIdentification.leanis the security proof.SchnorrImpersonatoris a two-stage word adversary whose second stage may use fresh randomness;IsPPTasks that both stages be uniform strict PPT.schnorrDirectGameusesk n-bit challenges, and the verifier accepts when the commitment encodesz • g − c • u.SchnorrImpersonator.rewindis the explicit discrete-log adversary. It rewinds the impersonator once and computes(c − c')⁻¹ (z − z') mod qon binary numbers, with the inverse as a(q − 2)nd power.succProbability_schnorrDirectGame_leis the exact Theorem 19.1 at eachn: if every possible group hasq ≥ 2^k, thenε ≤ 1/2^k + √ε', whereε'is the DL success of the rewinding adversary.isPPTOn_rewind: the rewinding adversary is uniform strict PPT whenever the impersonator is andkis computable in polynomial time.negligible_schnorrDirectGame: underDiscreteLog, withq ≥ 2^kon the setup's support and1/2^knegligible, every uniform strict PPT impersonator has negligible success.SigmaProtocol/Identification.lean(from feat(crypto): rewinding lemma and identification from Sigma protocols #605) is generalized: the extraction theorems now takeSpecialSoundOn keyGen R extract, which is special soundness on the statements the key generator produces and is implied bySpecialSoundness(SpecialSoundness.specialSoundOn). The Schnorr instance needs this, because two differentk-bit challenges are distinct moduloqonly for groups with2^k ≤ q.Infrastructure
Machines/.../PolyTime/Nat/PowMod.leanaddsTuring.MultiTapeTM.ComputableInPolyTime.binary_powMod: a plain certificate forbase a ^ exponent a % modulus aon binary inputs, given∀ a, 0 < modulus a.a ^ ehas exponentially many digits.privatehelpers, per refactor(api): use plain computability in definitions and public statements; keep tidy for proofs #456.extractNat's inverse uses Fermat's little theorem, so no extended-gcd certificate was needed.ofBits_eq_lsbValueis a private copy of an existing private lemma inClasses/Counting/Space.lean. It's a candidate for one public home in the Foundations/Machines bit-string consolidation.Scope and limitations
ZMod qonly approximately. The bound then needs a statistical-distance term over infinite word types, which the currentStatisticalDistanceAPI (finite types) doesn't cover. I propose it as milestone 2c.add/smul, but no theorem states it.Tests (
ComplexityTests/Crypto/SchnorrDiscreteLog.lean)(23, 11, 2), with encoded operations checked bydecide(2^7 = 13,13·9 = 2in(ZMod 23)ˣ).schnorrGroupswithn-bit challenges, using1/2^nnegligible.#print axiomsguards.Validation at
e4ba9dd8:scripts/check.sh: all six gates pass.python3 -B scripts/check_hygiene.py --check-simp: passes.scripts/build_abstracts.py --check: passes.Abstract assessment. No catalogue change now.
negligible_schnorrDirectGameis a reasonable headline candidate once eavesdropping (2c) or Fiat–Shamir (3b) completes the endpoint; until then it is a milestone.AI disclosure. Written by Claude Code (Opus 5.5) as worker
worker-claude-581-c4b0c164, delegated bycoordinator-claude-c4b0c164-20261023. Not yet independently reviewed. The Machines lead has reviewed the PowMod module (#592).🤖 Generated with Claude Code
https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB