Docsity

Or Composition, Pairings, Exams of Cryptography and System Security

Toggle sidebar
bg1
University of Illinois, Urbana Champaign
CS/ECE 498AC3/4 Applied Cryptography
Instructor: Dakshita Khurana
Scribe: Timur Javid
Date: October 20, 2020
LECTURE
17
Or Composition, Pairings
Last lecture, we looked at range proofs, in which the prover tries to show that a value is
within a certain range without revealing the value itself. We constructed a simple example
of a range proof where the prover wants to show that the message sent using the ElGamal
scheme is an encryption of a single bit. In this example, we have a protocol to show that
the prover sends a Decisional Diffie-Hellman (DDH or DH) tuple if the encrypted bit
b= 0 and a protocol to show that the message is a DH tuple if b= 1. However, proving the
DH tuple ultimately reveals the value of the bto the verifier. Thus, we have to OR compose
these two protocols in order to prove the range of bwithout revealing the true value of b.
In this lecture, we construct a protocol for the OR composition that we started to look
at in the last lecture. We also look at non-interactive zero-knowledge proofs in which
we utilize a random oracle.
In the second half of the lecture, we start looking at pairing based cryptography in
which we utilize groups in a pairing and their properties in order to obtain a different type of
hardness assumption known as the Co-CDH assumption for our cryptographic operations.
Lastly, we look at the Boneh–Lynn–Shacham (BLS) signature scheme which utilized
pairings to sign and verify messages.
17.1 OR composition
In general, suppose that the prover wants to show that ∃wsuch that (x0, w)∈R0or (x1, w)∈
R1for witness wand statements x0, x1without revealing which of the two statements x0, x1
is true. Here we show that if we have a protocol (P0, V0) for R0and protocol (P1, V1) for
R1, we can obtain a protocol for R0OR R1by running the protocols in parallel. We can
assume, without loss of generality, that the prover knows that x0is true and x1is false.
Because the prover knows a witness for x0, it can answer all possible verifier challenges, so
nothing special needs to be done for this protocol. However, for x1, we allow the prover
to ”cheat” by letting the prover control the challenge for one of the two statements. The
prover can only control one of the two challenges otherwise the prover could easily cheat the
proof.
Essentially, the prover computes two zero-knowledge proofs in parallel and controls one
challenge for a statement that is unknown to the verifier.
pf3
pf4
pf5

Partial preview of the text

Download Or Composition, Pairings and more Exams Cryptography and System Security in PDF only on Docsity!

University of Illinois, Urbana Champaign CS/ECE 498AC3/4 Applied Cryptography

Instructor: Dakshita Khurana Scribe: Timur Javid Date: October 20, 2020

LECTURE

Or Composition, Pairings

Last lecture, we looked at range proofs, in which the prover tries to show that a value is within a certain range without revealing the value itself. We constructed a simple example of a range proof where the prover wants to show that the message sent using the ElGamal scheme is an encryption of a single bit. In this example, we have a protocol to show that the prover sends a Decisional Diffie-Hellman (DDH or DH) tuple if the encrypted bit b = 0 and a protocol to show that the message is a DH tuple if b = 1. However, proving the DH tuple ultimately reveals the value of the b to the verifier. Thus, we have to OR compose these two protocols in order to prove the range of b without revealing the true value of b. In this lecture, we construct a protocol for the OR composition that we started to look at in the last lecture. We also look at non-interactive zero-knowledge proofs in which we utilize a random oracle. In the second half of the lecture, we start looking at pairing based cryptography in which we utilize groups in a pairing and their properties in order to obtain a different type of hardness assumption known as the Co-CDH assumption for our cryptographic operations. Lastly, we look at the Boneh–Lynn–Shacham (BLS) signature scheme which utilized pairings to sign and verify messages.

17.1 OR composition

In general, suppose that the prover wants to show that ∃w such that (x 0 , w) ∈ R 0 or (x 1 , w) ∈ R 1 for witness w and statements x 0 , x 1 without revealing which of the two statements x 0 , x 1 is true. Here we show that if we have a protocol (P 0 , V 0 ) for R 0 and protocol (P 1 , V 1 ) for R 1 , we can obtain a protocol for R 0 OR R 1 by running the protocols in parallel. We can assume, without loss of generality, that the prover knows that x 0 is true and x 1 is false. Because the prover knows a witness for x 0 , it can answer all possible verifier challenges, so nothing special needs to be done for this protocol. However, for x 1 , we allow the prover to ”cheat” by letting the prover control the challenge for one of the two statements. The prover can only control one of the two challenges otherwise the prover could easily cheat the proof. Essentially, the prover computes two zero-knowledge proofs in parallel and controls one challenge for a statement that is unknown to the verifier.

  1. For statement x 0 , the prover runs the proving algorithm as in the Chaum-Pederson protocol and sends the first message of the protocol to the verifier. In parallel for statement x 1 , the prover runs a simulator that guesses the bit b 1 and sends the output of the simulator to the verifier.
  2. The verifier sends the prover a random constraint c and b 0 as a challenge for x 0. The prover chooses a challenge b 1 for x 1 such that b 0 ⊕ b 1 = c.
  3. The prover responds to the challenges as normal. The verifier checks the proofs sepa- rately and also verifies that c = b 0 ⊕ b 1. The best a prover can do to cheat if they do not know how to prove either x 0 or x 1 is to guess both b 0 and b 1. If the prover guesses both b 0 and b 1 , there is at least probability (^12) that c 6 = b 0 ⊕ b 1. Thus, this composition is sound. Furthermore, the OR composition can be expanded to i statements. Without loss of generality, we can assume that the prover knows one statement x 0 is true and the rest of the statements {x 1 , x 2 , ..., xi} are false. The prover can run simulators for statements {x 1 , x 2 , ..., xi} similar to above, guessing the challenge from the verifier on each one. Again, we let the prover set only one challenge bj , j ∈ { 1 , 2 , ..., i}. Setting only one challenge bj still allows the prover to satisfy the constraint that c = b 0 ⊕ b 1 ⊕ ...bi is true. However, this construction is not very efficient since it requires to simulate i statements. For a more efficient implementation, see Section 20.4.1 in the textbook.

17.2 A simulator for the OR composition protocol

A simulator can run the two challenges in parallel, similar to the prover in the scenario above. It can simply guess the challenges b 0 and b 1 at random and simulate the transcript for the first message. After receiving c from the verifier, the simulator can check if c = b 0 ⊕b 1. If it is, then the simulator can continue with the protocol as usual. Otherwise, the simulator can restart.

17.3 OR composition application: Encrypting bits

Suppose that a prover wants to show a verifier that they have encrypted a single bit. The en- cryption scheme has public parameters (g, gα) for group g and secret α. The prover encrypts the bit b with randomness c as m = Enc(b, (g, gα), c) = (gαcgb, gc). We want to show that m is either m = (gαcg^0 , gc) or m = (gαcg^1 , gc). If b = 0, then m = (gαcg^0 , gc) = (gαc, gc) which when combined with the public parameters (g, gα) creates a DH tuple (g, gα, gc, gαc). If b = 1, then m = (gαcg^1 , gc) = (gαc+1, gc). In this case, we can create a DH tuple if we divide the last term of the tuple (g, gα, gc, gαc+1) by g. However, revealing if either of the tuples are DH tuples reveals the bit b to the verifier. To put it more clearly, the statements are:

  1. (g, gα, (gc, w)) is a DH tuple where w = gαcgb^ for b ∈ { 0 , 1 }
  2. (g, gα, (gc, wg )) is a DH tuple where w = gαcgb^ for b ∈ { 0 , 1 }

Applying the OR composition from above, we can simply take the statement 1 as x 0 and statement 2 as x 1 to prove that b ∈ { 0 , 1 } without revealing the true value of b. Futhermore, we can expand this to multiple bits as we did above with the OR composition.

Example 17.3. e(g 0 a , gb 1 ) = (e(g 0 , gb 1 ))a^ = (e(g 0 , g 1 ))ab^ = e(g 0 b, ga 1 )

Let’s consider when G 0 = G 1. Then, g 0 = g 1. Going back to the DDH assumption, let’s suppose we have a triple (u, v, w) = (ga 0 , gb 0 , gab 0 ). The DDH assumption states that (u, v, w) is indistinguishable from (ga 0 , gb 0 , gc 0 ) for a random c. We show that the DDH assumption does not hold for pairing based groups when G 0 = G 1.

Proof. We are given (ga 0 , g 0 b, gc 0 ). We can compute e(g 0 a , gb 0 ) = (e(g 0 , g 0 ))ab. Furthermore, we can compute e(g 0 c, g 0 ) = (e(g 0 , g 0 ))c. Let e(g 0 , g 0 ) = gT. Since we can easily compute gabT and gcT , we can distinguish between the two DDH tuples (u, v, w) = (g 0 a , gb 0 , g 0 ab ) and (u, v, w) = (ga 0 , g 0 b, gc 0 ) for a random c. Thus, the DDH assumption does not hold for pairing based groups.

A simple distinction between pairing based groups and normal groups is that in normal groups, given ga, gb, it is hard to compute gab. In pairing based groups however, since we have the pairing function e, given g 0 a , gb 1 , it is easy to compute gabT.

17.6 Co-CDH assumption with pairing based groups

Recall: the old Computational Diffie-Hellman (CDH) assumption stated that given g 0 a , gb 0 , calculating gab 0 is hard. We play off this same assumption here. Note that computing gTab is easy, but we can assume that calculating gab 0 is hard since the pairing function e maps G 0 × G 1 to a different target group GT.

Assumption 17.4. We sample a random (a, b) ∈ Zq. We construct a triple (u 0 , u 1 , v 0 ) where u 0 = ga 0 , u 1 = ga 1 , v 0 = gb 0 and send the triple to the attacker. The attacker outputs some z′^ ∈ G 0. If z′^ = g 0 ab , the attacker wins.

This is a stronger version of the old CDH assumption, since we also provide the attacker with ga 1 and maintain the hardness of computing g 0 ab. The attacker should not be able to learn either a or b through this assumption.

17.7 Pairing application: BLS signatures

We construct the BLS signature scheme that is based off of the Co-CDH assumption we discussed in Section 17.6. We construct this signature scheme as follows, assuming we have pairing-based groups G 0 , G 1 and a function e that pairs these to a target group GT.

  1. Sample a random k-bit length key a. We use this as the signing key sk = a and use public key pk = g 1 a.
  2. To generate a signature for a message m, we hash it and raise to the secret key a. More formally, the signing operation is defined as Sign(sk, m) : σ = (H(m))a^ ∈ G 0 , where H(m) is a hashing operation on the message m and outputs H(m) ∈ G 0.
  3. To verify a message m with a signature σ, we use the properties of the function e, the public key ga 1 and the hash of the message H(m). More formally, the verification operation as Verify(pk, m, σ) : 1 iff e(H(m), pk) = e(σ, g 1 ).

In more detail, given a message m, a public key g 1 a , and a signature σ, we verify it as follows:

  1. We take the hash of the message and compute the function e on the hash of the message and the public key g 1 a.
  2. Since H(m) ∈ G 0 , e(H(m), g 1 a ) = (e(H(m), g 1 ))a.
  3. Taking the exponent a back in, (e(H(m), g 1 ))a^ = e(H(m)a, g 1 )
  4. We then compare e(H(m)a, g 1 ) ∈ GT to e(σ, g 1 ) ∈ GT. If H(m)a^ = σ, then the signature verifies since e(H(m)a, g 1 ) = e(σ, g 1 ). Otherwise, the message is forged.

An important note is that, according to the Co-CDH assumption, it is hard to forge a signature of a message m because of the one-way nature of the pairing operation e.

Acknowledgement

These scribe notes were prepared by editing a light modification of the template designed by Alexander Sherstov.