15-440 Distributed Systems Fall 2016: L-23 Security
15-440 Distributed Systems Fall 2016: L-23 Security
Fall 2016
L-23 Security
1
Today's Lecture
Key distribution
2
What is “Internet Security” ?
Denial-of-Service
Password
Traffic Cracking
Worms & Viruses modification
Trojan Horse
DNS Poisoning
Phishing
Spyware
IP Spoofing
Spam
Yes:
1) Creating a “secure channel” for
communication
Some:
2) Protecting resources and limiting
connectivity
No:
1) Preventing software vulnerabilities &
malware, or “social engineering”.
Secure Communication with an Untrusted
Infrastructure
Bob
ISP
ISPD
D
ISP
ISPBB
ISP
ISPCC
ISP
ISPA
A
Alice
What do we need for a secure
communication channel?
Authentication (Who am I talking to?)
ISP
ISPD
D
ISP
ISPBB
ISP
ISPCC
ISP
ISPA
A
Alice
Eavesdropping Attack: Example
tcpdump with promiscuous network
interface
On a switched network, what can you see?
ISP
ISPD
D
ISP
ISPBB
ISP
ISPCC
ISP
ISPA
A
Alice
Hello, I’m
“Bob”
Integrity Attack - Tampering
Stop the flow of the message
Delay and optionally modify the message
Release the message again
Alice Bob
Perpetrator
Alice Bob
16
Today's Lecture
Crypto 101
Key distribution
17
Cryptography As a Tool
Using cryptography securely is not simple
Designing cryptographic schemes correctly
is near impossible.
Hashing
e.g., SHA-1
Public-key cryptography
e.g., RSA
19
Secret Key Cryptography
Given a key k and a message m
Two functions: Encryption (E), decryption (D)
ciphertext c = E(k, m)
plaintext m = D(k, c)
Both use the same key k.
Hello,Bob
“secure” channel
Alice Bob.com
knows K knows K
=
Encrypted Ciphertext
Alice:
K A-B
Hash Fn
Step #1:
Message
Alice creates MAC
MAC
K A-B
Hash Fn
I am Bob
A43FF234
K A-B
Wrong!
Alice receives the hash, computes a hash with KA-B ,
and she knows the sender is Bob
Symmetric Key: Authentication
What if Mallory overhears the hash sent by
Bob, and then “replays” it later?
ISP
ISPD
D
ISP
ISPBB
ISP
ISPCC
ISP
ISPA
A Hello, I’m
Bob. Here’s
A43FF234
the hash to
“prove” it
Symmetric Key: Authentication
A “Nonce”
A random bitstring used only once. Alice sends nonce to
Bob as a “challenge”. Bob Replies with “fresh” MAC result.
Nonce
Alice Bob
Hash
Nonce
B4FE64
B4FE64 K A-B
Performs same
hash with KA-B
and compares
results
Symmetric Key: Authentication
A “Nonce”
A random bitstring used only once. Alice sends nonce to
Bob as a “challenge”. Bob Replies with “fresh” MAC result.
Nonce ?!?!
Alice
Mallory
If Alice sends Mallory a nonce,
she cannot compute the
corresponding MAC without K A-B
Symmetric Key Crypto Review
Questions??
Hello,Bob
“secure” channel
Alice Bob.com
Knows KB Knows KB, KB-1
It is believed to be computationally
unfeasible to derive KB-1 from KB or to
find any way to get M from KB(M) other
than using KB-1 .
S = Sign(M) Message M
Integrity:
Nonce
Authentication:
S = Sign(Nonce)
Verify(Nonce, S)
Asymmetric Key Review:
Confidentiality: Encrypt with Public Key of
Receiver
Integrity: Sign message with private key of
the sender
Authentication: Entity being authenticated
signs a nonce with private key, signature is
then verified with the public key
Overall speed of
cryptographic
operations
Fast Slow
Today's Lecture
Crypto 101
40