Top Banner
Public-Key Cryptography The convergence of prime numbers, the history of math, inverse functions, and a contemporary application
21
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: Pubic-Key Cryptography

Public-Key Cryptography

The convergence of prime numbers, the history of math, inverse functions, and a

contemporary application

Page 2: Pubic-Key Cryptography

Introduction to Cryptography

» Cryptography is the study of ways of writing a message that hides its meaning from everyone except the intended recipient.

» Encryption is a method of changing plaintext, the message to be hidden, to ciphertext, the message in its hidden form.

» Decryption is the procedure that changes ciphertext back to plaintext.

Page 3: Pubic-Key Cryptography

Basic Example

Plaintext - MATH RULES

Encryption rule - Write the plaintext backwards

Ciphertext - SELUR HTAM

Page 4: Pubic-Key Cryptography

Function Example - Encrypt

» Choose a function that has an inverse.

» Rewrite the message as blocks of numbers. 2210 2917 3627 3021 1428

M A T H R U L E S » Evaluate the function at each block. This

becomes the encrypted message.

f (x) =2x+1

(2210) 2(2210) 1 4421f = + =

Page 5: Pubic-Key Cryptography

Function Example -Decrypt

» Find the inverse of the encryption function. This is the decryption function.

» Evaluate the decryption function at each received block.

1 1 1( )

2 2f x x =

f −1(4421) =

12(4421)−

12=2210

Page 6: Pubic-Key Cryptography

Path to a Public Function

» Create a function whose inverse is extremely difficult to determine without precise details of how the function was created.

» Publish this function in a data base of public functions.

» Use the inverse function only you can determine to decrypt messages intended for you.

Page 7: Pubic-Key Cryptography

Egyptian Multiplication

1 26

2 52

4 104

8 208

16 416

32 > 23

Find 23 26

Page 8: Pubic-Key Cryptography

Egyptian Multiplication

1 26

2 52

4 104

8 208

16 416

23⋅26 =(1+ 2 + 4 +16)26=26 +52 +104 + 416=598

Find 23⋅26

Page 9: Pubic-Key Cryptography

New Egyptian Multiplication

23 26

1 2L {1,1,1,0,1} L {26,52,104,208,416}= =

( )1 2

1 2

L L {26,52,104,0,416}

Sum L L 598

=

=

10 223 10111=

Page 10: Pubic-Key Cryptography

Egyptian Exponentiation

2326

L1⋅L2 = 26,262 ,264 ,0,2616{ }

L1 = 1,1,1,0,1{ } L2 = 26,262 ,264 ,268 ,2616{ }

Prod L1⋅L2( )=2623 Nonzero elem ents

Page 11: Pubic-Key Cryptography

Modular Arithmetic

( ) ( ) ( )mod mod moda n b n a b n+ = +

( ) ( ) ( )mod mod moda n b n a b n =

( )mod modp pa n a n=

Page 12: Pubic-Key Cryptography

Modular Exponentiation

23325

mod 537

1 233 mod 537

2 2332 mod 537 = 52 mod 537

4 2334 mod 537 = 52

2 mod 537 = 19 mod 537

8 2338 mod 537 = 19

2 mod 537 = 361 mod 537

16 23316

mod 537 = 3612 mod 537 = 367 mod 537

Page 13: Pubic-Key Cryptography

Modular Exponentiation

23325

mod 537

1 233 mod 537

2 2332 mod 537 = 52 mod 537

4 2334 mod 537 = 52

2 mod 537 = 19 mod 537

8 2338 mod 537 = 19

2 mod 537 = 361 mod 537

16 23316

mod 537 = 3612 mod 537 = 367 mod 537

Page 14: Pubic-Key Cryptography

Modular Exponentiation

Because the exponent 25 = 1 + 8 + 16, the product of the nonzero elements is

23325 mod537 =(233m od537)(361m od537)(367m od537) =(341m od537)(367m od537) =26m od537

Page 15: Pubic-Key Cryptography

Public-Key Cryptography

» Choose two large prime numbers, p and q, and form their product n = pq.

» Calculate » Randomly choose e such that

and » The values of e and n are the public key.» The ciphertext, c, is c = me mod n, where m

is the message being encrypted.

ϕ(n)=(p−1)(q−1).

2<e<ϕ(n)

gcd(e,ϕ(n))=1.

Page 16: Pubic-Key Cryptography

An Encryption Example

» Let p = 83 and q = 89. Then n = 7387.

= (83 – 1)(89 – 1) = 7216» Randomly choose e = 23. Verify

» The encryption function is c = m23 mod 7387, where m is a plaintext message block and c is a cipher block.

gcd(e,ϕ(n))=1.

ϕ (n)

Page 17: Pubic-Key Cryptography

An Encryption Example

Encrypt M A T H R U L E S 2210 2917 3627 3021 1428

23

23

23

23

23

2210 mod7387 6117

2917 mod7387 1088

3627 mod7387 6030

3021 mod7387 1874

1428 mod7387 5878

=

=

=

=

=

Page 18: Pubic-Key Cryptography

Decryption Function

The decryption function is m = c1255 mod 7387.1255

1255

1255

1255

1255

6117 mod7387 2210

1088 mod7387 2917

6030 mod7387 3627

1874 mod7387 3021

5878 mod7387 1428

=

=

=

=

=

Page 19: Pubic-Key Cryptography

Public-Key Cryptography

» Theorem: The decryption function is given by m = cd mod n, where d is the solution of

» Basically, we have to prove that

cd = (me mod n)d = med mod n = m.

de≡1mod ϕ(n).

Page 20: Pubic-Key Cryptography

Other Applications

» Digital signatures• Olivia encrypts a message using her private

key. Henry decrypts the message using her public key.

• Better: Olivia first encrypts her message using Henry’s public key. Then uses her private key to encrypt that message.

» HTTPS

Page 21: Pubic-Key Cryptography

Contact Information

» [email protected]» http://public.me.com/galoisgroup