1 / 28

Encryption

Encryption. Discrete Math March 7, 2006 Harding University Jonathan White. Outline. Terms Types of Attacks Classical Techniques Substitution: Caesar Monoalphabetic Playfair Shifting: Rail Fence Cipher Rotor Machines (Enigma). Outline (2). Data Encryption Standard (DES) Triple DES

Download Presentation

Encryption

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Encryption Discrete Math March 7, 2006 Harding University Jonathan White

  2. Outline • Terms • Types of Attacks • Classical Techniques • Substitution: • Caesar • Monoalphabetic • Playfair • Shifting: • Rail Fence Cipher • Rotor Machines (Enigma)

  3. Outline (2) • Data Encryption Standard (DES) • Triple DES • Blowfish • MD5, SHA-1 • RSA • Quantum Computers

  4. Terms • Plaintext • Ciphertext • Cipher • Key • Cryptography • Symmetric Encryption • Asymmetric Encryption

  5. Terms • Security by Obscurity • Brute Force Search Attack • Dictionary Attack • Man in the Middle Attack • Cipher Attacks • Plaintext Attacks • Steganography • Unconditional security • Computational security

  6. Brute Force Attacks • Brute Force Searches: • Simply try every possible key • Effort required is proportionate to the key size • You must recognize the plaintext once you see it! • Typically uses no knowledge about the cipher, the cipher text, or the plaintext, so it is very easy to do.

  7. Dictionary Attacks • For this attack, you have already encrypted a large amount of plaintext. • You simply search what you’ve already encrypted for a match. • This is how most password crackers work. • Is your password something common like: • An English word? • A variation of your username? • Numbers or letters at the beginning or end appended to the above? • Blank? • Guessing, along with dictionary attacks, have proven to break ~50% of all passwords. • Older Unix systems only allow 8 character passwords

  8. Plaintext Attacks • Plaintext Attacks • Attack the language the plaintext was written in • Human languages are very redundant • Ever seen Wheel of Fortune? • ASCII characters are also very predictable • C++/Java/Lisp code is very redundant • Military communications are very redundant • Most ciphers overcome this by appending a bit of random characters to the end of the message • Called padding.

  9. Cipher Attacks • Attack something that is known about the cipher • For example, if you encrypt 0 and 1 in RSA, the ciphertext is the exact same • Ciphers typically have periodic behavior, which can be attacked. • However, most modern ciphers have been extensively studied and have very few potential attacks. • No “Security by Obscurity” • In fact, you want people to try and crack your cipher – it just makes you look better when they can’t crack it.

  10. Unconditional Security • Very difficult to provide. • One of the only known unconditional secure algorithms is a random, one time pad, key that is as long as the message. • Since the key is completely random, you can just add the letters in the key and the message together and send them. The cipher text bears no statistical relationship between the plaintext. • You can only use the key once though. • However, how do you distribute the key? • Russian nuclear crisis.

  11. Classical Substitution Ciphers • Where letters of the plaintext are replaced by other letters or symbols. • Or, if viewed as bit patterns, a sequence of bits in the plaintext is replaced with a sequence of bits in the plaintext. • Very easy to use. • They’ve been around the longest. • The key is the mapping that you used from the plaintext to the cipher text.

  12. Caesar Cipher • Earliest known substitution cipher. • Used in military affairs. • Replaces each letter in the plaintext by the nth letter down in the alphabet, wrapping back around. • In this case, the key is just the shift number that you chose. • To unencrypt, you just subtract the n from the ciphertext to get the original.

  13. Caesar Example • Encrypt this message with a shift of 5: • The brown fox ate the sheep

  14. Cryptanalysis of Caesar • Only have 26 possible orders. • Very easy to defeat using brute force. • You do need to recognize when you have the plaintext, however.

  15. Monoalphabetic Cipher • Rather than just shifting the alphabet, you could just jumble the letters arbitrarily. • Each plaintext letter then maps to a different ciphertext letter. • The key is then 26 characters long. • So, we have 26! possible keys. • But, this does not conceal the language characteristics. • Also, tables exist for double and triple letter frequencies such as “ing”, “th”, “ou”, etc… • These ciphers don’t change the relative letter frequencies.

  16. Monoalphabetic Example • Let the key and plaintext be : • QWERTYUIOPASDFGHJKLZXCVBNM • If we wish to replace these letters • GO TO THE MALL • The ciphertext is:

  17. Playfair Cipher • A 5 x 5 matrix of letters based on a keyword. • Fill in letters of keyword without duplicates • Then, just fill in the rest of the matrix with the rest of the alphabet going in order. • J and I are the same letter in the playfair cipher; so, there are only 25 letters in the alphabet.

  18. Playfair Encrypting/Decrypting • Plaintext is encrypted 2 letters at a time: • If a pair is a repeated letter, insert a filler letter like “x” • Exp: balloon becomes ba lx lo on • If both letters fall in the same row, replace ach with the letter to the right (wrapping back to start from the end) • Exp: “ar” encrypts as “rm” • If both letters fall in the same column, replace each with the letter below it, wrapping bottom to top. • Exp: “mu” encrypts as “cm” • Otherwise, each letter is replaced by the one in its row in the column of the other letter of the pair. • Exp: “hs” encrypts to “bp”, “ea” encrypts to “im”

  19. Playfair Security • We have 25 x 25 potential combinations = 625! potential ways to encrypt. • Widely used for many years, including WW1. • But, it can be broken, given a few hundred letters. • With a computer, this is quite simple, because some of the plaintext structure still remains.

  20. Transposition Ciphers • These hide the message by rearranging the letter order. • The actual letters aren’t altered. • However, the ciphertext will still have the same relative frequency as the original text. • These are typically incredibly quick.

  21. Rail Fence Cipher • Write your message horizontally across a narrow sheet of paper. • Wrap the paper around a circular post that both you and the person you wish to send the message to both posses one of. • Then, just write down the letters you see starting at the top of the post. • Very insecure.

  22. The Enigma Machine • Used by the Germans in WW2 to encrypt and decrypt messages. • Used a series of rotors connected to a complex electrical circuit and some initial letter swaps to encrypt messages. • Produced incredibly strong encryption for its time. • Decryption was exactly the same as encryption – provided you knew the starting position. • http://www.enigmaco.de/enigma.swf

  23. Enigma Machine 2 • The interesting thing about the Enigma is that the substitution pattern changes after every keystroke. • No longer just a simple substitution cipher. • There are 263 possible start positions for the rotors. • This would be relatively easy to solve. • But, this does remove a lot of the letter frequencies apparent in the German language. • There are still 26! ways to substitute the original letters. • Altogether, (if a few mishaps hadn’t occurred), this cipher can’t be beat by humans.

  24. Enigma Machine 3 • Mishaps: • Letters couldn’t encrypt to themselves. • Sometimes test messages were sent by lazy operators that only used one letter. • Repeating the same greeting in every message. • Please Respond, Dear, weather reports… • Always using “X” for the space key. • Letting operators always choose their passphrase. • Mother/Father/Girlfriend’s name, city, favorite soccer team… • Stolen codebooks • Helps for a little while… • Stolen machines • What really allowed the Polish and British intelligence agencies to crack the Enigma. • Only around 15 machines were ever captured.

  25. Enigma Machine 4 • In order to test potential codes, the Americans designed one of the first computers. This was aided by Alan Turing, a British citizen. • By the end of the war, all Enigma communications could be broken in under 3 days. However, the Allies didn’t always use this information. • Battle of the Bulge. • Many officials have estimated that by cracking the Enigma, WW2 ended 1 year earlier than it would have.

More Related