This preview shows pages 1–8. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Public Key Cryptography 2 c circlecopyrt Eli Biham  August 18, 2010 292 Public Key Cryptography 2 (11) Public Key Cryptography c circlecopyrt Eli Biham  August 18, 2010 293 Public Key Cryptography 2 (11) RSA Reference : Rivest, Shamir, Adleman, A Method for Obtaining Digital Sig natures and Public Key Cryptosystems , CACM, Vol. 21, No. 2, pp. 120–126, February 1978. RSA is a public key cryptosystem based on number theory. The security of RSA is based on the difficulty of factoring a number to its prime factors, while its efficiency is based on the ease of multiplying prime numbers and checking whether given numbers are primes. c circlecopyrt Eli Biham  August 18, 2010 294 Public Key Cryptography 2 (11) • RSA — the Key Generation User A chooses his keys by: 1. Randomly chooses two large prime numbers p and q of size 512 bits (154 decimal digits) at least. 2. Computes n = pq (a 1024bit number). 3. Randomly chooses an odd number e in the range 1 < e < ϕ ( n ) which is coprime to ϕ ( n ) (i.e., e ∈ Z ∗ ϕ ( n ) ). 4. Computes e ≡ d − 1 (mod ϕ ( n )) by Euclid’s algorithm. Thus, de ≡ 1 (mod ϕ ( n )). 5. Publishes e , n as the public key, and keeps d secret as the secret key. (There is no need to keep p , q and ϕ ( n )). We denote the public key of user A by e A , n A and the secret key by d A . c circlecopyrt Eli Biham  August 18, 2010 295 Public Key Cryptography 2 (11) † RSA — the Key Generation (cont.) Notes : 1. It is easy to find random primes: One of every ln n numbers around n is a prime. Given a number, it is easy to check whether it is a prime (by a probabilistic algorithm). Therefore, to choose a random prime, random numbers are chosen and are checked whether they are primes. On average about ln n number are chosen and checked till a prime is found. 2. Choosing e : In Z ∗ ϕ ( n ) there are ϕ ( ϕ ( n )) invertible numbers modulo ϕ ( n ), and we do not choose even e ’s (which are not invertible). Thus, about ϕ ( n ) 2 ϕ ( ϕ ( n )) random e ’s should be chosen till an invertible e is found — in most cases the first or second chosen e is selected. c circlecopyrt Eli Biham  August 18, 2010 296 Public Key Cryptography 2 (11) † RSA — Encryption/Decryption The encryption algorithm E : Everybody can encrypt messages m (0 ≤ m < n A ) to user A by c = E A ( m ) = m e A mod n A . The ciphertext c (0 ≤ c < n A ) can be sent to A , and only A can decrypt. The decryption algorithm D : Only A knows his secret key d A and can decrypt: m = D A ( c ) = c d A mod n A . c circlecopyrt Eli Biham  August 18, 2010 297 Public Key Cryptography 2 (11) RSA — Correctness Theorem : ∀ m ∈ Z n D ( E ( m )) = m. Proof : We should prove that ∀ m ∈ Z n ( m e ) d ≡ m (mod n ) ....
View Full
Document
 Spring '11
 YanivCarmeli

Click to edit the document details