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 icon This 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern