Table of Contents

Table of Contents

Batched Pedersen Equality Proofs

Table of ContentsCloseClose

Sometime last year I came across a result that I found interesting demonstrating a variant of Schnorr’s identity protocol adapted to the case where a prover wishes to show knowledge of d discrete log identities. In addition to being a noteworthy protocol in of itself, I played around with it a bit and found a related variant which allows one to prove knowledge of multiple Pedersen commitments. I haven’t seen this written up anywhere so it seemed worth writing a short post on it.

We’ll be covering protocols that demonstrate:

Note that I have not yet proven soundness of the last protocol, although it seems intuitively secure. Caveat emptor.

Schnorr’s Identity Protocol

In 1989 Claus Schnorr invented the Schnorr identity protocol, which is the basis for Schnorr signatures. It is designed to prove knowledge of a secret key. The protocol’s security reduces down to the hardness of discrete log in the chosen group.

In the following description, we assume a group G with generator g of order q. The prover will take in as a private input some wFq such that y=gw, where y is known to both the prover and verifier.

1. The prover picks randomly some rFq and sends the group element x=gr to the verifier
2. The verifier picks a random challenge eFq and sends it to the prover
3. The prover computes scalar s=r+we and sends it to the verifier
4. The verifier checks that x=gsye and accepts iff true

It is easy to see upon expanding out the verification equation that gsye=grgwegwe=gr=x. Multiple soundness proofs are available in the literature and will be glossed over here.

Schnorr Batched Identity Protocol

In 2004 a team of researchers including Rosario Gennaro discovered a generalization of Schnorr’s identity protocol which allows one to prove simultaneously d discrete log instances y1,...,yd with respect to the same base g. They reduce the soundness of their scheme down to a stronger variant of the discrete logarithm assumption. Note that the word “batched” here does not refer to verifying multiple proofs at once, but to proving multiple discrete log values in the same proof.

As above, we assume a group G with generator g of order q. The prover takes in as private input some w1,...,wd such that for all 1id, yi=gwi. Note that i is implicitly taken over all 1id.

1. The prover picks some random rZq and sends x=gr to the verifier
2. The verifier picks a random challenge eZq and sends it to the prover.
3. The prover computes s=r+Σiwiei and sends it to the verifier.
4. The verifier checks that x=gsiyiei and accepts iff true

As above, we can see completeness by expanding out the verification equation as gsiyiei=grgΣiwieigΣiwiei=gr=x.

Essentially, the protocol is identical to the original, where we deal with the sum of multiple discrete log values wi by expanding the random challenge e out into multiple values e, e2, e3,… to separate out each wi in the summation. This allows us to “reuse” the computations involving r and s to save computation asymptotically as d grows.

In terms of computation, if we are operating in an elliptic curve group, invoking the original Schnorr identification protocol N times requires N scalar multiplications for the prover, and 2N for the verifier. The batched variant above requires 1 scalar multiplication for the prover, and 1+N for the verifier, an improvement for d3.

A proof of soundness can be found in the aforementioned authors’ paper, linked at the end of the post.

Schnorr’s Protocol Adapted for Pedersen Commitments

A Pedersen commitment is a commitment scheme of the form c=gmhρ. Here c is the full commitment, m is the committed-to message, ρ is a uniformly random value, and g,h are generators of some group G of order q. It provides information theoretic hiding and is computationally binding under the discrete logarithm assumption.

We can create a variant of the Schnorr identification protocol to prove knowledge of a message x hidden in a Pedersen commitment as follows. Here the prover will take as secret inputs a message m and randomness r, both in Fq. Both the prover and verifier will have access to generators g,h and the commitment c. The prover’s goal is to convince the verifier it knows m,ρ such that c=gmhρ.

1. The prover picks randomly some rm,rρFq and sends the group element x=grmhrρ to the verifier
2. The verifier picks a random challenge eFq and sends it to the prover
3. The prover computes scalars sm=rmxe and sρ=rρρe and sends them to the verifier
4. The verifier checks that x=gsmhsρce and accepts iff true

As usual, completeness can be proven by expanding out the verification equation: gsmhsρce=grmgxehrρhρegxehρe=grmhrρ=x. Note that flipping the addition operations to subtraction in step 3 was an arbitrary choice, as instead we could have made the commitment over m and used addition as in the above discrete log protocols.

For knowledge soundness, an extractor can be constructed which runs a prover with randomness e to get back sm,sρ, then rewinds the prover and calls it with randomness ee to get back sm,sρ. Computing (smsm)/(ee) will yield m, and likewise for ρ.

Conceptually, this protocol is really a special case of a more generalized scheme, which can easily be derived from the description above, which modifies the original Schnorr protocol to prove knowledge of n discrete log values in a product of n generators, as g1x1g2x2...gnxn. In other words, it proves knowledge of the discrete log values used in a size n fixed-base multi-exponentiation. In this case the prover in step 3 computes n values in the same manner as the current protocol does for sm and sρ, and sends them to the verifier. The protocol proving knowledge of a Pedersen commitment described here is the case where n=2.

Schnorr’s Protocol Adapted for Batched Pedersen Commitments

Here we demonstrate a protocol which proves knowledge of d Pedersen commitments over the same basees g,h. In this context the prover takes in as secret input the messages m1,...,md and randomness values ρ1,...,ρd of d Pedersen commitments c1,...,cd. Both the prover and verifier have access to the full commitments, in addition to the generators g,h over the same group G.

1. The prover picks randomly some rm,rρFq and sends the group element x=grmhrρ to the verifier
2. The verifier picks a random challenge eFq and sends it to the prover
3. The prover computes scalars sm=rmΣimiei and sρ=rρΣiρiei and sends them to the verifier
4. The verifier checks that x=gsmhsρiciei and accepts iff true

Completeness follows from expanding out the verification equation as gsmhsρΣicei=grmgΣimieihrρhΣirieiigmieihρiei=grmhρm=x.

If we are working in an elliptic curve group, the protocol for a single Pedersen commitment executed N times requires 2N scalar multiplications for the prover and 3N for the verifier. The batching version of the protocol for N Pedersen commitments requires a constant 2 scalar multiplications for the prover and 2+N scalar multiplications for the verifier. This implies the protocol is useful when the number of commitments is only 2d.

A proof of soundness is left as an exercise to the reader.

As with the previous protocol proving knowledge of only one Pedersen commitment, the generalization proving knowldge of d distinct products of multi-exponentiations each with the same n generators is easy to derive.

Citations

Author: Michael Straka

Created: 2025-02-03 Mon 09:48