1 / 20

CSE331: Introduction to Networks and Security

CSE331: Introduction to Networks and Security. Lecture 16 Fall 2002. Recap. Started thinking about security… Today: Principles of Secure Systems Introduction to Cryptography Primitive cryptosystems. Principle 1: Security is a Process. Every system has vulnerabilities

mcdermott
Download Presentation

CSE331: Introduction to Networks and Security

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. CSE331:Introduction to Networksand Security Lecture 16 Fall 2002

  2. Recap • Started thinking about security… • Today: • Principles of Secure Systems • Introduction to Cryptography • Primitive cryptosystems CSE331 Fall 2002

  3. Principle 1: Security is a Process • Every system has vulnerabilities • Impossible to eliminate all of them • Systems change over time • Security requirements change over time • Context of mechanisms changes over time • Secure systems require maintenance • Check for defunct users • Update virus software • Patch security holes • Test firewalls • THERE IS NO SILVER BULLET! CSE331 Fall 2002

  4. Principle 2: Least Privileges • A principal is accorded just those rights needed to accomplish its task. • Only what you “need to know”. • No more, no less. • What is the minimal set of privileges? • What is the granularity of privileges? • Separation of privileges (read vs. write access) • How & when do the privileges change? • Example violation: UNIX sendmail • Super user privileges CSE331 Fall 2002

  5. Principle 3: Complete Mediation • Every access to every object is checked. • Necessary to implement least privileges • Attacks go for the weakest link • It doesn’t help to have a $1000 lock on your door if the window is open. • Example: Operating System calls • Kernel interface mediates access to files, memory pages, etc. • No other way to create/manipulate resources CSE331 Fall 2002

  6. Principle 4: System Design • Economy of Mechanism • KISS: Keep it simple (stupid) • Things should be made as simple as possible–but no simpler. - A. Einstein • Open Design • Success of mechanism should not depend on it being secret • “No security through obscurity” • Failsafe Defaults • By default, access should not be allowed • Must obtain explicit permission CSE331 Fall 2002

  7. krmpto graf (Cryptography) • Greek for “secret writing” • Confidentiality • Obscure a message from eaves-droppers • Integrity • Assure recipient that the message was not altered • Authentication • Verify the identity of the source of a message • Non-repudiation • Convince a 3rd party that what was said is accurate CSE331 Fall 2002

  8. Terminology encryption decryption • Cryptographer • Invents cryptosystems • Cryptanalyst • Breaks cryptosystems • Cryptology • Study of crypto systems • Cipher • Mechanical way of encrypting text • Code • Semantic translation: “eat breakfast tomorrow” = “attack on Thursday” (or use Navajo!) Plaintext Ciphertext Plaintext CSE331 Fall 2002

  9. Kinds of Cryptographic Analysis • Goal is to recover the key (& algorithm) • Ciphertext only attacks • No information about content or algorithm • Very hard • Known Plaintext attacks • Full or partial plaintext available in addition to ciphertext • Chosen Plaintext attacks • Know which plaintext has been encrypted • Algorithm & Ciphertext attacks • Known algorithm, known ciphertext, recover key CSE331 Fall 2002

  10. The Caesar Cipher a b c … x y z d e f … a b c • Purportedly used by Julius Caesar • Add 3 mod 26 • Advantages • Simple • Intended to be performed in the field • Most people couldn’t read anyway • Disadvantages • Violates “no security through obscurity” • Easy to break (why?) CSE331 Fall 2002

  11. Monoalphabetic Ciphers a b c d p(a) p(b) p(c) p(d) • Also called substitution ciphers • Separate algorithm from the key • Add N mod 26 • rot13 = Add 13 mod 26 • General monoalphabetic cipher • Arbitrary permutation p of the alphabet • Key is the permutation CSE331 Fall 2002

  12. Example Cipher a b c d e f g h i j k l ... z d a n c e w i b f g h ... p Plaintext: Ciphertext: he lied ic hbcn CSE331 Fall 2002

  13. Cryptanalysis of Monoalphabetic Ciphers • Brute force attack: try every key • N! Possible keys for N-letter alphabet • 26!  4 x 1026 possible keys • Try 1 key per msec … 10 trillion years • …but (!) monoalphabetic ciphers are easy to solve • One-to-one mapping of letters is bad • Frequency distributions of common letters CSE331 Fall 2002

  14. Order & Frequency of Single Letters E 12.31% L 4.03% B 1.62% T 9.59 D 3.65 G 1.61 A 8.05 C 3.20 V 0.93 O 7.94 U 3.10 K 0.52 N 7.19 P 2.29 Q 0.20 I 7.18 F 2.28 X 0.20 S 6.59 M 2.25 J 0.10 R 6.03 W 2.03 Z 0.09 H 5.14 Y 1.88 CSE331 Fall 2002

  15. Monoalphabetic Cryptanalysis • Count the occurrences of each letter in the cipher text • Match against the statistics of English • Most frequent letter likely to be “e” • 2nd most frequent likely to be “t” • etc. • Longer ciphertext makes statistical analysis more likely to work… CSE331 Fall 2002

  16. Digrams and Trigrams • Diagrams in frequency order • Trigrams in frequency order TH HE AN IN ER RE ES ON EA TI AT ST ENND OR THE AND THA ENT ION TIO FOR NDE HAS NCE EDT TIS OFT STH MEN CSE331 Fall 2002

  17. Desired Statistics • Problems with monoalphabetic ciphers • Frequency of letters in ciphertext reflects frequency of plaintext • Want a single plaintext letter to map to multiple ciphertext letters • “e” “x”, “c”, “w” • Ideally, ciphertext frequencies should be flat CSE331 Fall 2002

  18. Polyalphabetic Substitutions • Pick k substitution ciphers • p1p2p3 … pk • Encrypt the message by rotating through the k substitutions • Same letter can be mapped to multiple different ciphertexts • Helps smooth out the frequency distributions • Diffusion m e s s a g e p1(m) p2(e) p3(s) p4(s) p1(a) p2(g) p3(e) q a x o a u v CSE331 Fall 2002

  19. Vigenère Tableau • Multiple substitutions • Can choose “complimentary” ciphers so that the frequency distribution flattens out • More generally: more substitutions means flatter distribution • Vigenère Tableau • Collection of 26 permutations • Usually thought of as a 26 x 26 grid • Key is a word CSE331 Fall 2002

  20. Vigenère Tableau a b c d e f g . . . A a b c d e f g . . . B b c d e f g h . . . C c d e f g h i . . . D d e f g h i j . . . E e f g h i j k . . . . . . . . . . . . . . . . . . . . . . . . . Plaintext: a bad deed Key “bed”: B EDB EDBE Ciphertext: b fde hgfh CSE331 Fall 2002

More Related