+ All Categories
Home > Documents > Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Date post: 12-Jan-2016
Category:
Upload: jemimah-fox
View: 220 times
Download: 0 times
Share this document with a friend
Popular Tags:
22
Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application
Transcript
Page 1: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Copyright © - 2004-2014 – Curt Hill

Cryptography

Number Theory’s Practical Application

Page 2: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Introduction• Encryption is mechanism for obscuring a

message from someone else in a reversible way – Decryption is reversing it

• Cryptography is the study• Historically used to send messages

during wars– Non-standard hieroglyphics date back to at

least 1900 BC

• Most of the historic ciphers are relatively easy to break

Copyright © - 2004-2014 – Curt Hill

Page 3: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Terminology• Plain text

– A message that is readable– AKA Clear text

• Cipher text– A message that has been disguised

• Key – A string that allows the encryption and

decryption

Copyright © - 2004-2014 – Curt Hill

Page 4: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

What we want• Encryption technique E(M,K) which

takes a message M and a key K• Decryption technique D(M,K) which

also takes message M and key K• Both E and D return a string• M = D(E(M,K),K)• Neither E nor D needs to be concealed• Only secret thing is K the key• E and D are efficiently computable

Copyright © - 2004-2014 – Curt Hill

Page 5: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Historical Ciphers• Any technique that gives one side of

a war an advantage over the other is of interest

• However most of these are not of interest to us in discrete math:

• Transposition and Substitution Cipher• Enigma and Colosus • One time pad• Stream Cipher• Block Cipher• Feistel Cipher• DES, AES

Copyright © - 2004-2014 – Curt Hill

Page 6: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Enigma• Code machine used by Germans in

World War II• Several rotors• A letter is typed in the rotors provide a

single substitution cipher for that letter• The rotors are now advanced• The next letter gets a different

transposition• The key becomes the rotor settings• The Colossus was used to break

Copyright © - 2004-2014 – Curt Hill

Page 7: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Enigma Again• Would have been secure if used

properly• Instead they often used same key for

too long• Predictable openings were often used:

– Common greetings: Mein Fueherer!– This gives away the key to analysis

• Users thought it was magic so did not worry enough

Copyright © - 2004-2014 – Curt Hill

Page 8: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

One time pad• The one time pad is a string of

offsets to add to each letter of message

• Two copies of the pad: the sender and receiver

• Pad is never reused • Algorithmically unbreakable if there

is no pattern in the pad• Transfer of the pad may be a problem

Copyright © - 2004-2014 – Curt Hill

Page 9: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

OTP ExamplePlain ASCII B A T

ASCII Numeric

66 65 84

One time pad

12 9 23

Cipher numeric

78 74 107

Cipher as ASCII

N J k

Copyright © - 2004-2014 – Curt Hill

Page 10: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Distribution• The problem with most ciphers is

called the key distribution problem• How is the key given to the receiver

by the sender?• Since everything else is known this

becomes a weak link• Public Key Encryption does not suffer

from this problem

Copyright © - 2004-2014 – Curt Hill

Page 11: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Public key encryption• AKA Trapdoor algorithms• Each user has a public and private key• These are usually very large numbers,

based on primes• The key is that multiplying/dividing

very large numbers is easy• Factoring a very large number into its

primes is very difficult– Conceivably taking years

Copyright © - 2004-2014 – Curt Hill

Page 12: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Authors• This algorithm was devised by Ron

Rivest, Adi Shamir and Leonard Adleman

• RSA became the name of the algorithm

• MIT patented• Published in 1977• Proofs of its effectiveness abound• They received Turing award

Copyright © - 2004-2014 – Curt Hill

Page 13: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Key Generation•Find two large primes, P and Q

–Approximately equal in size

•Compute the product N = PQ–N should be 1024 bits or larger–Known as the modulus

•Compute = (P-1)(Q-1) is spelled phi and pronounced fee

Copyright © - 2004-2014 – Curt Hill

Page 14: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Two more• Choose E such that 1 < E <

– E and must be relatively prime– Neither needs to be prime but

relatively prime to each other– This is the public exponent or

encryption exponent

• Find D– 1 < D < – ED mod = 1– This is the secret exponent or decryption

exponent

Copyright © - 2004-2014 – Curt Hill

Page 15: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

How it works• The public key is a pair (E,N) and the

private key is also a pair (D,N)• Everyone participating in concealed

messages publishes their public key where anyone can access

• The private key as well as P, Q and N are also kept secret

Copyright © - 2004-2014 – Curt Hill

Page 16: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Sending a message• Albert wants to send Bob a secret

message• Obtains Bobs public key (E,N)• Convert the clear text into numeric

chunks of the suitable length, call one of these M

• Compute cipher text: C = ME mod N• Repeat for subsequent chunks and

send

Copyright © - 2004-2014 – Curt Hill

Page 17: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Reading sent message• Bob now wants to read Albert’s

message• Use his own private key to restore

the plain text– M = CD mod N

Copyright © - 2004-2014 – Curt Hill

Page 18: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Another Thought• Anyone may send a message to

anyone else• How do we determine if someone has

falsified a message? • The digital signing process is not that

much different than the encryption and decryption

Copyright © - 2004-2014 – Curt Hill

Page 19: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Digital Signing• Albert extracts pieces of the message

to make a digest• Albert uses his private key to compute

S = MD mod N• Bob uses Albert’s public key to compute

V = SE mod N• Bob uses the same extraction method

and compares this with the sent signature

Copyright © - 2004-2014 – Curt Hill

Page 20: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Some practicalities• Common choices for E are 3, 17 and

65537 which are Fermat primes– This makes the modular exponentiation

quick

• Computing D often uses the Extended Euclidean Algorithm

Copyright © - 2004-2014 – Curt Hill

Page 21: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Is it breakable?• The usual thought is that factoring

very large numbers is extremely difficult

• The current unclassified belief is that factoring these size numbers would take centuries or longer– Of course, rumors abound

• The open question is if there is a technique that can crack this that does not require factorization

Copyright © - 2004-2014 – Curt Hill

Page 22: Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

Summary• Encryption maintains the data but

make it unusable to those without the key

• Use decryption to return to plain text• Used for transmitting sensitive data

and for stored data on disk• With this background we may now

consider database security

Copyright © - 2004-2014 – Curt Hill


Recommended