applied cryptography - protocols, algorithms, and source code in c

C cbre mod n 3 alice sends bob p p cd mod n 4 bob

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Later, Alice may check to make sure that Bob told her the correct outcome of the toss. Coin Flipping Using Square Roots Coin-flip subprotocol: (1) Alice chooses two large primes, p and q, and sends their product, n to Bob. (2) Bob chooses a random positive integer, r, such that r is less than n/2. Bob computes z = r2 mod n and sends z to Alice. (3) Alice computes the four square roots of z (mod n). She can do this because she knows the factorization of n. Let’s call them +x, -x, +y, and -y. Call x' the smaller of these two numbers: x mod n -x mod n Similarly, call y' the smaller of these two numbers: y mod n -y mod n Note that r is equal either to x' or y'. (4) Alice guesses whether r = x' or r = y', and sends her guess to Bob. (5) If Alice’s guess is correct, the result of the coin flip is heads. If Alice’s guess is incorrect, the result of the coin flip is tails. Bob announces the result of the coin flip. Verification subprotocol: (6) Alice sends p and q to Bob. (7) Bob computes x' and y' and sends them to Alice. (8) Alice calculates r. Alice has no way of knowing r, so her guess is real. She only tells Bob one bit of her guess in step (4) to prevent Bob from getting both x' and y'. If Bob has both of those numbers, he can change r after step (4). Coin Flipping Using Exponentiation Modulo p Exponentiation modulo a prime number, p, is used as a one-way function in this protocol [1306]: Coin-flip subprotocol: (1) Alice chooses a prime number, p, in such a way that the factorization of p - 1 is known and contains at least one large prime. (2) Bob selects two primitive elements, h and t, in GF(p). He sends them to Alice. (3) Alice checks that h and t are primitive and then chooses a random integer x, relatively prime to p - 1. She then computes one of the two values: y = hx mod p, or y = tx mod p She sends y to Bob. (4) Bob guesses whether Alice calculated y as afunction of h or t, and sends his guess to Alice. (5) If Bob’s guess is correct, the result of the coin flip is heads. If Bob’s guess is...
View Full Document

This note was uploaded on 10/18/2010 for the course MATH CS 301 taught by Professor Aliulger during the Fall '10 term at Koç University.

Ask a homework question - tutors are online