130 likes | 242 Vues
This lecture delves into public key cryptosystems, focusing on how participants utilize public and private keys for secure communication. It introduces prime numbers and discusses their role in encryption, particularly through the RSA algorithm, which allows users to encrypt and sign messages using publicly distributed keys. The presentation covers the fundamental theorem of arithmetic, steps to generate RSA keys, and the security aspects of RSA, including the challenges of factoring large integers, which are critical for the cryptosystem's robustness.
E N D
Introduction to Cryptography Lecture 9
Public – Key Cryptosystems • Each participant has a public key and a private key. • It should be infeasible to determine the private key from knowledge of the public key.
message Alice Public – Key Cryptosystems Bob • Bob encrypts message using Alice’s public key • Alice decrypt message using her private key
Prime Numbers Definition: A prime number is an integer number that has only two divisors: one and itself. Example: 1, 2,17, 31. • Prime numbers distributed irregularly among the integers • There are infinitely many prime numbers
Factoring • The Fundamental Theorem of Arithmetic tells us that every positive integer can be written as a product of powers of primes in essentially one way. Example:
The RSA Public – Key Cryptosystem • In 1978, Ronald Rives, Adi Shamir, and Leonard Adelman wrote a paper called “A Method for Obtaining Digital Signatures and Public Key Cryptosystem”. • They described a cipher system in which senders encrypt message using a method and a key that are publicly distributed.
The RSA Public – Key Cryptosystem Alice: • Selects two prime numbers p and q. • Calculates m = pq and n = (p - 1)(q - 1). • Selects number e relatively prime to n • Finds inverse of e modulo n • Publishes e and m
The RSA Public – Key Cryptosystem To encrypt the message x: • Bob computes: . • Bob sends y to Alice. To Decrypt the message y: • Alice computes: .
The RSA Public – Key Cryptosystem Example: • p =127, q = 223. • Then m = 28321 and n = 27972 • Let e = 5623, check gcd(n,e) = 1. • Then using Extended Euclidean Algorithm d = 22495. • Public Key: (5623, 28321).
The RSA Public – Key Cryptosystem Example: • Let the message be x = 3620. • Then • Alice gets one and decrypts it • Then
The RSA Public – Key Cryptosystem • Why does this method work? • Last step is a little bit more complicate • How secure is RSA? • Can opponent deduce d and n from (m,e)? • The opponent can find n and d only if he can factor m.
Factoring • Problem of factoring a number is very hard • Fermat’s factoring method sometimes can be used to find any large factors of a number fair quickly (pg.251) • Want to make sure Fermat’s factoring method does not work for your key • p and q should be at least 155 decimal digits each
Homework • Read pg.286-293. • Exercises: 2(a), 4(c), 5(a) on pg.294. • Those questions will be a part of your collected homework.