Top Banner
Day 18
18

Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Jan 01, 2016

Download

Documents

Eugenia Norton
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: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Day 18

Page 2: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Concepts• Plaintext: the original message• Ciphertext: the transformed message• Encryption: transformation of plaintext

into ciphertext• Decryption: transformation of plaintext

into ciphertext• Key: some critical information used for

encryption and decryption, only known to the sender and/or receiver

Page 3: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Caesar Cipher• Each letter of the alphabet is

rotated 3 places.– A -> D– B -> E– C -> F– X -> A– Y -> B

• The key here is 3• The algorithm is to swap each

letter with the letter KEY letters away.

Page 4: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Bkzovmqflk Oribp!

A B C D E F G H I J K L MN O P Q R S T U V WX Y Z

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

Page 5: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Standard English Frequency

Page 6: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Special Rules• All Q’s in the English language are

followed by U.• T’s often are followed by h’s• Etc.

Page 7: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Breaking a Caesar Cipher• Figure out the frequency of each

letter.• Compare it to standard English• Figure out the mapping• Translate.

Page 8: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Polyalphabetic substitution• You can use multiple different

Caesar Ciphers on the same text.– First letter has a key of 5– Second letter has key of 7– Third letter has key of 11– Forth letter has key of 4– Fifth letter has key of 5 again.

Page 9: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Substitutions• The letters can be a random

mapping:– A -> X– B -> C– C -> P

• Slightly more difficult than Caesar but still has the same problems.

Page 10: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Enigma• World War 2 saw the creation of a

machine to perform substitutions one after another based on 3 wheels.– Each wheel had a substitution– After each letter, the wheels rotated.– The wheel choice, and starting

position was determined ahead of time by a code book and the day.

Page 11: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Page 12: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Page 13: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Transposition Cipher• Instead of changing letters, just

rearrange them.– Doesn’t suffer from same problems as

substitutions.– Quite difficult to decode on large

column counts.– Can be based on a key:

• Computer -> 1 4 3 5 8 7 2 6

Page 14: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Transpose and Substitute• Nothing says you can’t do both.• DES (Govt. standard for encryption until

Oct 2000 – replaced by AES (keys up to 256bits – blocks 128bit)– 56 bit key

• Broken into smaller bits for encryption

– 64 bit blocks of data.– 16 rounds of substitutions and

transformations– Both sides must know the key ahead of time.

• Involves Permutation• Series of substitutions• Swapping of ½ bits• More substitutions• Another permutation

Page 15: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Key difficulty• How do you get the key to the

other side?– If you can do that securely, why don’t

you just send the data?

• What if they key gets compromised?– You need to exchange new keys

Page 16: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Public Key Cryptography• Different keys used to encrypt and

decrypt the traffic.– Very complex polynomial factoring

used to create 2 keys.– The same key cannot be used to

encrypt AND decrypt. You MUST use the other key.

– Given one key it is impossible (as far as we know) to calculate the other key.

Page 17: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

Encrypting with public key• I generate a public and private

key pair.• I publish the public key to anyone

who wants it• If someone wants to send me data

that only I can read, they encrypt it with my public key.– Only my private key will decrypt it.

Page 18: Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:

SSL• Symmetric key is faster to use,

but has the problem of how to exchange keys.

• SSL uses public key to exchange a symmetric key, then DES or AES is used to encrypt traffic.

• SSL understands how to decide on best algorithm both sides understand.