broadening expertise in critical infrastructure protection cryptography funded through nsf grant...

35
Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation

Upload: linda-hensley

Post on 26-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Broadening Expertise in Critical Infrastructure Protection

Cryptography

Funded through NSF Grant Award # DUE-1303269

Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the

National Science Foundation

Page 2: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

History

• Scytale cipher was purported used by the ancient Spartans. You needed the key to read the message.

• Caesar cipher was used Julius and Augustus Caesar.

Page 3: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

• Telegraphy Codes could transmit complex information without high transmission costs.

Page 4: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

History

• Some homeless migrant workers in the early 20th century would ride the rails and use Hobo sign to mark places with chalk that others should avoid or seek out for assistance.

Page 5: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

History

• The Enigma Machine encrypted messages for Germany during World War II.

• The position of each wheel was the key that would be used to encrypt and decrypt messages.

Page 6: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

History

• The bombe was a device developed in the 1930s to attack Enigma encryption.

• If you fed encrypted text and possible plaintext into the bombe, it wouldreturn the key beingused to encrypt the text.

• The bombe was able to simulate dozens of Enigma machines simultaneously.

Page 7: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

History

• In the mid-to-late 20th century, organizations such as the National Security Agency used supercomputers, to create and analyze codes. This is a freon-cooled Cray supercomputer (ca. 1980s).

Page 8: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Modern Day Codes

• Encoding facilitates usability of data.• Hashing facilitates integrity of data.• Encryption facilitates confidentiality of data.

• Encoding and Encryption are reversible (we can get our original information back)

• Hashing only works in one-direction (we can not see data used to create the hash)

Page 9: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Encoding facilitates usability

• How do we send information using symbols that might already have another meaning?

• On the web, we use a method called URL Encoding: For example, “&” becomes “%26”

%26 is the URL Encoded “&” sign

Normal “&” sign, separating different

pieces of information

Page 10: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Hashing facilitates integrity

• We create hashes to verify that a larger piece of information has not changed.

If a website offers a list of alternate locations to download a file, you could double check the file you downloaded by comparing the known good hash with a hash created from your downloaded file.

Page 11: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Hashing facilitates integrity

• A hash is a one-way mathematical function. – We cannot recover original data from a hash of

the data.

Page 12: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Encryption facilitates confidentiality

• To encrypt information, we need three things.– Algorithm

• Caesar Cipher: Rotate or swap a letter with another letter N places to the right in the alphabet.

– Key• N = 13

– Plaintext• We attack at dawn!

Page 13: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

• To decrypt information, we need three things.– Algorithm

• Caesar Cipher: Rotate or swap a letter with another letter N places to the left in the alphabet.

– Key• N = 13

– Ciphertext (encrypted message)• Jr nggnpx ng qnja!

Page 14: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Breaking Codes

• Cryptanalysis is the study of breaking encryption by exploiting weaknesses in the algorithm or implementation, often using frequency analysis.

• The Caesar Cipher is a simple substitution cipher, with some of the same flaws as the Enigma:– Encrypted characters do not match unencrypted

characters. “A” encrypted will never be “A” plaintext.– Characters are encrypted in pairs. If A is N, N is A.

• Ciphertext of strong modern ciphers will appear very random in order to avoid containing recognizable patterns.

Page 15: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Cryptanalysis of Caesar CipherJr nggnpx ng qnja! Let’s attack the “gg”. The most common repeated letters

are:ss, ee, tt, ff, ll, mm, oo.

Jr nssnpx ns qnja! Replace g with s. ?ss??? doesn’t match a lot of common words.

Jr neenpx ne qnja! Replace g with e. Two letter words ?e he, me, be aren’t likely.

Jr nttnpx nt qnja! Replace g with t. This looks promising, ?t could be at, it, etc.

Jr attapx at qajn! Assume ?t is at. Replace n with a and a with n.

Or attapx at qaon!Most common initial letters in a sentence:T O A W B C D S F M R H I Y E G L N P U J KLets replace j with o. Maybe, but not many words match ?aon.

Wr attapx at qawn! Lets replace j with w. ?awn may be lawn, dawn. W? may be We.

We attack at dawn! We can guess the remaining letters based on common words.

Page 16: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Breaking Codes

• Brute forcing is the practice of trying every possible key in order to find the key that will decrypt the ciphertext.

• The Caesar Cipher only has 25 possible keys (one for each letter shifted), making it very easy to brute force.

• Modern strong ciphers will use keys of 128 bits or more. This means that they will have 2128 or 3 x 1038 possible keys.

Page 17: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Brute Forcing Caesar Cipher

Jr nggnpx ng qnja! Ciphertext

Iq mffmow mf pmiz! Key = 1 Uc yrryai yr byul! Key = 15Hp leelnv le olhy! Key = 2 Tb xqqxzh xq axtk! Key = 16Go kddkmu kd nkgx! Key = 3 Sa wppwyg wp zwsj! Key = 17Fn jccjlt jc mjfw! Key = 4 Rz voovxf vo yvri! Key = 18Em ibbiks ib live! Key = 5 Qy unnuwe un xuqh! Key = 19

Dl haahjr ha khdu! Key = 6 Px tmmtvd tm wtpg! Key = 20

Ck gzzgiq gz jgct! Key = 7 Ow sllsuc sl vsof! Key = 21

Bj fyyfhp fy ifbs! Key = 8 Nv rkkrtb rk urne! Key = 22Ai exxego ex hear! Key = 9 Mu qjjqsa qj tqmd! Key = 23

Zh dwwdfn dw gdzq! Key = 10 Lt piiprz pi splc! Key = 24Yg cvvcem cv fcyp! Key = 11 Ks ohhoqy oh rokb! Key = 25

Xf buubdl bu ebxo! Key = 12We attack at dawn! Key = 13

Vd zsszbj zs czvm! Key = 14

Page 18: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Symmetric Key Cryptography

• Symmetric Key algorithms use a single key (or set of keys) for decrypting and encrypting.

• Symmetric algorithms are often used to encrypt files or virtual encrypted drives.

Page 19: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Shortcomings of Symmetric Key Cryptography

• We have encrypted data and are communicating on a public network: How do we share the key with our website visitors so that they can encrypt messages to send to us without interception?

Page 20: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Public Key Cryptography

• Imagine we have two keys:– A key – the public key – acts like a “lock”.– A key – the private key – acts like a “key”.

Public Key Private Key

Page 21: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Public Key Cryptography

• We transmit only the public key “lock”.

• Our website visitor encrypts / “locks” the message with the public key and sends us the encrypted message.

Public KeyPrivate Key

Encrypted MessagePrivate Key

Page 22: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Using Public and Private keys

Mailvelope is a free plugin for Firefox and Chrome that uses the PGP encryption standard.

Page 23: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Man in the Middle Attack

• What if an attacker is between us and a website? How can the website ensure they are getting our actual key?

ATTACKERreplaces our public key with their own.

Our website visitor unwittingly uses attacker’s public key.

ATTACKERdecrypts message and re-encrypts with our key.

Page 24: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

WEB USER

CertificateAuthority

Our website visitor checks with a Certificate Authority, to verify the identity of the computer giving them the public key. If the certificate for the public key is not valid, an error message will be shown.

Page 25: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Certificate Authorities

• Certificate Authorities provide digital certificates to verify the source of the public key and use digital signatures to authenticate the certificates.– SSL/TLS (Secure Socket Layer/Transport Layer

Security) is the protocol used by secure websites (indicated by a HTTPS:// in the address bar) to provide digital certificates verifying their identity.

Page 26: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

A website’s Digital Certificate

• The digital certificate for a public key is signed with the certificate authority’s private key.

• Web browsers have a set of root certificates that the certificate authority’s public keys that can be used to verify the certificate.

Page 27: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

HTTPS Concerns

• HTTPS generally uses a public key initially in order to securely share a faster symmetric key.

• If an attacker is storing captured traffic, and later acquires the private key, all of the previously captured traffic is vulnerable.

• Perfect forward secrecy means that session keys are derived from multiple secrets and only used once. The exposure of secrets or session key does not put other sessions at risk.

Page 28: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Perfect Forward Security

• The Diffie-Hellman Key Exchange algorithm works by having each party selecting a random secret number and a common shared number.

• Calculations are performed combining the secret and common numbers to create the session key.

• An attacker listening in does not know the resulting session key because they do not what secret numbers were used in the calculations.

https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange

Page 29: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

TOR Onion Routing

• TOR Onion Routing is an encryption method where the priority is anonymity of the sender.

• We have a secret message, but we want to pass it to recipient without our recipient knowing it came from us.

• It is called Onion Routing because encryption is layered on top of more encryption. When the message is sent, each TOR node peels away their layer of encryption.

Page 30: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

TOR Onion Routing

• We encrypt our message multiple times, each time with the different public keys of the TOR nodes it will pass through.

Recipient

TOR Nodes

Page 31: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

TOR Onion Routing

• The first node knows that a message came from us, but does not know the contents or destination.

Recipient

TOR Nodes

Page 32: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

TOR Onion Routing

• The second node knows the message is encrypted, and that it is from the first node and to be sent to the third node.

Recipient

TOR Nodes

Page 33: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

TOR Onion Routing

• The third node knows the contents of the message and who it was sent, but not where it came from.

Recipient

TOR Nodes

Page 34: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

• TOR provides anonymity, but not privacy. Traffic is not encrypted once it leaves the TOR network and browsers may leak identifying characteristics when using TOR.

• HTTPS provides privacy, but not anonymity.

https://www.eff.org/pages/tor-and-https

TOR vs. HTTPS

Page 35: Broadening Expertise in Critical Infrastructure Protection Cryptography Funded through NSF Grant Award # DUE-1303269 Any opinions, findings, conclusions

Credits

• Exhibit photos were taken at the National Cryptologic Museum in Ft. Meade, Maryland.http://www.nsa.gov/about/cryptologic_heritage/museum/

• All photos are licensed BY-NC-SA by DJ Dates.http://creativecommons.org/licenses/by-nc-sa/4.0/