The RSA Algorithm...Public Key Cryptography Diffie-Hellman is the first use of asymmetric key. It...

Post on 30-Jan-2020

3 views 0 download

transcript

The RSA Algorithm

Public Key Cryptography● Diffie-Hellman is the first use of asymmetric key.

Public Key Cryptography● Diffie-Hellman is the first use of asymmetric key.● It has some impracticalities:

Public Key Cryptography● Diffie-Hellman is the first use of asymmetric key.● It has some impracticalities:

○ Setup phase: Alice has to exchange public information with each Bob.

Public Key Cryptography● Diffie-Hellman is the first use of asymmetric key.● It has some impracticalities:

○ Setup phase: Alice has to exchange public information with each Bob.

● These impracticalities are avoided by the Rivest-Shamir-Adleman (RSA) algorithm.

Public Key Model● The key is broken into a public and private part.

Public Key Model● The key is broken into a public and private part.

Public Key Model● The key is broken into a public and private part.● Bob and Alice publish their public keys.

Public Key Model● The key is broken into a public and private part.● Bob and Alice publish their public keys -- for all.

Public Key Model● The key is broken into a public and private part.● Bob and Alice publish their public keys -- for all.● Alice encrypts “hello” using Bob’s public key.

Public Key Model● The key is broken into a public and private part.● Bob and Alice publish their public keys -- for all.● Alice encrypts “hello” using Bob’s public key.● Alice sends the encrypted “g#bzr&*h” to Bob.

Public Key Model● The key is broken into a public and private part.● Bob and Alice publish their public keys -- for all.● Alice encrypts “hello” using Bob’s public key.● Alice sends the encrypted “g#bzr&*h” to Bob.● Bob decrypts with his private key.

Public Key Model● The key is broken into a public and private part.● Bob and Alice publish their public keys -- for all.● Alice encrypts “hello” using Bob’s public key.● Alice sends the encrypted “g#bzr&*h” to Bob.● Bob decrypts with his private key.● Bob reads “hello”.

Rivest Shamir Adleman (RSA)● Based on a one-way function -- i.e., a function that

is easy in one direction and hard in the other.

me mod N → c

Rivest Shamir Adleman (RSA)● Based on a one-way function -- i.e., a function that

is easy in one direction and hard in the other.

me mod N → c

m: message (a number)

Rivest Shamir Adleman (RSA)● Based on a one-way function -- i.e., a function that

is easy in one direction and hard in the other.

me mod N → c

m: message (a number)e: public exponent

Rivest Shamir Adleman (RSA)● Based on a one-way function -- i.e., a function that

is easy in one direction and hard in the other.

me mod N → c

m: message (a number)e: public exponentN: public modulus

Rivest Shamir Adleman (RSA)● Based on a one-way function -- i.e., a function that

is easy in one direction and hard in the other.

me mod N → c

m: message (a number)e: public exponentN: public modulusc: encrypted message

Rivest Shamir Adleman (RSA)● Based on a one-way function -- i.e., a function that

is easy in one direction and hard in the other.

me mod N → c

m: message (a number)e: public exponentN: public modulusc: encrypted message

Easy: Compute me mod N

Rivest Shamir Adleman (RSA)● Based on a one-way function -- i.e., a function that

is easy in one direction and hard in the other.

me mod N → c

m: message (a number)e: public exponentN: public modulusc: encrypted message

Easy: Compute me mod N Hard: Find m given (e,N)

Rivest Shamir Adleman (RSA)● Basic structure of RSA

med mod N → c

publicmodulus

privatekeypublic

key

Rivest Shamir Adleman (RSA)● Prime factorization problem:

○ Find the prime factors of N

Rivest Shamir Adleman (RSA)● Prime factorization problem:

○ Find the prime factors of N○ E.g: N= 20 20 = 2 x 2 x 5

Rivest Shamir Adleman (RSA)● Prime factorization problem:

○ Find the prime factors of N○ E.g: N= 20 20 = 2 x 2 x 5○ E.g: N= 45 45 = 3 x 3 x 5

Rivest Shamir Adleman (RSA)● Prime factorization problem:

○ Find the prime factors of N○ E.g: N= 20 20 = 2 x 2 x 5○ E.g: N= 45 45 = 3 x 3 x 5

● Easy for small values of N

Rivest Shamir Adleman (RSA)● Prime factorization problem:

○ Find the prime factors of N○ E.g: N= 20 20 = 2 x 2 x 5○ E.g: N= 45 45 = 3 x 3 x 5

● Easy for small values of N● Intractable for large values of N

Rivest Shamir Adleman (RSA)● Prime factorization problem:

○ Find the prime factors of N○ E.g: N= 20 20 = 2 x 2 x 5○ E.g: N= 45 45 = 3 x 3 x 5

● Easy for small values of N● Intractable for large values of N● RSA uses very large numbers for N : > 300 digits

RSA Summary

RSA Summary● Solves the key-exchange problem.

RSA Summary● Solves the key-exchange problem.

● Public keys can be published and distributed.

RSA Summary● Solves the key-exchange problem.

● Public keys can be published and distributed.

● Secured by the intractability of the prime factorization problem -- i.e., the problem of discovering the prime factors of a large number.