Discrete Mathematics with Applications MATH236
- Dr. Hung P. Tong-Viet
School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus
Semester 1, 2013
Tong-Viet (UKZN) MATH236 Semester 1, 2013 1 / 14
Discrete Mathematics with Applications MATH236 Dr. Hung P. - - PowerPoint PPT Presentation
Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet (UKZN) MATH236 Semester 1, 2013 1 /
Tong-Viet (UKZN) MATH236 Semester 1, 2013 1 / 14
Tong-Viet (UKZN) MATH236 Semester 1, 2013 2 / 14
The birth of public key cryptography
Tong-Viet (UKZN) MATH236 Semester 1, 2013 3 / 14
The birth of public key cryptography
1 Bob looks up Alice’s public key, pub(Alice) 2 Bob encrypts the message using pub(Alice) and send the encrypted
3 Alice decrypts the encrypted message using her private key pri(Alice) Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 14
The birth of public key cryptography
Tong-Viet (UKZN) MATH236 Semester 1, 2013 5 / 14
The birth of public key cryptography
1 For a given plaintext P, and public key pub(A), it should be easy to
2 If only the ciphertext C is known, it should be computationally
3 If the ciphertext C and the private key pri(A) are known, it should be
4 It should be easy to generate pairs (pub(A),pri(A)) of public and
Tong-Viet (UKZN) MATH236 Semester 1, 2013 6 / 14
The RSA cryptosystem
Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 14
The RSA cryptosystem Key generation
1 Alice picks two large primes p and q of roughly the same size. She
2 Alice then selects a random integer e, 1 < e < φ(n) such that
3 She computes the inverse d of e in Zφ(n), i.e., ed ≡ 1 (mod φ(n)) 4 Finally, she sets pri(Alice)=(n,d) and pub(Alice)=(n,e) 5 Since the modulus n in Alice’s private key is the same n in her public
Tong-Viet (UKZN) MATH236 Semester 1, 2013 8 / 14
The RSA cryptosystem Key generation
1 Suppose that Alice chooses p = 47 and q = 59 2 Then n = pq = 2773 and φ(n) = (p − 1)(q − 1) = 2668 3 Alice now chooses a number e such that 1 < e < 2668 and
4 She chooses e = 17, a small prime number, with 17 ∤ 2668 5 Find e−1 = 17−1 in Z2668 6 d = e−1 = 157 (using Extended Division Algorithm) 7 Thus pri(Alice)= d = 157 and pub(Alice)= (2773, 17). Tong-Viet (UKZN) MATH236 Semester 1, 2013 9 / 14
The RSA cryptosystem Encryption and Decryption
1 Bob looks up pub(Alice)=(n,e) 2 Bob represents his message, M, as an integer in the interval
3 Bob encrypts M into ciphertext C by the rule C = Me mod n 4 To decrypt the ciphertext C Alice receives from Bob, she uses her
Tong-Viet (UKZN) MATH236 Semester 1, 2013 10 / 14
The RSA cryptosystem Encryption and Decryption
Tong-Viet (UKZN) MATH236 Semester 1, 2013 11 / 14
The RSA cryptosystem Encryption and Decryption
Tong-Viet (UKZN) MATH236 Semester 1, 2013 12 / 14
The RSA cryptosystem Encryption and Decryption
Tong-Viet (UKZN) MATH236 Semester 1, 2013 13 / 14
The RSA cryptosystem Encryption and Decryption
Tong-Viet (UKZN) MATH236 Semester 1, 2013 14 / 14