CSCI x760 - Computer Networks Spring 2016
Instructor: Prof. Roberto Perdisci perdisci@cs.uga.edu
source: computer-networks-webdesign.com
This slides are adapted from the textbook slides by J.F. Kurose and K.W. Ross
CSCI x760 - Computer Networks Spring 2016 Instructor: Prof. Roberto - - PowerPoint PPT Presentation
source: computer-networks-webdesign.com CSCI x760 - Computer Networks Spring 2016 Instructor: Prof. Roberto Perdisci perdisci@cs.uga.edu This slides are adapted from the textbook slides by J.F. Kurose and K.W. Ross Chapter 8: Network Security
Instructor: Prof. Roberto Perdisci perdisci@cs.uga.edu
source: computer-networks-webdesign.com
This slides are adapted from the textbook slides by J.F. Kurose and K.W. Ross
} understand principles of network security:
} cryptography and its many uses beyond “confidentiality” } authentication } message integrity
} security in practice:
} firewalls and intrusion detection systems } security in application, transport, network, link layers
} sender encrypts message } receiver decrypts message
} well-known in network security world } Bob, Alice (lovers!) want to communicate “securely” } Trudy (intruder) may intercept, delete, add messages
data, control messages
} … well, real-life Bobs and Alices! } Web browser/server for electronic transactions (e.g.,
} on-line banking client/server } DNS servers } routers exchanging routing table updates } other examples?
} eavesdrop: intercept messages } actively insert messages into connection } impersonation: can fake (spoof) source address in packet (or
} hijacking: “take over” ongoing connection by removing
} denial of service: prevent service from being used by others
9
10
} monoalphabetic cipher: substitute one letter for another
11
} n monoalphabetic cyphers, M1,M2,…,Mn } Cycling pattern:
} e.g., n=4, M1,M3,M4,M3,M2; M1,M3,M4,M3,M2;
} For each new plaintext symbol, use subsequent
} dog: d from M1, o from M3, g from M4
} Key: the n ciphers and the cyclic pattern
12
} Cryptographers invent new clever cryptographic schemes
} Objective: make it infeasible to recover the plaintext
} Computational difficulty: efficient to compute cipher-text, but hard to
} Objective: try to find flaws in the schemes
} E.g., recover some info about the plaintext, or recover the key
} Fundamental
} “If lots of smart people have failed to solve a problem, then it
13
} Cipher-text only attack:
} Two approaches:
} Search through all keys: must be
} Statistical analysis
} Known-plaintext attack:
} eg, in monoalphabetic cipher,
} Chosen-plaintext attack:
14
} Crypto often uses keys:
} Algorithm is known to everyone } Only “keys” are secret
} Public key cryptography
} Involves the use of two keys
} Symmetric key cryptography
} Involves the use one key
} Hash functions
} Involves the use of no keys } Nothing secret: How can this be useful?
15
} e.g., key is knowing substitution pattern in mono alphabetic
S
S
16
} Stream ciphers
} encrypt one bit at time
} Block ciphers
} Break plaintext message in equal-size blocks } Encrypt each block as a unit
17
} Combine each bit of keystream with bit of plaintext to get
} m(i) = ith bit of message } ks(i) = ith bit of keystream } c(i) = ith bit of ciphertext } c(i) = ks(i) ⊕ m(i) (⊕ = exclusive or) } m(i) = ks(i) ⊕ c(i)
keystream generator key keystream pseudo random
18
} RC4 is a popular stream cipher
} Extensively analyzed and considered good } Key can be from 1 to 256 bytes } Used in WEP for 802.11 } Can be used in SSL
19
} Message to be encrypted is processed in blocks of k
} 1-to-1 mapping is used to map k-bit block of plaintext
} requires sender, receiver
} Q: how to agree on key in
20
21
Bob’s public key
B +
B +
Bob’s private key
B
B + B
22
23
24
} RSA is computationally intensive } DES is at least 100 times faster than RSA
} Bob and Alice use RSA to exchange a symmetric key KS } Once both have KS, they use symmetric key cryptography
26
} Allows communicating parties to verify that received
} Content of message has not been altered } Source of message is who/what you think it is } Message has not been replayed } Sequence of messages is maintained
} Let’s first talk about message digests
27
} Function H( ) that takes as input
} Note that H( ) is a many-to-1
} H( ) is often called a “hash
} Desirable properties:
} Easy to calculate } Irreversibility: Can’t determine m
from H(m)
} Collision resistance:
Computationally difficult to produce m and m’ such that H(m) = H(m’)
} Seemingly random output
28
➼ produces fixed length digest (16-bit sum) of input ➼ is many-to-one
❒ But given message with given hash value, it is easy to find another
❒ Example: Simplified checksum: add 4-byte chunks at a time:
29
} MD5 hash function widely used (RFC 1321)
} computes 128-bit message digest in 4-step process.
} SHA-1 is also used.
} US standard [NIST, FIPS PUB 180-1] } 160-bit message digest
30
} Assume we want to send a message
} We are not concerned with confidentiality, only integrity
} What if we send
} m’ = m || MD5(m) } The receiver can extract m, compute MD5(m), and check if this
} Does this guarantee integrity?
31
} Authenticates sender } Verifies message integrity } No encryption ! } Also called “keyed hash” } Notation: MDm = H(s||m) ; send m||MDm
32
}
}
1.
2.
3.
4.
} HMACm ~= H(s || H(s || m)) ; send m || HMACm
33
} Document/Program fingerprint } Authentication using a shared key } Encryption (generate key stream for stream cipher) Alice Bob Ra H(Kab|Ra) H(Kab|Rb) Rb b1 = H(Kab|IV) c1 = p1 xor b1 b2 = H(Kab|c1) c2 = p2 xor b2 b3 = H(Kab|c2) c3 = p3 xor b3 …
Transfer $1M from Bill to Trudy
Transfer $1M from Bill to Trudy
Transfer $1M from Bill to Susan
36
} sender (Bob) digitally signs document, establishing he is
} Goal is similar to that of a MAC, except now use public-
} verifiable, nonforgeable: recipient (Alice) can prove to
37
} Bob signs m by encrypting with his private key KB,
Oh, how I have missed
time! …(blah blah blah)
Bob
Bob’s private key
B
m, signed (encrypted) with his private key
B
38
H: Hash function
digital signature (encrypt)
Bob’s private key K B
msg digest
msg digest
H: Hash function
digital signature (decrypt)
Bob’s public key K B +
39
} Suppose Alice receives msg m, digital signature KB(m) } Alice verifies m signed by Bob by applying Bob’s public key KB to
} If KB(KB(m) ) = m, whoever signed m must have used Bob’s private
➼ Bob signed m. ➼ No one else signed m. ➼ Bob signed m and not m’.
+ +
40
} Motivation: Trudy plays pizza prank on Bob
} Trudy creates e-mail order:
} Trudy signs order with her private key } Trudy sends order to Pizza Store } Trudy sends to Pizza Store her public key, but says it’s Bob’s
} Pizza Store verifies signature; then delivers four pizzas to Bob.
} Certification authority (CA): binds public key to particular
} E (person, router) registers its public key with CA.
} E provides “proof of identity” to CA. } CA creates certificate binding E to its public key. } certificate containing E’s public key digitally signed by CA – CA says
41
Bob’s public key K B + Bob’s identifying information
digital signature (encrypt)
CA private key K CA
B +
} When Alice wants Bob’s public key:
} gets Bob’s certificate (Bob or elsewhere). } apply CA’s public key to Bob’s certificate, get Bob’s public
42
Bob’s public key
B +
digital signature (decrypt)
CA public key
CA
B +
43
} Primary standard X.509 (RFC 2459) } Certificate contains:
} Issuer name } Entity name, address, domain name, etc. } Entity’s public key } Digital signature (signed with issuer’s private key)
} Public-Key Infrastructure (PKI)
} Certificates and certification authorities } Often considered “heavy”
44
} Certificates } Repository from which certificates can be retrieved } A method for revoking certificates } An “anchor of trust” } A method for verifying a chain of certificates up to the anchor of
} Browser example:
} Browsers ship with many trust anchors (i.e., public key of trusted CAs)
} Can we really trust the CAs?
} http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html } It may be possible to trick users to add a trust anchor into the default
} The browser itself may be compromised an forced to add a malicious