1 / 128

CIS/TCOM 551 Computer and Network Security Slide Set 3

CIS/TCOM 551 Computer and Network Security Slide Set 3. Carl A. Gunter Spring 2004. Basic Encryption. Monoalphabetic substitution ciphers Polyalphabetic substitution ciphers Transposition ciphers Other hiding techniques Stream versus block ciphers. Sender. Transmission Medium. Receiver.

unity-ball
Download Presentation

CIS/TCOM 551 Computer and Network Security Slide Set 3

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. CIS/TCOM 551Computer and Network SecuritySlide Set 3 Carl A. Gunter Spring 2004

  2. Basic Encryption • Monoalphabetic substitution ciphers • Polyalphabetic substitution ciphers • Transposition ciphers • Other hiding techniques • Stream versus block ciphers

  3. Sender Transmission Medium Receiver S T R O Interceptor Circumstances

  4. What Can O Do to a Message? • Block it (availability) • Intercept it (confidentiality) • Modify it (integrity) • Fabricate another (integrity)

  5. Terminology • Encryption / Decryption • Encode / Decode • Plaintext / Ciphertext • Cryptography: hidden writing. • Cryptanalysis: uncovering what is hidden.

  6. Monoalphabetic Substitution • Substitute one letter for another • Creates “confusion”

  7. Keyless Encryption • C = E(P) and P = D(C) • P = D(E(P)) • Transmit E(P), receiver applies D. • Select D and E so that • Without knowing D or E it is hard to discover P from E(P). • It is feasible to know and apply D and E.

  8. Caesar Cipher (Original) • E(p) = p + 3 (mod 26) • D(p) = p - 3 (mod 26) • Easy to recall and calculate D and E. Create a table: T R E A T Y I M P O S S I B L E w u h d w b l p s r v v l e o h A B C D E F G H I J K L M N O P Q R S T U V W X Y Z d e f g h I j k l m n o p q r s t u v w x y z a b c

  9. Encryption Strategy: Confusion • The Caesar cipher confuses the letters of the alphabet, causing the result look like gibberish. • As we applied it in the previous example, a space is interpreted as a space, providing no confusion. • Note: changing one letter of plaintext changes exactly one letter of ciphertext.

  10. Algorithm vs. Key • Moreover: • It is hard to keep D and E secret if they are much used, and • Cryptanalysis is possible. • To address the first of these problems assume: algorithm is known, but key is not known.

  11. Encryption with a Key • Symmetric key • C = E(K, P) • P = D(K, C) • P = D(K, E(K, P)) • Asymetric key • C = E(Kpublic, P) • P = D(Kprivate, C) • P = D(Kprivate, E(Kpublic, P))

  12. Permutation • Generalize Caesar cipher to allow other ways to permute the alphabet. • What is now called a Caesar cipher is any choice of an offset: () = (n + ) (mod 26). The number n is the key. • Generalize further: use any permutation as a key. • To encode, apply the key to each letter. • To decode, apply the inverse of the key to each letter.

  13. Sample Permutations • Example: a passphrase like “this is a long key” can be a key. • Example: take every third letter. • () = (3 * ) (mod 26) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z t h i s a l o n g k e y b c d f j m p q r u v w x z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a d g j m p s v y b e h k n q t w z c f i l o r u x

  14. Cryptanalysis of Monoalphabetic Ciphers • There are 26! permutation keys, so it is not feasible to try all possible keys. • Mapping a space to itself is a big clue: try to guess short words. • Look for common English repeated letters like a “ss” or “oo” • Exploit frequency information wklv phvvdjh lv qrw wrr kdug wr euhdn T--- ------- -- -OT TOO ---- TO -----

  15. Sample Ciphertext • hqfubswlrq lv d phdqv rl dwwdlqlqj vhfxuh frpsxwdwlrq ryhu lqvhfxuh fkdqqhov eb xvlqj hqfubswlrq zh glvjxlvh wkh phvvdjh vr wkdw hyhq li wkh wudqvplvvlrq lv glyhuwhg wkh phvvdjh zloo qrw eh uhyhdohg

  16. Note similarity of e and h.

  17. Caesar Cipher Example • hqfubswlrq lv d phdqv rl dwwdlqlqj vhfxuh frpsxwdwlrq ryhu lqvhfxuh fkdqqhov eb xvlqj hqfubswlrq zh glvjxlvh wkh phvvdjh vr wkdw hyhq li wkh wudqvplvvlrq lv glyhuwhg wkh phvvdjh zloo qrw eh uhyhdohg • ENCRYPTION IS A MEANS OF ATTAINING SECURE COMMUNICATION OVER INSECURE CHANNELS BY USING ENCRYPTION WE DISGUISE THE MESSAGE SO THAT EVEN IF THE TRANSMISSION IS DIVERTED THE MESSAGE WILL NOT BE REVEALED

  18. Polyalphabetic Cipher • To beat frequency analysis we need to break the connection between frequently occurring ciphertext letters and frequently occurring plaintext letters. • This could be done by varying the translation of letters. • Consider using one translation for letters in even positions and a different one for letters in odd positions.

  19. Two Table Cipher First Table A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a d g j n o s v y b e h k n q t w z c f I l o r u x Second Table A B C D E F G H I J K L M N O P Q R S T U V W X Y Z n s x c h m r w b g l q v a f k p u z e j o t y d i Example Translation TREAT YIMPO SSIBL E fumnf dyvtv czysh h

  20. Vigenere Tableaux • The distribution can be further flattened by picking complementary permutations. • Another approach: use more tables. • A Vigenere Tableaux is a collection of 26 permutations.

  21. Sample Encryption Using a Vigenere Tableau Encrypt: but soft, what light through yonder window breaks? using keyword juliet julie tjuli etjul ietju lietj uliet julie tjuli e BUTSO FTWHA TLIGH TTHRO UGHYO NDERW INDOW BREAK S koeas ycqsi ...

  22. One-Time Pad • Using a Vigenere tableau with more keys than letters in the message would defeat the techniques we have discussed. • Indeed, this is an unbreakable code. • It’s disadvantage is the long keys required.

  23. History of the One Time Pad • G. Vernam patented an idea for telegraph encryption in 1919. This was based on punched tape from a teletype. 32 alphabets were used in no regular pattern. • W. Kunze, R. Schauffler, and E. Langlotz developed an approach to German diplomatic correspondence circa 1921-1923 from which the name “one time pad” derives. • Pads of 50 numbered sheets were used, with 48 five-digit groups on each. No sheets were used twice; they were destroyed after use.

  24. Binary Vernam Cipher

  25. Long Random Sequences • Middle digits from numbers in a phone book • Book of prose? Danger: frequency analysis possible!

  26. Pseudo-random number generators • Linear congruential random number generator • Seed r(0), constants a, b, n • r(i+1) = (a * r(i) + b) mod n • Probable Word Attack • Solve a family of equations

  27. Transpositions (Permutations) • The order of the letters can be altered. • Columnar transposition example • Memory issues. S M A L L E X A M P L E SMALL EXAMPLE slxpm lalae me

  28. Larger Example THIS IS A MESSAGE TO SHOW HOW A COLUMNAR TRANSPOSITION WORKS This is encoded using 5 columns and 10 rows. T H I S I S A M E S S A G E T O S H O W H O W A C O L U M N A R T R A N S P O S I T I O N W O R K S

  29. Cryptanalysis using Digrams

  30. How Many Columns?

  31. Other Encryption Ideas • Open code. • Stegonagraphy. • Fractionated Morse Code. • Foreign languages. • 1918 eight Choctaws in Company D, 141st Infantry. • 50,000 Navaho speakers in WWII. • Only 18 non-Navahos could speak it.

  32. Stream and Block Ciphers • Stream ciphers convert one symbol of plaintext immediately into a symbol of ciphertext. • Polyalphabetic substitution cipher, and • Fractionated Morse, but • Not columnar transposition.

  33. Advantages and Disadvantages • Advantages • Speed • Low error propogation • Disadvantages • Low diffusion • Susceptibility to attacks on integrity

  34. Block Ciphers • Block ciphers encrypt a group of plaintext symbols as one block. • Columnar transposition is an example.

  35. Advantages and Disadvantages • Advantages • Diffusion • Immunity to insertions • Disadvantages • Slowness • Error propogation

  36. Confusion and Diffusion • Confusion: difficulty in determining how a change in the plaintext will affect the ciphertext. • Diffusion: spreading of the effect of a change in the plaintext to many parts of the ciphertext.

  37. Attacks on Encryption • Ciphertext only • Known (or probable) plaintext • Chosen plaintext • Chosen sample of encrypted plaintext • Adaptive chosen plaintext • Ability to gain new chosen samples of encrypted plaintext based on existing samples • Chosen or adaptive chosen ciphertext • Temporary access to decryption

  38. Encryption with a Key (Revision) • Symmetric key • C = E(K, P) • P = D(K, C) • P = D(K, E(K, P)) • Asymetric key • C = E(Kpublic, P) • P = D(Kprivate, C) • P = D(Kprivate, E(Kpublic, P))

  39. Definitions • Trusted Third Party (TTP) • Unconditionally trusted TTP must be trusted completely • Functionally trusted TTP must be trusted for availability and integrity.

  40. Advantages of Symmetric • Efficient encryption • Relatively short keys • Useful as primitives for various functions (pseudorandom number generators, hash functions, etc.) • Good composition properties • Extensive history

  41. Disadvantages of Symmetric • Key must remain secret at both ends. • Many key pairs must be managed in a large network. May require unconditionally trusted TTP. • Keys must be changed frequently. • Large keys or TTP required for public verification function of digital signatures.

More Related