Lec4 - Public Key Cryptosystem Sheng Zhong 1 Recall...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Public Key Cryptosystem Sheng Zhong
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Recall Definition A public key cryptosystem is (M, C, K, G, E, D): M: cleartext message space C: ciphertext space K: key space G: generate encryption/decryption key pair from key length E: encrypt cleartext given encryption key D: decrypt ciphertext given decryption key
Background image of page 2
3 RSA Cryptosystem Most well known and widely used public- key cryptosystem. Named after inventors: Rivest, Shamir, and Adleman. Got Turing award for RSA Based on factoring of large number In fact, more than that.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 RSA Key Generation (1) Generate two large random primes p, q p, q are usually of the same length. N=pq Choose appropriate exponent e (of the same length). Compute d such that for all m, ) (mod 1 1 n m ed -
Background image of page 4
5 RSA Key Generation (2) Public Key: (n,e) Private Key: (n,d) Discard p,q Very important for security of RSA.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 RSA Encryption/Decryption Cleartext space: (an appropriate subset of ) {1, …, n-1} Ciphertext space: (an appropriate subset of ) {1, …, n-1} E((n,e), m)=m e mod n. D((n,d), c)=c d mod n.
Background image of page 6
7 Why does the decryption work? m n m n m n m n m n m n m n m n c ed ed ed d e d = = = = = = = - + - mod ) mod ( 1 ) mod ( ) mod ( mod ) ( mod mod ) ( mod 1 1 ) 1 (
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Exponentiation Algorithm Both encryption and decryption need to compute modular exponentiation. What algorithm do we use to do this? By definition, a e is multiplication of a for e times. Then even computing something like 754 238 takes a lot of time. How about computing a e for a=2497347974111112432432432243243242 34324234234320043543570 and e=…?
Background image of page 8
9 Fast Exponentiation(1) Let’s write e in binary, for example: e=1010000000110 Then Enough if we can fast compute 1 2 10 12 b b b 2 2 2 2 10 100 0 1000000000 000 1000000000 110 1010001000 a a a a a a a a a a b b e = = = 1 2 10 12 2 2 2 2 , , , a a a a
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Fast Exponentiation (2) But how can we fast compute Starting from a; Keep squaring, we get Until we have all items we need 1 2 10 12 2 2 2 2 , , , a a a a ,... , , , 4 3 2 1 2 2 2 2 a a a a
Background image of page 10
11 Fast Exponentiation Algorithm Input: a, e Output: y=a^e int b=a, y=1, ee=e; while(ee!=0){ //invariant (b^ee) y = a^e if(ee&1){ //is odd y*= b;} //multiply result by power b*=b; ee>>=1;} //compute next power
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12 Computing d? Now we see how encryption/decryption algorithms work. But how does key generation algorithm work? In particular, how to find d? Recall we need for all m, m ed-1 =1(mod n). This requires a little number theory.
Background image of page 12
13 Residue Class (1) For any modulus n, any integer a, we can define A={a’: a’=a mod n} This is called a residue class. For any modulus n, the residue classes
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/27/2010 for the course CSE 664 taught by Professor Shengzhong during the Spring '10 term at SUNY Buffalo.

Page1 / 69

Lec4 - Public Key Cryptosystem Sheng Zhong 1 Recall...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online