Expand description
Zero-knowledge proofs for the MtA protocol — GG18/GG20 Appendix A (Gennaro & Goldfeder, eprint 2019/114 A.1/A.2), the construction spec 70-cmp20 requires on every MtA ciphertext.
Two proofs, both sigma protocols made non-interactive via
Fiat-Shamir (SHA-256 over the full transcript, challenge reduced
mod q, the ECDSA group order):
RangeProof(initiator): for Paillier ciphertextc = Γ^m·r^N mod N², proves knowledge of(m, r)withm ∈ [0, q³]— the “small ciphertext” guarantee that prevents the wrap-around attacks described in the paper.RespondentProof(responder, plain MtA): forc₂ = c₁^x·Γ^y·r^N mod N², proves knowledge of(x, y, r)withx ∈ [0, q³]andy ∈ [0, q⁷]— binding the response to the received ciphertext and bounding the mask.
The commitments use an auxiliary Strong-RSA modulus
Ñ = P̃·Q̃ with P̃ = 2p̃+1, Q̃ = 2q̃+1 (safe primes) and
h₁, h₂ ∈ Z*_Ñ with h₂ = h₁^w for discarded w — nobody (least
of all the prover) knows the discrete log of h₂ in base h₁,
which is what makes the h-commitments binding.
§Trust model and limitations (audit ledger)
- A commitment key is generated by the VERIFIER and used by the OTHER party as prover. Never prove against a key you generated yourself — you would know the h₂/h₁ discrete log.
- The paper proves Ñ is of the correct form (safe-prime product) with an additional ZK proof ([Gennaro-Micciancio-Rabin]); this implementation generates such moduli honestly but does NOT yet prove their form to verifiers. A malicious verifier could mis-generate a key to break a prover’s privacy. Trusted-setup gap, tracked in the audit ledger.
- Soundness holds under Strong RSA over Ñ; size Ñ accordingly (the paper’s setting: 2048-bit Ñ alongside 2048-bit N).
Structs§
- Commitment
Key - Auxiliary commitment key
(Ñ, h₁, h₂)— see the module docs. - Range
Proof - Initiator’s range proof: knowledge of
(m, r)withc = Γ^m·r^N mod N²andm ∈ [0, q³]. - Respondent
Proof - Responder proof for plain MtA: knowledge of
(x, y, r)withc₂ = c₁^x·Γ^y·r^N mod N²,x ∈ [0, q³],y ∈ [0, q⁷].
Functions§
- generate_
commitment_ key - Generate a commitment key:
Ñ = P̃Q̃withP̃, Q̃safe primes ofprime_bitseach,h₁a random quadratic residue modÑ, andh₂ = h₁^wfor uniformly random discardedw. - p256_
order - The P-256 group order
q, as the proofs’ range parameter. - prove_
range - Prove that
c = Γ^m·r^N mod N²opens tom ∈ [0, q³). - prove_
respondent - Prove the responder statement for
c₂ = c₁^x·Γ^y·r^N mod N², whereris the Paillier randomness used for theΓ^yterm. - verify_
range - Verify an initiator range proof for ciphertext
c. - verify_
respondent - Verify a responder proof binding
c₂toc₁with bounded secrets.