--- id: CryptoPedersenCommitmentOpeningExtractionContract language: en section: cryptography source: Verification/CryptoPedersenCommitmentOpeningExtractionContract.lean source_sha256: ec5ea7f608ec280fa36d846065f9c32c08ff7cb251f3b46b02f35a5b6f6888be novelty: not-assessed status: reviewed --- # Two-branch extraction of Pedersen openings [Section](../cryptography/README.md) ยท [Lean](../../Verification/CryptoPedersenCommitmentOpeningExtractionContract.lean) ## Proven interface Module 193 proves deterministic special soundness of a linear representation protocol. A transcript stores the public statement, announcement, challenge and response, not the original secret. For a linear map L : W -> A, two accepted transcripts for the same C and announcement, with distinct field challenges, give w = (x1-x2)^(-1) * (z1-z2) and L(w)=C. Neither randomness, nonzero individual challenges, generator independence nor an unknown discrete logarithm is assumed. The formula itself is total; correctness requires a nonzero challenge difference. scalarMap and vectorMap specialize this theorem to scalar and vector Pedersen commitments over ZMod q, q prime. Coordinate lemmas identify the displayed division formulas. vector_soundness uses the existing commit_vec; scalar_existing_commit identifies the existing scalar commitment. No real-number surrogate is used. checked_extract rejects statement mismatch, announcement mismatch, equal challenges and invalid responses in that order. checked_extract_success_iff states its exact acceptance conditions; checked_extract_sound proves its output opens C. No equality decision on the witness type is required by the checker. honest_extracts returns the original witness only for honestly constructed responses with a common mask. honest_mask_independent quantifies over arbitrary common masks. Arbitrary accepted forks guarantee a valid opening, not a unique or historically original opening. collision_extracts_dlog reuses the existing prime-order Setup and dlog_extraction_from_collision: distinct colliding pairs imply distinct blindings and H=((v1-v2)/(gamma2-gamma1))*G. This is an algebraic identity, not a computational binding-security theorem. The general extraction core does not require the stronger nonzero-generator assumptions of this lemma. ## Conditional bridge to module 178 OpeningForks supplies three separate two-branch representation proofs: two for vector commitments Ac and Sc, one for the scalar V. Each pair shares its own announcement; the pairs need not share a mask or challenge. extractCertificate computes all a,b,s,t,alpha,rho,v,gamma fields with explicit formulas. extracted_certificate_valid proves ValidOpenings for the actual Ac,Sc,V. range_extraction_from_opening_forks then invokes module 178's extraction_soundness, retaining ValidFamily, 2^(2^k)