Solution: Alice tosses a coin and conveys the result to Bob. Problem: Alice can choose any result.

Size: px
Start display at page:

Download "Solution: Alice tosses a coin and conveys the result to Bob. Problem: Alice can choose any result."

Transcription

1 Example - Coin Toss Coin Toss: Alice and Bob want to toss a coin. Easy to do when they are in the same room. How can they toss a coin over the phone? Mutual Commitments Solution: Alice tosses a coin and conveys the result to Bob. Problem: Alice can choose any result. Solution: Alice and Bob each tosses a coin and then they send the results to each other. The coin toss result is the XOR of both tosses. Problem: The one who sends the result first has no influence on the result, while the second can choose any result. Note: There is a strong dependency on the simultaneous publication of the result. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) Mental Poker Alice and Bob want to play poker over the phone. At the beginning of the game they need to deal the cards, such that: A player knows his own cards. A player does not know the other player s cards. Both players do not know any of the cards in the deck. No card appears more than once. No player can change his cards without the other player noticing it. If Alice holds a deck of cards and deals the cards, then in order to tell Bob about his hand Alice must know his hand. Further more, Alice can deal the cards any way she pleases. Thus, we need a protocol for dealing the cards, such that: 1. A player knows his own cards. 2. A player does not know the other player s cards. 3. The hands are always disjoint. 4. All dealings have the same probability. 5. It is possible to reveal cards or to exchange cards. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) Solution: The usage of a trusted third party. If Alice and Bob have a mutual trusted friend, who can be the dealer, and has a private communication channel both to Alice and to Bob, it is possible to use him to solve the problems. But sometimes a third party cannot be used. For example who will be the third party to choose random bits to be used in protocols between super powers? and how can we make sure that a private channel is not eavesdropped? Thus, we are interested in protocols which do not involve a third party. Claim: A protocol for mental poker, for which all the above 5 conditions are met, cannot be constructed without a third party. Proof: Assume that we have a deck of 3 cards denoted by x, y, z, and that each of the players got one card. Assume that each of the players is a probabilistic Turing machine (i.e., can use random bits). We execute the protocol and we further assume that A got x and B got y. A knows the protocol, and thus can simulate B on all possible random inputs and therefore can choose only simulations for which A and B send the messages which were actually sent. B can receive y, but z is also a possible card. Similarly, A receives x or z. The communication between A and B is the same in all the runs, thus it may be possible that both received z in contradiction to the disjointment of the hands. QED c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) Coin Toss Alice and Bob want to toss a coin over the phone. If Alice commits to a bit, and promises not to change her choice after Bob tells her about his coin toss, we get that the protocol: Alice: Chooses a bit b A. Bob: Chooses a bit b B. Bob Alice: b B. Alice Bob: b A. Both: b = b A b B. It is clear that Bob cannot choose the result of the coin toss. On the other hand, Alice was committed to b A before knowing b B and therefore she cannot choose the result of the coin toss, as well. Thus, we want to ensure that Alice does not change her choice after hearing b B. is secure. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3)

2 Bit Commitment This protocol is a building block for the construction of other protocols, and we will use it later. Objective: Alice chooses a bit b and uses it in some protocol, with Bob. Bob needs to make sure that Alice uses b and not b, but Alice prefers not to reveal b. The Model: Alice sends a commitment C on b to Bob, from which b cannot be reconstructed. Revealment phase: later Alice reveals b to Bob, and Bob checks the commitment. Example: Bit Commitment (cont.) Let f be an one-way permutation and let B be a hardcore predicate of f. Then Alice and Bob can perform the following BC protocol: Alice chooses b, and a random number r (100-bit number) such that B(r) = b. Alice sends the commitment C = f(r) to Bob. Later for the revealment phase: Alice sends b and r to Bob. Bob checks whether C = f(r) and b = B(r). If not then Alice cheated, Otherwise Bob concludes that Alice indeed committed to b. What goes wrong when B is not a hardcore predicate? What goes wrong when f is not a permutation? c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) RSA based example: Bit Commitment (cont.) Alice chooses n = p q,e, d as in RSA, and a random number 0 r < n with parity b (or another hardcore predicate B(r) = b), and sends n,e and r e (mod n) to Bob. At the revealment phase, Alice sends p and q to Bob. From p and q Bob calculates d, r and B(r) and then compares B(r) to b. Coin Toss Our coin toss protocol by using general BC: Alice: Chooses b A and commits to b. Bob: Chooses a bit b B and sends it to Alice. Alice: Reveals b A. Bob: Checks out Alice s commitment. Both: b = b A b B. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) A protocol based on the hardness of factoring: 1. A chooses p,q and computes n = p q (as in RSA) and sends n to B. 2. B chooses a random number u such that 1 < u < n and reveals z = u2 2 (mod n) to A. 3. A computes ±x, ±y - the 4 roots of z (mod n) by using p,q. Assume, WLG, that x, y n 2 (and that x, y n 2 ). It is obvious that u = x or u = y. 4. A guesses whether u = x or u = y. A finds the index i of the least significant bit for which x i y i, then sends to B one of the following guesses: Your i th bit is 0 or Your i th bit is B informs A whether he was right (heads) or wrong (tails). 6. B sends u to A. 7. A sends the factors of n, p and q, to B. c Eli Biham - March 20, Mutual Commitments (3) A cannot know whether u = x or u = y, thus he has to guess. If B can cheat by changing u after A s guess, then he knows both roots x, y of z = u 2 (mod n) under n 2 and therefore can factor n. In order to prevent A from revealing the other root of z = u 2 (mod n) to B, A reveals only i + 1 bits of the other root (i equal, 1 different). c Eli Biham - March 20, Mutual Commitments (3) A Protocol for Mental Poker Assume, WLG, that A is the dealer. The cards are marked by the numbers 1,...,52 (or otherwise). We refer to them as w 1,...,w 52. We assume the use of a commutative public key cryptosystem (e.g., Pohlig and Hellman s cryptosystem), in which A and B have keys which are kept secret (i.e., encryption and decryption keys are kept secret). 1. B shuffles the cards and encrypts them by E B and sends E B (w 1 ),E B (w 2 ),...,E B (w 52 ) to A. 2. A chooses 5 random cards and informs B about them. B decrypts them. The result is B s hand. 3. A chooses 5 random cards and encrypt them: E A (E B (w i )). A sends the encrypted 5 cards to B. B decrypts and gets D B (E A (E B (w i ))) = E A (w i ) and sends to A. A decrypts and gets w i. The result is A s hand. 4. After the end of the game they reveal their keys. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3)

3 Note: All 5 conditions are met: If the encryption keys are not kept secret, each side can encrypt all 52 cards, and by that be able to identify the cards. It is possible to add random bits to the card names before encryption, but that does not prevent Bob from identifying the cards. The additional randomness should be chosen such that all cards have the same quadratic residuocity. We add redundancy to the names of the cards to make sure that random values are not dealt instead of those actually encrypted. 1. A player knows his own cards. 2. A player does not know the other player s cards: knowing that is equivalent to breaking the cipher. 3. The hands are always disjoint: as this is the way they are chosen. 4. All dealings have the same probability: because the two players choose the cards at random. No one of them can eliminate the randomness alone. 5. It is possible to reveal cards or to exchange cards: It is easy for a player to reveal a specific card. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) Note: RSA is not recommended here because: 1. It cannot be used with 2 different n s. 2. If both parties use the same n, and both know the factorization (as both have their own e and d), then it reduces to using Pohlig-Hellman twice in parallel, modulo p and modulo q. Oblivious Transfer (OT) Another tool for classified communication. Enables Alice to send a bit to Bob, such that he receives the bit with 50% chance, but Alice does not know whether he received it or not. Another version of OT enables Alice to send several secrets to Bob, such that Bob receives exactly one of them, and Alice doesn t know which one. OT protocols are used as building blocks for other protocols. DLOG can be used. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) Example: using factorization. Let n = p q as in RSA. WLG, assume that the secret is the factors p, q and Alice wants Bob to receive p,q with 50% chance, without her knowing whether he received the secret or not. Obviously, it is possible to encrypt any secret using RSA, and knowing the factorization implies knowing the secret. A One-out-of-Two Secrets OT Protocol: Alice has 2 secrets s 0,s 1. She sends them to Bob, such that Bob receives exactly one of the secrets, but she does not know which of them he receives. This protocol is non interactive: Alice sends a message to Bob, but Bob does not sends any messages to Alice. 1. Bob chooses x and sends x 2 (mod n) to Alice. 2. Alice computes the 4 roots and sends one of them to Bob. 3. Bob checks whether the root he received is ±x (mod n). If it is: Bob did not receive any new information. If it isn t: Bob can factor n. Alice doesn t know which of the 4 roots is x, thus she chooses ±x with probability 1 2. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) The system parameters: p - a large prime. g - a primitive root of Z p. c - a value which no one knows its discrete logarithm. We assume the Diffie and Hellman assumption: it is impossible to compute g xy (mod p) given g x,g y (mod p). Private and public keys: Each user randomly chooses a value 0 x p 2 and a bit i {0, 1} and computes: β i g x (mod p) β 1 i c (g x ) 1 (mod p) The user s public key is (β 0, β 1) and his secret key is (i,x). c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3)

4 The owner of a key does not know the DLOG of both β 0 and β 1, otherwise he would have known the DLOG of c β 0 β 1 (mod p) in contradiction with our assumption. On the other hand, if the owner is cheating and does not know any of the DLOG s of β 0 and β 1, it is his problem (he can always receive a value and forget about it immediately). The protocol: 1. Alice receives Bob s β, chooses random values y 0,y 1 in the range [0, p 2], and computes for j {0, 1}: and sends α 0, α 1,r o,r 1 to Bob. α j g yj (mod p) γ j β yj j (mod p) r j s j γ j 2. Bob computes, using the secret (i,x): α x i g xyi β yi i γ i (mod p) s i γ i r i He gets only one out of the secrets s 0, s 1, but cannot get both, because if he knows s 1 i, he will know γ 1 i, which means he can compute g xyi (mod p) given α i g yi (mod p) and β i g x (mod p). c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) In order to receive one secret out of many secrets, it is possible to use a protocol similar to the mental poker protocol, where each card is a secret and Alice lets Bob choose a secret. A commutative cryptosystem, public keys know to both users: 1. B sends y 1,...,y k random values (in the size of the secrets) to A. 2. A sends z j = E A (S j y j ),j = 1,...,k to B. 3. B chooses the i th secret and sends x = E B (z i ) to A. 4. A sends D A (x) to Bob. 5. Bob computes s i = D B (D A (x)) y i. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) OT Applications J. Killian, Founding cryptography or oblivious transfer, STOC 20, 1988, pp Abstract Suppose your net-mail is being erratically censored by Captain Yossarian. Whenever you send a message, he censors each bit of the message with probability 1 2, replacing each censored bit by some reserved character. Well versed is such concepts as redundancy, this is no real problem to you. The question is, can it actually be turned around and used to your advantage?... By using OT it is possible to perform: Bit Commitment. OT Applications (cont.) Non Interactive Zero Knowledge (NIZK) without any additional assumptions (as the sender does not know what the receiver receives). c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3) OT Applications (cont.) Oblivious Circuit Evaluation: given f(x 1,...,x n ) Alice and Bob want to compute f on the input x 1,...,x n, when: Bob knows x 1,...,x m. Alice knows x m+1,...,x n. Bob should receive the value of f(x 1,...,x n ). Bob should not receive any information on x m+1,...,x n, apart from the information he gets from knowing the value of f. Alice should not receive any information on x 1,...,x m or on the value of f(x 1,...,x n). BC Using OT The following protocol applies BC using OT, without any additional assumptions. Committing to a bit b: Alice chooses k bits b 1,b 2,...,b k such that b = b 1 b 2 b k (for k large enough). Alice sends b 1, b 2,...,b k to Bob, each by OT. Bob receives b 1, b 2,...,b k, where for all i: b i = b i with probability 1 2 and b i = # with probability 1 2, as well (# means that the i th bit was not received). The commitment is performed t times on the same bit b. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3)

5 Decommitting: BC Using OT (cont.) Security: BC Using OT (cont.) Alice sends b 1, b 2,...,b k to Bob. Bob checks whether b i = b i or b i = # for all i. If not Alice is cheating. Bob computes b = b 1 b 2 b k. The decommitment is performed t times and Bob checks that the same bit b is accepted every time. Bob can discover b before Alice decommits only when he receives all k bits in one of the t iterations. The probability for that is less than t 2 k, which is exponentially small. Alice can cheat Bob about the value of b if she sends some b i flipped in the decommitting phase to Bob. The probability that Bob catches her is 1 2. The probability that Alice cheats Bob in all t iterations is 2 t. c Eli Biham - March 20, Mutual Commitments (3) c Eli Biham - March 20, Mutual Commitments (3)

Diffie-Hellman key-exchange protocol

Diffie-Hellman key-exchange protocol Diffie-Hellman key-exchange protocol This protocol allows two users to choose a common secret key, for DES or AES, say, while communicating over an insecure channel (with eavesdroppers). The two users

More information

Cryptography CS 555. Topic 20: Other Public Key Encryption Schemes. CS555 Topic 20 1

Cryptography CS 555. Topic 20: Other Public Key Encryption Schemes. CS555 Topic 20 1 Cryptography CS 555 Topic 20: Other Public Key Encryption Schemes Topic 20 1 Outline and Readings Outline Quadratic Residue Rabin encryption Goldwasser-Micali Commutative encryption Homomorphic encryption

More information

Introduction to Cryptography CS 355

Introduction to Cryptography CS 355 Introduction to Cryptography CS 355 Lecture 25 Mental Poker And Semantic Security CS 355 Fall 2005 / Lecture 25 1 Lecture Outline Review of number theory The Mental Poker Protocol Semantic security Semantic

More information

The Chinese Remainder Theorem

The Chinese Remainder Theorem The Chinese Remainder Theorem Theorem. Let n 1,..., n r be r positive integers relatively prime in pairs. (That is, gcd(n i, n j ) = 1 whenever 1 i < j r.) Let a 1,..., a r be any r integers. Then the

More information

The Chinese Remainder Theorem

The Chinese Remainder Theorem The Chinese Remainder Theorem Theorem. Let m and n be two relatively prime positive integers. Let a and b be any two integers. Then the two congruences x a (mod m) x b (mod n) have common solutions. Any

More information

The number theory behind cryptography

The number theory behind cryptography The University of Vermont May 16, 2017 What is cryptography? Cryptography is the practice and study of techniques for secure communication in the presence of adverse third parties. What is cryptography?

More information

Merkle s Puzzles. c Eli Biham - May 3, Merkle s Puzzles (8)

Merkle s Puzzles. c Eli Biham - May 3, Merkle s Puzzles (8) Merkle s Puzzles See: Merkle, Secrecy, Authentication, and Public Key Systems, UMI Research press, 1982 Merkle, Secure Communications Over Insecure Channels, CACM, Vol. 21, No. 4, pp. 294-299, April 1978

More information

Data security (Cryptography) exercise book

Data security (Cryptography) exercise book University of Debrecen Faculty of Informatics Data security (Cryptography) exercise book 1 Contents 1 RSA 4 1.1 RSA in general.................................. 4 1.2 RSA background.................................

More information

Math 319 Problem Set #7 Solution 18 April 2002

Math 319 Problem Set #7 Solution 18 April 2002 Math 319 Problem Set #7 Solution 18 April 2002 1. ( 2.4, problem 9) Show that if x 2 1 (mod m) and x / ±1 (mod m) then 1 < (x 1, m) < m and 1 < (x + 1, m) < m. Proof: From x 2 1 (mod m) we get m (x 2 1).

More information

EE 418: Network Security and Cryptography

EE 418: Network Security and Cryptography EE 418: Network Security and Cryptography Homework 3 Solutions Assigned: Wednesday, November 2, 2016, Due: Thursday, November 10, 2016 Instructor: Tamara Bonaci Department of Electrical Engineering University

More information

Yale University Department of Computer Science

Yale University Department of Computer Science LUX ETVERITAS Yale University Department of Computer Science Secret Bit Transmission Using a Random Deal of Cards Michael J. Fischer Michael S. Paterson Charles Rackoff YALEU/DCS/TR-792 May 1990 This work

More information

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography Colin Stirling Informatics Some slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete

More information

TMA4155 Cryptography, Intro

TMA4155 Cryptography, Intro Trondheim, December 12, 2006. TMA4155 Cryptography, Intro 2006-12-02 Problem 1 a. We need to find an inverse of 403 modulo (19 1)(31 1) = 540: 540 = 1 403 + 137 = 17 403 50 540 + 50 403 = 67 403 50 540

More information

Cryptography. 2. decoding is extremely difficult (for protection against eavesdroppers);

Cryptography. 2. decoding is extremely difficult (for protection against eavesdroppers); 18.310 lecture notes September 2, 2013 Cryptography Lecturer: Michel Goemans 1 Public Key Cryptosystems In these notes, we will be concerned with constructing secret codes. A sender would like to encrypt

More information

18.S34 (FALL, 2007) PROBLEMS ON PROBABILITY

18.S34 (FALL, 2007) PROBLEMS ON PROBABILITY 18.S34 (FALL, 2007) PROBLEMS ON PROBABILITY 1. Three closed boxes lie on a table. One box (you don t know which) contains a $1000 bill. The others are empty. After paying an entry fee, you play the following

More information

Lecture 32. Handout or Document Camera or Class Exercise. Which of the following is equal to [53] [5] 1 in Z 7? (Do not use a calculator.

Lecture 32. Handout or Document Camera or Class Exercise. Which of the following is equal to [53] [5] 1 in Z 7? (Do not use a calculator. Lecture 32 Instructor s Comments: This is a make up lecture. You can choose to cover many extra problems if you wish or head towards cryptography. I will probably include the square and multiply algorithm

More information

Primitive Roots. Chapter Orders and Primitive Roots

Primitive Roots. Chapter Orders and Primitive Roots Chapter 5 Primitive Roots The name primitive root applies to a number a whose powers can be used to represent a reduced residue system modulo n. Primitive roots are therefore generators in that sense,

More information

Public Key Encryption

Public Key Encryption Math 210 Jerry L. Kazdan Public Key Encryption The essence of this procedure is that as far as we currently know, it is difficult to factor a number that is the product of two primes each having many,

More information

Mathematical Foundations HW 5 By 11:59pm, 12 Dec, 2015

Mathematical Foundations HW 5 By 11:59pm, 12 Dec, 2015 1 Probability Axioms Let A,B,C be three arbitrary events. Find the probability of exactly one of these events occuring. Sample space S: {ABC, AB, AC, BC, A, B, C, }, and S = 8. P(A or B or C) = 3 8. note:

More information

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 7 Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 Cryptography studies techniques for secure communication in the presence of third parties. A typical

More information

Solutions for the Practice Final

Solutions for the Practice Final Solutions for the Practice Final 1. Ian and Nai play the game of todo, where at each stage one of them flips a coin and then rolls a die. The person who played gets as many points as the number rolled

More information

Number Theory and Public Key Cryptography Kathryn Sommers

Number Theory and Public Key Cryptography Kathryn Sommers Page!1 Math 409H Fall 2016 Texas A&M University Professor: David Larson Introduction Number Theory and Public Key Cryptography Kathryn Sommers Number theory is a very broad and encompassing subject. At

More information

Block Ciphers Security of block ciphers. Symmetric Ciphers

Block Ciphers Security of block ciphers. Symmetric Ciphers Lecturers: Mark D. Ryan and David Galindo. Cryptography 2016. Slide: 26 Assume encryption and decryption use the same key. Will discuss how to distribute key to all parties later Symmetric ciphers unusable

More information

Secure Function Evaluation

Secure Function Evaluation Secure Function Evaluation 1) Use cryptography to securely compute a function/program. 2) Secure means a) Participant s inputs stay secret even though they are used in the computation. b) No participant

More information

ElGamal Public-Key Encryption and Signature

ElGamal Public-Key Encryption and Signature ElGamal Public-Key Encryption and Signature Çetin Kaya Koç koc@cs.ucsb.edu Çetin Kaya Koç http://koclab.org Winter 2017 1 / 10 ElGamal Cryptosystem and Signature Scheme Taher ElGamal, originally from Egypt,

More information

Classical Cryptography

Classical Cryptography Classical Cryptography CS 6750 Lecture 1 September 10, 2009 Riccardo Pucella Goals of Classical Cryptography Alice wants to send message X to Bob Oscar is on the wire, listening to all communications Alice

More information

Differential Cryptanalysis of REDOC III

Differential Cryptanalysis of REDOC III Differential Cryptanalysis of REDOC III Ken Shirriff Address: Sun Microsystems Labs, 2550 Garcia Ave., MS UMTV29-112, Mountain View, CA 94043. Ken.Shirriff@eng.sun.com Abstract: REDOC III is a recently-developed

More information

CHAPTER 2. Modular Arithmetic

CHAPTER 2. Modular Arithmetic CHAPTER 2 Modular Arithmetic In studying the integers we have seen that is useful to write a = qb + r. Often we can solve problems by considering only the remainder, r. This throws away some of the information,

More information

Assignment 2. Due: Monday Oct. 15, :59pm

Assignment 2. Due: Monday Oct. 15, :59pm Introduction To Discrete Math Due: Monday Oct. 15, 2012. 11:59pm Assignment 2 Instructor: Mohamed Omar Math 6a For all problems on assignments, you are allowed to use the textbook, class notes, and other

More information

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography Mathematics Explorers Club Fall 2012 Number Theory and Cryptography Chapter 0: Introduction Number Theory enjoys a very long history in short, number theory is a study of integers. Mathematicians over

More information

A Probability Work Sheet

A Probability Work Sheet A Probability Work Sheet October 19, 2006 Introduction: Rolling a Die Suppose Geoff is given a fair six-sided die, which he rolls. What are the chances he rolls a six? In order to solve this problem, we

More information

MA/CSSE 473 Day 9. The algorithm (modified) N 1

MA/CSSE 473 Day 9. The algorithm (modified) N 1 MA/CSSE 473 Day 9 Primality Testing Encryption Intro The algorithm (modified) To test N for primality Pick positive integers a 1, a 2,, a k < N at random For each a i, check for a N 1 i 1 (mod N) Use the

More information

Public-key Cryptography: Theory and Practice

Public-key Cryptography: Theory and Practice Public-key Cryptography Theory and Practice Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Chapter 5: Cryptographic Algorithms Common Encryption Algorithms RSA

More information

1. The chance of getting a flush in a 5-card poker hand is about 2 in 1000.

1. The chance of getting a flush in a 5-card poker hand is about 2 in 1000. CS 70 Discrete Mathematics for CS Spring 2008 David Wagner Note 15 Introduction to Discrete Probability Probability theory has its origins in gambling analyzing card games, dice, roulette wheels. Today

More information

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence.

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence. Section 4.4 Linear Congruences Definition: A congruence of the form ax b (mod m), where m is a positive integer, a and b are integers, and x is a variable, is called a linear congruence. The solutions

More information

3 The multiplication rule/miscellaneous counting problems

3 The multiplication rule/miscellaneous counting problems Practice for Exam 1 1 Axioms of probability, disjoint and independent events 1. Suppose P (A) = 0.4, P (B) = 0.5. (a) If A and B are independent, what is P (A B)? What is P (A B)? (b) If A and B are disjoint,

More information

CS 261 Notes: Zerocash

CS 261 Notes: Zerocash CS 261 Notes: Zerocash Scribe: Lynn Chua September 19, 2018 1 Introduction Zerocash is a cryptocurrency which allows users to pay each other directly, without revealing any information about the parties

More information

Public-Key Cryptosystem Based on Composite Degree Residuosity Classes. Paillier Cryptosystem. Harmeet Singh

Public-Key Cryptosystem Based on Composite Degree Residuosity Classes. Paillier Cryptosystem. Harmeet Singh Public-Key Cryptosystem Based on Composite Degree Residuosity Classes aka Paillier Cryptosystem Harmeet Singh Harmeet Singh Winter 2018 1 / 26 Background s Background Foundation of public-key encryption

More information

p 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m.

p 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m. Great Theoretical Ideas In Computer Science Steven Rudich CS - Spring Lecture Feb, Carnegie Mellon University Modular Arithmetic and the RSA Cryptosystem p- p MAX(a,b) + MIN(a,b) = a+b n m means that m

More information

Application: Public Key Cryptography. Public Key Cryptography

Application: Public Key Cryptography. Public Key Cryptography Application: Public Key Cryptography Suppose I wanted people to send me secret messages by snail mail Method 0. I send a padlock, that only I have the key to, to everyone who might want to send me a message.

More information

Xor. Isomorphisms. CS70: Lecture 9. Outline. Is public key crypto possible? Cryptography... Public key crypography.

Xor. Isomorphisms. CS70: Lecture 9. Outline. Is public key crypto possible? Cryptography... Public key crypography. CS70: Lecture 9. Outline. 1. Public Key Cryptography 2. RSA system 2.1 Efficiency: Repeated Squaring. 2.2 Correctness: Fermat s Theorem. 2.3 Construction. 3. Warnings. Cryptography... m = D(E(m,s),s) Alice

More information

CMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall

CMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall CMath 55 PROFESSOR KENNETH A. RIBET Final Examination May 11, 015 11:30AM :30PM, 100 Lewis Hall Please put away all books, calculators, cell phones and other devices. You may consult a single two-sided

More information

Fermat s little theorem. RSA.

Fermat s little theorem. RSA. .. Computing large numbers modulo n (a) In modulo arithmetic, you can always reduce a large number to its remainder a a rem n (mod n). (b) Addition, subtraction, and multiplication preserve congruence:

More information

Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017

Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017 Name: Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017 INSTRUCTIONS Read Carefully Time: 50 minutes There are 5 problems. Write your name legibly at the top of this page. No calculators

More information

SMT 2014 Advanced Topics Test Solutions February 15, 2014

SMT 2014 Advanced Topics Test Solutions February 15, 2014 1. David flips a fair coin five times. Compute the probability that the fourth coin flip is the first coin flip that lands heads. 1 Answer: 16 ( ) 1 4 Solution: David must flip three tails, then heads.

More information

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 13

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 13 CS 70 Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 13 Introduction to Discrete Probability In the last note we considered the probabilistic experiment where we flipped a

More information

3. (8 points) If p, 4p 2 + 1, and 6p are prime numbers, find p. Solution: The answer is p = 5. Analyze the remainders upon division by 5.

3. (8 points) If p, 4p 2 + 1, and 6p are prime numbers, find p. Solution: The answer is p = 5. Analyze the remainders upon division by 5. 1. (6 points) Eleven gears are placed on a plane, arranged in a chain, as shown below. Can all the gears rotate simultaneously? Explain your answer. (4 points) What if we have a chain of 572 gears? Solution:

More information

The Sign of a Permutation Matt Baker

The Sign of a Permutation Matt Baker The Sign of a Permutation Matt Baker Let σ be a permutation of {1, 2,, n}, ie, a one-to-one and onto function from {1, 2,, n} to itself We will define what it means for σ to be even or odd, and then discuss

More information

Example 1. An urn contains 100 marbles: 60 blue marbles and 40 red marbles. A marble is drawn from the urn, what is the probability that the marble

Example 1. An urn contains 100 marbles: 60 blue marbles and 40 red marbles. A marble is drawn from the urn, what is the probability that the marble Example 1. An urn contains 100 marbles: 60 blue marbles and 40 red marbles. A marble is drawn from the urn, what is the probability that the marble is blue? Assumption: Each marble is just as likely to

More information

CS70: Lecture 8. Outline.

CS70: Lecture 8. Outline. CS70: Lecture 8. Outline. 1. Finish Up Extended Euclid. 2. Cryptography 3. Public Key Cryptography 4. RSA system 4.1 Efficiency: Repeated Squaring. 4.2 Correctness: Fermat s Theorem. 4.3 Construction.

More information

The topic for the third and final major portion of the course is Probability. We will aim to make sense of statements such as the following:

The topic for the third and final major portion of the course is Probability. We will aim to make sense of statements such as the following: CS 70 Discrete Mathematics for CS Spring 2006 Vazirani Lecture 17 Introduction to Probability The topic for the third and final major portion of the course is Probability. We will aim to make sense of

More information

Discrete Mathematics and Probability Theory Spring 2018 Ayazifar and Rao Midterm 2 Solutions

Discrete Mathematics and Probability Theory Spring 2018 Ayazifar and Rao Midterm 2 Solutions CS 70 Discrete Mathematics and Probability Theory Spring 2018 Ayazifar and Rao Midterm 2 Solutions PRINT Your Name: Oski Bear SIGN Your Name: OS K I PRINT Your Student ID: CIRCLE your exam room: Pimentel

More information

Chapter 6: Probability and Simulation. The study of randomness

Chapter 6: Probability and Simulation. The study of randomness Chapter 6: Probability and Simulation The study of randomness Introduction Probability is the study of chance. 6.1 focuses on simulation since actual observations are often not feasible. When we produce

More information

Theory of Probability - Brett Bernstein

Theory of Probability - Brett Bernstein Theory of Probability - Brett Bernstein Lecture 3 Finishing Basic Probability Review Exercises 1. Model flipping two fair coins using a sample space and a probability measure. Compute the probability of

More information

Variations on the Two Envelopes Problem

Variations on the Two Envelopes Problem Variations on the Two Envelopes Problem Panagiotis Tsikogiannopoulos pantsik@yahoo.gr Abstract There are many papers written on the Two Envelopes Problem that usually study some of its variations. In this

More information

3 The multiplication rule/miscellaneous counting problems

3 The multiplication rule/miscellaneous counting problems Practice for Exam 1 1 Axioms of probability, disjoint and independent events 1 Suppose P (A 0, P (B 05 (a If A and B are independent, what is P (A B? What is P (A B? (b If A and B are disjoint, what is

More information

Final exam. Question Points Score. Total: 150

Final exam. Question Points Score. Total: 150 MATH 11200/20 Final exam DECEMBER 9, 2016 ALAN CHANG Please present your solutions clearly and in an organized way Answer the questions in the space provided on the question sheets If you run out of room

More information

Lecture 39: GMW Protocol GMW

Lecture 39: GMW Protocol GMW Lecture 39: Protocol Recall Last lecture we saw that we can securely compute any function using oblivious transfer (which can be constructed from the RSA assumption) However, the protocol is efficient

More information

CIS 2033 Lecture 6, Spring 2017

CIS 2033 Lecture 6, Spring 2017 CIS 2033 Lecture 6, Spring 2017 Instructor: David Dobor February 2, 2017 In this lecture, we introduce the basic principle of counting, use it to count subsets, permutations, combinations, and partitions,

More information

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following:

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following: CS 70 Discrete Mathematics for CS Fall 2004 Rao Lecture 14 Introduction to Probability The next several lectures will be concerned with probability theory. We will aim to make sense of statements such

More information

Math 1111 Math Exam Study Guide

Math 1111 Math Exam Study Guide Math 1111 Math Exam Study Guide The math exam will cover the mathematical concepts and techniques we ve explored this semester. The exam will not involve any codebreaking, although some questions on the

More information

Public Key Cryptography

Public Key Cryptography Public Key Cryptography How mathematics allows us to send our most secret messages quite openly without revealing their contents - except only to those who are supposed to read them The mathematical ideas

More information

Secure multiparty computation without one-way functions

Secure multiparty computation without one-way functions Secure multiparty computation without one-way functions Dima Grigoriev CNRS, Mathématiques, Université de Lille 59655, Villeneuve d Ascq, France dmitry.grigoryev@math.univ-lille1.fr Vladimir Shpilrain

More information

CS1802 Week 9: Probability, Expectation, Entropy

CS1802 Week 9: Probability, Expectation, Entropy CS02 Discrete Structures Recitation Fall 207 October 30 - November 3, 207 CS02 Week 9: Probability, Expectation, Entropy Simple Probabilities i. What is the probability that if a die is rolled five times,

More information

November 8, Chapter 8: Probability: The Mathematics of Chance

November 8, Chapter 8: Probability: The Mathematics of Chance Chapter 8: Probability: The Mathematics of Chance November 8, 2013 Last Time Probability Models and Rules Discrete Probability Models Equally Likely Outcomes Crystallographic notation The first symbol

More information

MA 111, Topic 2: Cryptography

MA 111, Topic 2: Cryptography MA 111, Topic 2: Cryptography Our next topic is something called Cryptography, the mathematics of making and breaking Codes! In the most general sense, Cryptography is the mathematical ideas behind changing

More information

Secure Distributed Computation on Private Inputs

Secure Distributed Computation on Private Inputs Secure Distributed Computation on Private Inputs David Pointcheval ENS - CNRS - INRIA Foundations & Practice of Security Clermont-Ferrand, France - October 27th, 2015 The Cloud David Pointcheval Introduction

More information

Section : Combinations and Permutations

Section : Combinations and Permutations Section 11.1-11.2: Combinations and Permutations Diana Pell A construction crew has three members. A team of two must be chosen for a particular job. In how many ways can the team be chosen? How many words

More information

The tenure game. The tenure game. Winning strategies for the tenure game. Winning condition for the tenure game

The tenure game. The tenure game. Winning strategies for the tenure game. Winning condition for the tenure game The tenure game The tenure game is played by two players Alice and Bob. Initially, finitely many tokens are placed at positions that are nonzero natural numbers. Then Alice and Bob alternate in their moves

More information

Cryptography, Number Theory, and RSA

Cryptography, Number Theory, and RSA Cryptography, Number Theory, and RSA Joan Boyar, IMADA, University of Southern Denmark November 2015 Outline Symmetric key cryptography Public key cryptography Introduction to number theory RSA Modular

More information

Distributed Settlers of Catan

Distributed Settlers of Catan Distributed Settlers of Catan Hassan Alsibyani, Tim Mickel, Willy Vasquez, Xiaoyue Zhang Massachusetts Institute of Technology May 15, 2014 Abstract Settlers of Catan is a popular multiplayer board game

More information

23 Applications of Probability to Combinatorics

23 Applications of Probability to Combinatorics November 17, 2017 23 Applications of Probability to Combinatorics William T. Trotter trotter@math.gatech.edu Foreword Disclaimer Many of our examples will deal with games of chance and the notion of gambling.

More information

L29&30 - RSA Cryptography

L29&30 - RSA Cryptography L29&30 - RSA Cryptography CSci/Math 2112 20&22 July 2015 1 / 13 Notation We write a mod n for the integer b such that 0 b < n and a b (mod n). 2 / 13 Calculating Large Powers Modulo n Example 1 What is

More information

DTTF/NB479: Dszquphsbqiz Day 30

DTTF/NB479: Dszquphsbqiz Day 30 DTTF/NB479: Dszquphsbqiz Day 30 Announcements: Questions? This week: Digital signatures, DSA Coin flipping over the phone RSA Signatures allow you to recover the message from the signature; ElGamal signatures

More information

Ma/CS 6a Class 16: Permutations

Ma/CS 6a Class 16: Permutations Ma/CS 6a Class 6: Permutations By Adam Sheffer The 5 Puzzle Problem. Start with the configuration on the left and move the tiles to obtain the configuration on the right. The 5 Puzzle (cont.) The game

More information

Here are two situations involving chance:

Here are two situations involving chance: Obstacle Courses 1. Introduction. Here are two situations involving chance: (i) Someone rolls a die three times. (People usually roll dice in pairs, so dice is more common than die, the singular form.)

More information

1 2-step and other basic conditional probability problems

1 2-step and other basic conditional probability problems Name M362K Exam 2 Instructions: Show all of your work. You do not have to simplify your answers. No calculators allowed. 1 2-step and other basic conditional probability problems 1. Suppose A, B, C are

More information

Journal of Discrete Mathematical Sciences & Cryptography Vol. ( ), No., pp. 1 10

Journal of Discrete Mathematical Sciences & Cryptography Vol. ( ), No., pp. 1 10 Dynamic extended DES Yi-Shiung Yeh 1, I-Te Chen 2, Ting-Yu Huang 1, Chan-Chi Wang 1, 1 Department of Computer Science and Information Engineering National Chiao-Tung University 1001 Ta-Hsueh Road, HsinChu

More information

Math 14 Lecture Notes Ch. 3.3

Math 14 Lecture Notes Ch. 3.3 3.3 Two Basic Rules of Probability If we want to know the probability of drawing a 2 on the first card and a 3 on the 2 nd card from a standard 52-card deck, the diagram would be very large and tedious

More information

Number Theory and Security in the Digital Age

Number Theory and Security in the Digital Age Number Theory and Security in the Digital Age Lola Thompson Ross Program July 21, 2010 Lola Thompson (Ross Program) Number Theory and Security in the Digital Age July 21, 2010 1 / 37 Introduction I have

More information

Introduction to Number Theory 2. c Eli Biham - November 5, Introduction to Number Theory 2 (12)

Introduction to Number Theory 2. c Eli Biham - November 5, Introduction to Number Theory 2 (12) Introduction to Number Theory c Eli Biham - November 5, 006 345 Introduction to Number Theory (1) Quadratic Residues Definition: The numbers 0, 1,,...,(n 1) mod n, are called uadratic residues modulo n.

More information

Math 1111 Math Exam Study Guide

Math 1111 Math Exam Study Guide Math 1111 Math Exam Study Guide The math exam will cover the mathematical concepts and techniques we ve explored this semester. The exam will not involve any codebreaking, although some questions on the

More information

Compound Probability. Set Theory. Basic Definitions

Compound Probability. Set Theory. Basic Definitions Compound Probability Set Theory A probability measure P is a function that maps subsets of the state space Ω to numbers in the interval [0, 1]. In order to study these functions, we need to know some basic

More information

Lecture 18 - Counting

Lecture 18 - Counting Lecture 18 - Counting 6.0 - April, 003 One of the most common mathematical problems in computer science is counting the number of elements in a set. This is often the core difficulty in determining a program

More information

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI 1. Hensel Lemma for nonsingular solutions Although there is no analogue of Lagrange s Theorem for prime power moduli, there is an algorithm for determining

More information

Dominant and Dominated Strategies

Dominant and Dominated Strategies Dominant and Dominated Strategies Carlos Hurtado Department of Economics University of Illinois at Urbana-Champaign hrtdmrt2@illinois.edu Junel 8th, 2016 C. Hurtado (UIUC - Economics) Game Theory On the

More information

Chapter 3: Elements of Chance: Probability Methods

Chapter 3: Elements of Chance: Probability Methods Chapter 3: Elements of Chance: Methods Department of Mathematics Izmir University of Economics Week 3-4 2014-2015 Introduction In this chapter we will focus on the definitions of random experiment, outcome,

More information

November 6, Chapter 8: Probability: The Mathematics of Chance

November 6, Chapter 8: Probability: The Mathematics of Chance Chapter 8: Probability: The Mathematics of Chance November 6, 2013 Last Time Crystallographic notation Groups Crystallographic notation The first symbol is always a p, which indicates that the pattern

More information

The Teachers Circle Mar. 20, 2012 HOW TO GAMBLE IF YOU MUST (I ll bet you $5 that if you give me $10, I ll give you $20.)

The Teachers Circle Mar. 20, 2012 HOW TO GAMBLE IF YOU MUST (I ll bet you $5 that if you give me $10, I ll give you $20.) The Teachers Circle Mar. 2, 22 HOW TO GAMBLE IF YOU MUST (I ll bet you $ that if you give me $, I ll give you $2.) Instructor: Paul Zeitz (zeitzp@usfca.edu) Basic Laws and Definitions of Probability If

More information

Week 1: Probability models and counting

Week 1: Probability models and counting Week 1: Probability models and counting Part 1: Probability model Probability theory is the mathematical toolbox to describe phenomena or experiments where randomness occur. To have a probability model

More information

4.1 Sample Spaces and Events

4.1 Sample Spaces and Events 4.1 Sample Spaces and Events An experiment is an activity that has observable results. Examples: Tossing a coin, rolling dice, picking marbles out of a jar, etc. The result of an experiment is called an

More information

Section 6.1 #16. Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

Section 6.1 #16. Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit? Section 6.1 #16 What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit? page 1 Section 6.1 #38 Two events E 1 and E 2 are called independent if p(e 1

More information

( ) Online MC Practice Quiz KEY Chapter 5: Probability: What Are The Chances?

( ) Online MC Practice Quiz KEY Chapter 5: Probability: What Are The Chances? Online MC Practice Quiz KEY Chapter 5: Probability: What Are The Chances? 1. Research on eating habits of families in a large city produced the following probabilities if a randomly selected household

More information

EE 418 Network Security and Cryptography Lecture #3

EE 418 Network Security and Cryptography Lecture #3 EE 418 Network Security and Cryptography Lecture #3 October 6, 2016 Classical cryptosystems. Lecture notes prepared by Professor Radha Poovendran. Tamara Bonaci Department of Electrical Engineering University

More information

Math 127: Equivalence Relations

Math 127: Equivalence Relations Math 127: Equivalence Relations Mary Radcliffe 1 Equivalence Relations Relations can take many forms in mathematics. In these notes, we focus especially on equivalence relations, but there are many other

More information

Such a description is the basis for a probability model. Here is the basic vocabulary we use.

Such a description is the basis for a probability model. Here is the basic vocabulary we use. 5.2.1 Probability Models When we toss a coin, we can t know the outcome in advance. What do we know? We are willing to say that the outcome will be either heads or tails. We believe that each of these

More information

CSC/MATA67 Tutorial, Week 12

CSC/MATA67 Tutorial, Week 12 CSC/MATA67 Tutorial, Week 12 November 23, 2017 1 More counting problems A class consists of 15 students of whom 5 are prefects. Q: How many committees of 8 can be formed if each consists of a) exactly

More information

Grade 6 Math Circles Fall Oct 14/15 Probability

Grade 6 Math Circles Fall Oct 14/15 Probability 1 Faculty of Mathematics Waterloo, Ontario Centre for Education in Mathematics and Computing Grade 6 Math Circles Fall 2014 - Oct 14/15 Probability Probability is the likelihood of an event occurring.

More information

Contributions to Mental Poker

Contributions to Mental Poker Contributions to Mental Poker Submitted to Universitat Autònoma de Barcelona in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science by Jordi Castellà-Roca

More information

6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method

6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method Exercises Exercises 1. Show that 15 is an inverse of 7 modulo 26. 2. Show that 937 is an inverse of 13 modulo 2436. 3. By inspection (as discussed prior to Example 1), find an inverse of 4 modulo 9. 4.

More information