Download presentation
Presentation is loading. Please wait.
Published byHolly Harris Modified over 9 years ago
1
flipping coins over the telephone and other games
2
If Alice and Bob are on the phone and make a decision by flipping a coin, and make a decision by flipping a coin, what’s to keep the person with the coin from just asserting their preference, instead of reporting the actual result? what’s to keep the person with the coin from just asserting their preference, instead of reporting the actual result?
3
Alice chooses two large prime numbers, p and q, both congruent to 3 mod 4. She keeps p and q secret but sends the product n=pq to Bob. Alice chooses two large prime numbers, p and q, both congruent to 3 mod 4. She keeps p and q secret but sends the product n=pq to Bob. Alice uses her knowledge of p and q to compute square roots of y mod n. There are four of them: +a, and +b. One of them is x, but she doesn’t know which. So she chooses one at random and sends it to Bob. Alice uses her knowledge of p and q to compute square roots of y mod n. There are four of them: +a, and +b. One of them is x, but she doesn’t know which. So she chooses one at random and sends it to Bob. Alice sends b to Bob. Alice sends b to Bob. Bob chooses a secret x and computes y=x2 mod n. He sends y to Alice. that was the “flip” If b=+x, then Bob tells Alice she wins. If b+x, then Bob wins.
4
Why should this be safe? If x=+a, (so Bob wins) then Bob can use his knowledge of all four square roots of y to factor n.* He can prove he has won by telling Alice p and q. If x=+a, (so Bob wins) then Bob can use his knowledge of all four square roots of y to factor n.* He can prove he has won by telling Alice p and q. But if x=+b, then Bob should not be able to factor n and produce p and q. (Factoring is hard, that’s why RSA is secure.) But if x=+b, then Bob should not be able to factor n and produce p and q. (Factoring is hard, that’s why RSA is secure.) *if x=+a, gcd(x-b,n) gives a non trivial factor of n.
5
And what keeps Alice honest? If Alice tried to send some random number rather than a square root of y? Bob can verify Bob can verify….………….. that the square her number is congruent to y is congruent to y….……….. And what if Alice sneaks in a third factor? Bob can ask her for Bob can ask her for……….. her factors and verify them.
6
Poker over the telephone
7
Alice chooses secret with gcd( , p-1)=1 and computes -1 mod p-1. Alice chooses secret with gcd( , p-1)=1 and computes -1 mod p-1. Bob chooses secret with gcd( , p-1)=1 and computes -1 mod p-1. Bob chooses secret with gcd( , p-1)=1 and computes -1 mod p-1. Bob and Alice agree on a large prime p. These values are good for one hand only. The 52 cards are each assigned different numbers mod p by some prearranged scheme.
8
a scheme 1030504 1109140704 172105051404 1001031104 20051404
9
Alice chooses five of these, b i1,b i2,…,b i5. Alice calculates b ij for her five cards, and sends them to Bob. Alice applies the power -1 to the five values; this reveals her five card hand. Alice then sends five other b i values to Bob. Bob computes b i =c i mod p, b i =c i mod p, and sends them all to Alice. Bob applies the power -1 to the five values he receives from Alice, and returns them. Who applies the power -1 to reveal his five card hand. Dealing additional cards can continue in this fashion. Betting is done as usual.
10
using number theory to cheat at telephone poker A number r mod p is a quadratic residue if there are solutions to the congruence x 2 =r mod p. For a nonresidue n, there are no solutions to the congruence x 2 =n mod p. The values 1,2,…,p-1 are divided equally among the residues and nonresidues. It is easy to determine whether a number z is a residue or a nonresidue:
11
And recall that since and were chosen relatively prime to (p-1), they are both odd. A card c is encrypted by Bob as b=c . The encrypted card has the same residuosity as the nonencrypted card. This would appear to give Bob an advantage.
12
But if Alice knows some number theory, too, she can also use this information about residues and non residues to her advantage. She, after all, deals the five cards to Bob, and can choose to send him all residues or all nonresidues in any combination that suits her need. She could even suggest a prime where, for the encoding scheme for cards, the high cards all fall in one group or the other! Will Bob notice, after a few hands, that he has been receiving only nonresidues in his hand? Will Alice and Bob continue to play together?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.