CSE331: Introduction to Networks and Security - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

CSE331: Introduction to Networks and Security

Description:

Semantic translation: 'eat breakfast tomorrow' = 'attack on Thursday' (or use Navajo! ... Plaintext: a bad deed. Key 'bed': B EDB EDBE. Ciphertext: b fde ... – PowerPoint PPT presentation

Number of Views:247
Avg rating:3.0/5.0
Slides: 21
Provided by: SteveZd1
Category:

less

Transcript and Presenter's Notes

Title: CSE331: Introduction to Networks and Security


1
CSE331Introduction to Networksand Security
  • Lecture 16
  • Fall 2002

2
Recap
  • Started thinking about security
  • Today
  • Principles of Secure Systems
  • Introduction to Cryptography
  • Primitive cryptosystems

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!

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

5
Principle 3 Complete Mediation
  • Every access to every object is checked.
  • Necessary to implement least privileges
  • Attacks go for the weakest link
  • It doesnt 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

6
Principle 4 System Design
  • Economy of Mechanism
  • KISS Keep it simple (stupid)
  • Things should be made as simple as possiblebut
    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

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

8
Terminology
encryption
decryption
Plaintext
Ciphertext
Plaintext
  • 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!)

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

10
The Caesar Cipher
  • Purportedly used by Julius Caesar
  • Add 3 mod 26
  • Advantages
  • Simple
  • Intended to be performed in the field
  • Most people couldnt read anyway
  • Disadvantages
  • Violates no security through obscurity
  • Easy to break (why?)

11
Monoalphabetic Ciphers
  • 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

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
he lied ic hbcn
Plaintext Ciphertext
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

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
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

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
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

18
Polyalphabetic Substitutions
  • Pick k substitution ciphers
  • p1 p2 p3 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
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

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
Write a Comment
User Comments (0)
About PowerShow.com