Top Banner
Cryptography and Internet Security How mathematics makes it safe to shop on- line John Lindsay Orr University of Nebraska - Lincoln
48

Cryptography and Internet Security How mathematics makes it safe to shop on-line

Dec 30, 2015

Download

Documents

Sean Madden

Cryptography and Internet Security How mathematics makes it safe to shop on-line. John Lindsay Orr University of Nebraska - Lincoln. http://www.math.unl.edu/~jorr/presentations. Bad Guys on the Net Why we need internet security. Alice. Server. Alice. Server. Alice. Server. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Cryptography and Internet Security

How mathematics makes it safe to shop on-line

John Lindsay OrrUniversity of Nebraska - Lincoln

Page 2: Cryptography and Internet Security How mathematics makes it safe to shop on-line

http://www.math.unl.edu/~jorr/presentations

Page 3: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Bad Guys on the Net

Why we need internet security

Page 4: Cryptography and Internet Security How mathematics makes it safe to shop on-line
Page 5: Cryptography and Internet Security How mathematics makes it safe to shop on-line
Page 6: Cryptography and Internet Security How mathematics makes it safe to shop on-line
Page 7: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Alice

Server

Page 8: Cryptography and Internet Security How mathematics makes it safe to shop on-line
Page 9: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Alice

Server

Page 10: Cryptography and Internet Security How mathematics makes it safe to shop on-line
Page 11: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Alice

Server

Page 12: Cryptography and Internet Security How mathematics makes it safe to shop on-line
Page 13: Cryptography and Internet Security How mathematics makes it safe to shop on-line

…if he had anything confidential to say, he wrote it in cipher, that is, by so changing the order of the letters of the alphabet, that not a word could be made out. If anyone wishes to decipher these, and get at their meaning, he must substitute the fourth letter of the alphabet, namely D, for A, and so with the others.

…si qua occultius perferenda erant, per notas scripsit, id est sic structo litterarum ordine, ut nullum uerbum effici posset: quae si qui inuestigare et persequi uelit, quartam elementorum litteram, id est D pro A et perinde reliquas commutet.

Suetonius Life of Julius Caesar, 56

Codes and Ciphers

Julius Caesar and MI5

Page 14: Cryptography and Internet Security How mathematics makes it safe to shop on-line
Page 15: Cryptography and Internet Security How mathematics makes it safe to shop on-line

zabIJK

H a r r y P o t t e r

S r w w h uH d u u y

“… substitute the fourth letter of the alphabet, namely D, for A, and so with the others…”

Page 16: Cryptography and Internet Security How mathematics makes it safe to shop on-line

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2

Page 17: Cryptography and Internet Security How mathematics makes it safe to shop on-line

1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 1213 14 15 16 17 18 … 1 2 3 4 5 6 …

Modular Arithmetic

Page 18: Cryptography and Internet Security How mathematics makes it safe to shop on-line

)(mod mba

mba of multiple a is

)12 (mod 1310

)12 (mod 862

121121131)310(

12112848)62(

Page 19: Cryptography and Internet Security How mathematics makes it safe to shop on-line

)26(mod 1037

)26(mod 330

)26(mod 20317

)26(mod 1324

H

KA

DR

UY

B

Caesar Cipher

(twice)

Page 20: Cryptography and Internet Security How mathematics makes it safe to shop on-line

)26(mod 1037

)26(mod 660

)26(mod 0917

)26(mod 101224

H

KA

GR

AY

K

Polyalphabetic Cipher

(twice)

Page 21: Cryptography and Internet Security How mathematics makes it safe to shop on-line

A cipher is a set of rules for encrypting data.

A cipher is symmetric if knowledge of the information needed to encrypt also gives you knowledge of how to decrypt.

)26(mod 3: aaE

)26(mod 3: aaD

Page 22: Cryptography and Internet Security How mathematics makes it safe to shop on-line

The Chicken and the Egg

Symmetric and asymmetric ciphers

Page 23: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Alice

Let’s use a + 3 (mod 26)

Okey dokey..

a – 3(mod 26)

Server

Page 24: Cryptography and Internet Security How mathematics makes it safe to shop on-line

An asymmetric cipher, or public key cipher, is one where knowing the information needed to encrypt doesn’t help you decrypt.

An asymmetric cipher has two parts:

A public key kpublic encrypts

A private key kprivate decrypts

Keep the private key secret – give the public key to anyone.

Page 25: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Alice

You use kpublic

Okey dokey..

kpublic

kprivate

Server(Alice)kpublic

(Alice)kpublic

Page 26: Cryptography and Internet Security How mathematics makes it safe to shop on-line

525,600 Minutes

Why asymmetric ciphers work

Page 27: Cryptography and Internet Security How mathematics makes it safe to shop on-line

So:

An asymmetric cipher, or public key cipher, is one where knowing the information needed to encrypt doesn’t help you decrypt.

How is this possible?In fact, kpublic and kprivate are related, but…

kpublic kprivate

Page 28: Cryptography and Internet Security How mathematics makes it safe to shop on-line

RSA Public Key Cryptography

Described by

Rob Rivest, Adi Shamir, and Leonard Adleman

at MIT in 1977.

The idea is based on prime numbers…

Page 29: Cryptography and Internet Security How mathematics makes it safe to shop on-line

A prime number is one whose only factors are 1 and itself.

e.g. 2, 3, 5, 7, 11, 13 but not 4, or 6

Theorem. Every number is the product of prime numbers.

e.g. 1,386 = 2×693 = 2×3×231 = 2×3×3×77=2×3×3×7×11

Theorem. There is no biggest prime number.

If 2,3,5,7,…,P were all the prime numbers then what about

1 + 2 × 3 × 5 × 7 × … × P

Page 30: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Each of these numbers is the product of exactly two prime numbers. What are they?

6

10

21

221

713

456,989,977,669

= 2 × 3

= 2 × 5

= 3 × 7

= 13 × 17

= 23 × 31

= 611,953 × 746,773

= P5000 × P6000

The RSA public key consists of a number which is the product of two prime numbers. If you could figure out which two prime numbers you could find the private key.

Page 31: Cryptography and Internet Security How mathematics makes it safe to shop on-line

“Ask a computer – computers are good at these kind of things…”

Look again at

456,989,977,669= 611,953 × 746,773

Page 32: Cryptography and Internet Security How mathematics makes it safe to shop on-line

One way to factor 456,989,977,669 is to check all the numbers

1,2,3,… up to 676,0107,669456,989,97 . If a computer can do 1,000,000 tests in a second, then it can do this in just 676,010 ÷ 1,000,000 = 0.676 seconds.

But what if N = P×Q is 100 digits long? Then

10099 1010 N so

5049 1010 N

and the computer can solve it in

44650 101010 seconds.

Page 33: Cryptography and Internet Security How mathematics makes it safe to shop on-line

years1017331,536,000

10 3644

.

1044 = 100,000,000,000,000,000,000,000,000,000,000,000,000,000,000 seconds

There are

60 × 24 × 365 = 525,600 minutes in a year

and so there are

60 × 525,600 = 31,536,000 seconds.

So 1044 seconds is

That’s 3,170,000,000,000,000,000,000,000,000,000,000,000 years

Age of the universe = 13,700,000,000 years

Page 34: Cryptography and Internet Security How mathematics makes it safe to shop on-line
Page 35: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Theorem. There is no biggest prime number.

And we have good algorithms for finding very big prime numbers (100’s of digits)

But we have no methods of finding the prime factors of N=PQ that are qualitatively better than just checking all possibilities:

T = C Ad where d = # digits in N

Page 36: Cryptography and Internet Security How mathematics makes it safe to shop on-line

How does RSA work?

Need to generate a public and a private key.

Step 1: Pick two (very) big prime numbers p and q

Step 2: Pick a number 0 < r < (p – 1)(q – 1)

Step 3: Find a number 0 < s < (p – 1)(q – 1) such that

Key Fact: For any number x,

))1)(1(mod( 1 qprs

)(mod pqxx rs

)(mod mba mba of multiple a is

)1)(1( of multiple a is 1 qprs

Page 37: Cryptography and Internet Security How mathematics makes it safe to shop on-line

How does RSA work? (cont…)

Key Fact: For any number x,

Let n = pq

Now, given x…

To encode x: Calculate y = the remainder of xr ÷ n

To decode y: Calculate the remainder of ys ÷ n

)(mod pqxx rs

Public Key: n and rPrivate Key: n and s

)(mod pqxy r

)(modx pqxy rss

Why does it work?

Page 38: Cryptography and Internet Security How mathematics makes it safe to shop on-line

))1)(1(mod( 1 qprs

)1)(1( 1 qpkrs

)1)(1(1 qpkrs

kq-p-qpkrs xxxx )( )1)(1()1)(1(1

)(mod 11 px p

)(mod 11 qxq

)(mod 1)1)(1( pqx qp

“Fermat’s Little Theorem”

“Chinese Remainder Theorem”

)(mod pqxx rs

)mod()1( pqx x k

Page 39: Cryptography and Internet Security How mathematics makes it safe to shop on-line

The Bad Guys Get Smart

Man-in-the-middle attacks

Page 40: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Alice

Server

You use kpublic(Alice)

Okey dokey..

(Alice)kpublic

(Alice)kprivate

(Alice)kpublic

(Alice)kpublic

Page 41: Cryptography and Internet Security How mathematics makes it safe to shop on-line

(Alice)kprivate

(Alice)kpublic

Mallory

Alice

Server

You use kpublic(Alice)

Okey dokey..

You use kpublic

(Mallory)

Okey dokey..

(Mallory)kpublic

(Alice)kpublic

(Mallory)kprivate

(Mallory)kpublic

(Alice)kpublic

(Mallory)kpublic

Page 42: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Digital Signatures

Page 43: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Bob

(Bob)kprivate

(Bob)kprivate

(Bob)kpublic

(Bob)kpublic

Digital Signatures

Anyone can read the message…

…but only one person could have written the message…

Bob!

Page 44: Cryptography and Internet Security How mathematics makes it safe to shop on-line

(CA)

Mallory

Alice

Server

(Alice)kprivate

(Alice)kpublic

Certificate Authority

kprivate(CA)

kpublic

(Alice)kpublic

(CA)kprivate

(Alice)kpublic

Page 45: Cryptography and Internet Security How mathematics makes it safe to shop on-line

Security Ain’t Safety

Phishing

Page 46: Cryptography and Internet Security How mathematics makes it safe to shop on-line
Page 47: Cryptography and Internet Security How mathematics makes it safe to shop on-line
Page 48: Cryptography and Internet Security How mathematics makes it safe to shop on-line

http://www.math.unl.edu/~jorr/presentations