



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




CMSC 858K — Advanced Topics in Cryptography April 20, 2004
Lecturer: Jonathan Katz Scribe(s): Nagaraj Anthapadmanabhan, Ji Sun Shin
In the previous lectures, we saw the construction of a zero-knowledge proof system for the language of 3-colorable graphs (and hence for all of N P ) using a commitment scheme as a tool. In this lecture we will discuss the two different notions of commitment schemes and show how these types of commitment schemes can be constructed. Recall that a commitment scheme consists of two phases: a commitment phase after which the sender is supposed to be committed to a value, and a decommitment phase during which the committed value is revealed to the receiver. Two types of commitment schemes can be defined, one protecting against an all-powerful sender and one protecting against an all-powerful receiver :
It can be proved that commitment schemes which are both information-theoretically hiding and information-theoretically binding do not exist.
We first consider some constructions of standard commitment schemes.
One possible construction is obtained by using a trapdoor permutation family. Here we show how this can be used to allow a sender S to commit to a bit b:
S(1k, b) R(1k^ ) choose coins ω for Gen (f, f −^1 ) ← Gen(1k^ ; ω) r ← { 0 , 1 }k^ f, c^ =^ f^ (r), d^ =^ h(r)^ ⊕^ b −−−−−−−−−−−−−−−→ − − − − − − − − − − − − −− f −^1 , r, ω −−−−−−−−−−−−−−−→ check (f, f −^1 ) =? Gen(1k; ω);
check f (r) =? c; b = d ⊕ h(r)
To commit to a bit b, the sender S generates a trapdoor permutation (f, f −^1 ), chooses a random element r in the domain of f (here, the domain of f is assumed to be { 0 , 1 }k^ ), and sends a description of f along with f (r) and h(r) ⊕ b (here, h(·) is a hard-core bit of f ). To decommit, S sends the random string ω (used to prove that f is indeed a permutation), as well as r. The receiver R does the verification in the obvious manner and recovers b. The correctness property is obviously satisfied as the receiver R “accepts” if S acts honestly. (This will be the case for all constructions in this lecture.) We now sketch why the other two properties hold:
Binding: We need to prove binding even for an all-powerful sender. Notice that the f sent in the first round must be a permutation, since the sender has to reveal the randomness ω used to generate f in the decommitment phase (and we assume that Gen always outputs a permutation). Thus, c uniquely determines a value r = f −^1 (c), and this in turn uniquely determines b = h(r) ⊕ d.
Hiding: Since f is one-way, a ppt receiver cannot distinguish h(r) from a random bit (we use here the fact that (f, f −^1 ) are randomly-generated, and that r is chosen uniformly at random). Thus, h(r) computationally hides the value of b. A formal proof is left as an exercise for the reader.
The reader may notice that we never use the trapdoor f −^1 in the above construction. Thus, we may in fact base the above construction on the (potentially) weaker assumption of a one-way (not necessarily trapdoor) permutation.
Actually, we can do even better and show a construction based on the minimal assumption of a one-way function (the proof that this assumption is indeed minimal is left as another exercise!). Here, we use the following “hard” theorem that was mentioned, but not proved, in class:
Theorem 1 The existence of a one-way function implies the existence of a length-tripling pseudorandom generator (PRG).
Recall the definition of a (length-tripling) PRG:
S(1k, b) R(1k) s ← { 0 , 1 }k^ r 0 ←−−−−−−−−−−−−−−− r 0 ← { 0 , 1 }^3 k x = G(s) if b= y = x = G(s) if b= y = x ⊕ r 0 y −−−−−−−−−−−−−−−→ − − − − − − − − − − − − −− s, b −−−−−−−−−−−−−−−→ if b=
check y =? G(s) if b= check y =? G(s) ⊕ r 0
The receiver first sends a random 3k-bit string r 0. The sender chooses a random seed s and computes x = G(s). The sender simply sends x to commit to “0”, and sends x⊕r 0 to commit to “1”. To decommit, S sends both s and the committed value (and the receiver verifies these in the obvious way). Clearly, this construction satisfies the correctness property. We claim that this construction also satisfies the hiding and binding requirements:
Hiding: The following claim proves the hiding property:
Claim 2 If a ppt cheating receiver R∗^ can distinguish a commitment to 0 from a commit- ment to 1 (before the decommitment phase), then we can use R∗^ to “break” the PRG.
Proof Let R∗^ be a ppt receiver that distinguishes a commitment to 0 from a commitment to 1 with probability ε(k) (namely, the difference between the probability that R∗^ outputs 1 when interacting with a sender committing to a “0” and the probability that R∗^ outputs 1 when interacting with a sender committing to a “1” is ε(k)). We want to show that ε(k) is negligible. To that end, use R∗^ to construct a ppt distinguisher D trying to distinguish whether its input x is random or pseudorandom:
D(x) b ← { 0 , 1 } run the commitment phase of the above scheme with R∗^ using bit b; i.e.: get r 0 from R∗ if b = 0 send x to R∗ if b = 1 send x ⊕ r 0 to R∗ if R∗^ guesses b correctly, then D outputs 1 (i.e., “PRG”) otherwise, D outputs 0 (i.e., “random” Note that when x is pseudorandom, D acts as a completely honest sender and so the probability that D outputs 1 is given by:
1 2 · (Pr[R∗^ outputs 0 | S commits to 0] + Pr[R∗^ outputs 1 | S commits to 1])
· (1 − Pr[R∗^ outputs 1 | S commits to 0] + Pr[R∗^ outputs 1 | S commits to 1]) = 1 /2 + ε(k)/ 2.
On the other hand, when x is random then the view of R∗^ is independent of b (since either one of x or x ⊕ r 0 , for any r 0 , is just a uniformly-distributed string) and so the probability that D outputs 1 is exactly 1/2. The security of the PRG thus implies that 1 /2 + ε(k)/ 2 − 1 /2 = ε(k)/2 is negligible, completing the proof.
Binding: Proving the binding property is more interesting. We show that an all-powerful S∗^ can decommit to two different values with only negligible probability (assuming R is honest). Note that S∗^ can only potentially cheat if R sends an r 0 for which there exist y, s, s′^ such that: y = G(s) and r 0 = y ⊕ G(s′) or, in other words, if there exist s, s′^ such that G(s) ⊕ G(s′) = r 0. Call r 0 with this property “bad”. Because s and s′^ are k-bit strings, there are at most 2^2 k^ possible “bad” values r 0. Since r 0 is a uniformly-random 3k-bit string, the probability of R choosing a “bad” r 0 is at most 2^2 k^ / 23 k^ = 2−k, which is negligible.
Perfect commitment schemes seem much more difficult to construct. In particular, a con- struction of a perfect commitment scheme based on one-way permutations is known, but it is an open question to construct such a scheme based on one-way functions. Here, we show two constructions based on number-theoretic assumptions.
The following scheme allows a sender to commit to a string x ∈ { 0 , 1 }k−^1 , not just a bit:
S(1k, x) R(1k^ ) generate a cyclic group G of prime order q with |q| = k g, h, G, q ←−−−−−−−−−−−−−−− pick random generators g, h ∈ G verify q prime; |q| = k verify g, h generators of G view x as a value in (^) q r ←
(^) q c = gxhr^ c −−−−−−−−−−−−−−−→ − − − − − − − − − − − x, r −−−−−−−−−−−−−−−→ verify c =? gxhr
Note that in a cyclic group of prime order, every element except the identity is a generator. We now show that the above constitutes a perfect commitment scheme:
Hiding: Before sending the commitment, the sender verifies that e is prime and e > N ; this guarantees that gcd(e, φ(N )) = 1. (We require e > N because the receiver might try to cheat and send a modulus N which is not a product of two primes.) Thus, the function f : ∗ N → ∗ N defined by f (x) = xe^ mod N is a permutation. Since r is chosen uniformly at random in
∗ N , the value f (r) = re^ mod N is uniformly distributed in
∗ N. Since μ ∈
∗ N and hence μx^ ∈
∗ N , the product c = μxre^ is uniformly distributed in
∗ N and reveals no information about x. Another way to understand this is that for any commitment c ∈
∗ N and for any possible x ∈ (^) e, there exists an r ∈ ∗ N such that c = μxre^ mod N. So no information about x is revealed.
Binding: We show that if a cheating sender S ∗^ can decommit to two different values, then we can use it to break the RSA assumption (for large public exponents). Namely, given (N, e, μ) with N a randomly-generated product of two primes, e > N a prime, and μ chosen at random from
∗ N , we show how to use S∗^ to compute μ^1 /e. Simply send (N, e, μ) to S∗ and assume it sends back c ∈ ∗ N and can decommit to (x, r) and (x′, r′) such that x 6 = x′, μxre^ = c = μx ′ (r′)e^ mod N , and both x, x′^ ∈
(^) e. Without loss of generality assume x > x′. We know that: μxre^ = μx ′ (r′)e^ mod N ⇐⇒ μx−x ′ = (r′/r)e^ mod N.
Let ∆ def = x − x′. Using the fact that x, x′^ ∈ (^) e and e is prime, we see that ∆ < e and hence gcd(∆, e) = 1. Using the extended Euclidean algorithm, we can compute in polynomial time integers A, B such that A∆ + Be = 1 (over the integers). Then:
μ^1 = μA∆+Be^ =
μ∆
(r′/r)e
(r′/r)AμB^
)e mod N,
and so μ^1 /e^ = (r′/r)AμB^ mod N.
This algorithm runs in polynomial time if S ∗^ does, and outputs the desired inverse with the same probability that S∗^ can decommit to two different values. Since the former probability is negligible under the RSA assumption (for large prime exponents), the binding property follows.
[1] M. Naor. Bit Commitment Using Pseudorandomness. Journal of Cryptology 4(2): 151– 158 (1991).