2 AccessControl 3 Protocols
2 AccessControl 3 Protocols
2 AccessControl 3 Protocols
0.29 1 in 1.31010
0.30 1 in 1.5109
0.31 1 in 1.8108
0.32 1 in 2.6107
0.33 1 in 4.0106
0.34 1 in 6.9105
0.35 1 in 1.3105
== equal error rate
Part 2 Access Control
distance 37
Attack on Iris Scan
Good photo of eye can be scanned
o Attacker could use photo of eye
Afghan woman was authenticated by
iris scan of old photo
o Story is here
To prevent attack, scanner could use
light to be sure it is a “live” iris
Alice rx rx r rw rw
Alice rx rx r rw rw
Alice rx rx r rw rw
w ---
Bob r file2 Bob r file2
--- r
rw r
Fred r file3 Fred --- file3
r r
Part 3 Protocols 58
Protocol
Human protocols the rules followed in
human interactions
o Example: Asking a question in class
Networking protocols rules followed in
networked communication systems
o Examples: HTTP, FTP, etc.
Security protocol the (communication)
rules followed in a security application
o Examples: SSL, IPSec, Kerberos, etc.
Part 3 Protocols 59
Protocols
Protocol flaws can be very subtle
Several well-known security protocols
have significant flaws
o Including WEP, GSM, and IPSec
Implementation errors can occur
o Recent IE implementation of SSL
Not easy to get protocols right…
Part 3 Protocols 60
Ideal Security Protocol
Must satisfy security requirements
o Requirements need to be precise
Efficient
o Small computational requirement
o Small bandwidth usage, minimal delays…
Robust
o Works when attacker tries to break it
o Works even if environment changes
Easy to use & implement, flexible…
Difficult to satisfy all of these!
Part 3 Protocols 61
Chapter 9:
Simple Security Protocols
“I quite agree with you,” said the Duchess; “and the moral of that is
‘Be what you would seem to be’ or
if you'd like it put more simply‘Never imagine yourself not to be
otherwise than what it might appear to others that what you were
or might have been was not otherwise than what you
had been would have appeared to them to be otherwise.’ ”
Lewis Carroll, Alice in Wonderland
Part 3 Protocols 63
Authentication
Alice must prove her identity to Bob
o Alice and Bob can be humans or computers
May also require Bob to prove he’s Bob
(mutual authentication)
Probably need to establish a session key
May have other requirements, such as
o Use public keys
o Use symmetric keys
o Use hash functions
o Anonymity, plausible deniability, etc., etc.
Part 3 Protocols 64
Authentication
Authentication on a stand-alone computer is
relatively simple
o Hash password with salt
o “Secure path,” attacks on authentication
software, keystroke logging, etc., can be issues
Authentication over a network is challenging
o Attacker can passively observe messages
o Attacker can replay messages
o Active attacks possible (insert, delete, change)
Part 3 Protocols 65
Simple Authentication
“I’m Alice”
Prove it
My password is “frank”
Alice Bob
Prove it
My password is “frank”
Alice Bob
Trudy
Part 3 Protocols 67
Authentication Attack
“I’m Alice”
Prove it
My password is “frank”
Trudy Bob
Alice Bob
Prove it
h(Alice’s password)
Alice Bob
Part 3 Protocols 71
Nonce
To ensure freshness, can employ a nonce
o Nonce == number used once
What to use for nonces?
o That is, what is the challenge?
What should Alice do with the nonce?
o That is, how to compute the response?
How can Bob verify the response?
Should we rely on passwords or keys?
Part 3 Protocols 72
Challenge-Response
“I’m Alice”
Nonce
Nonce
Part 3 Protocols 75
Authentication: Symmetric Key
Alice and Bob share symmetric key K
Key K known only to Alice and Bob
Authenticate by proving knowledge of
shared symmetric key
How to accomplish this?
o Cannot reveal key, must not allow replay
(or other) attack, must be verifiable, …
Part 3 Protocols 76
Authentication with
Symmetric Key
“I’m Alice”
R
E(R,K)
Alice, K Bob, K
“I’m Alice”, R
E(R,K)
E(R,K)
Alice, K Bob, K
Part 3 Protocols 79
Mutual Authentication
“I’m Alice”, RA
RB, E(RA, K)
E(RB, K)
Alice, K Bob, K
Trudy Bob, K
3. “I’m Alice”, RB
4. RC, E(RB, K)
Trudy Bob, K
Part 3 Protocols 81
Mutual Authentication
Our one-way authentication protocol is
not secure for mutual authentication
o Protocols are subtle!
o The “obvious” thing may not be secure
Also, if assumptions or environment
change, protocol may not be secure
o This is a common source of security failure
o For example, Internet protocols
Part 3 Protocols 82
Symmetric Key Mutual
Authentication
“I’m Alice”, RA
RB, E(“Bob”,RA,K)
E(“Alice”,RB,K)
Alice, K Bob, K
Part 3 Protocols 84
Public Key Authentication
“I’m Alice”
{R}Alice
R
Alice Bob
Is this secure?
Trudy can get Alice to decrypt anything!
o So, should have two key pairs
Part 3 Protocols 85
Public Key Authentication
“I’m Alice”
[R]Alice
Alice Bob
Is this secure?
Trudy can get Alice to sign anything!
o Same a previous should have two key pairs
Part 3 Protocols 86
Public Keys
Generally, a bad idea to use the same
key pair for encryption and signing
Instead, should have…
o …one key pair for encryption/decryption…
o …and a different key pair for
signing/verifying signatures
Part 3 Protocols 87
Session Key
Usually, a session key is required
o I.e., a symmetric key for a particular session
o Used for confidentiality and/or integrity
How to authenticate and establish a
session key (i.e., shared symmetric key)?
o When authentication completed, want Alice and
Bob to share a session key
o Trudy cannot break the authentication…
o …and Trudy cannot determine the session key
Part 3 Protocols 88
Authentication & Session Key
“I’m Alice”, R
{R,K}Alice
{R +1,K}Bob
Alice Bob
Is this secure?
o Alice is authenticated and session key is secure
o Alice’s “nonce”, R, useless to authenticate Bob
o The key K is acting as Bob’s nonce to Alice
No mutual authentication
Part 3 Protocols 89
Public Key Authentication
and Session Key
“I’m Alice”, R
[R,K]Bob
[R +1,K]Alice
Alice Bob
Is this secure?
o Mutual authentication (good), but…
o … session key is not secret (very bad)
Part 3 Protocols 90
Public Key Authentication
and Session Key
“I’m Alice”, R
{[R,K]Bob}Alice
{[R +1,K]Alice}Bob
Alice Bob
Is this secure?
Seems to be OK
Mutual authentication and session key!
Part 3 Protocols 91
Public Key Authentication
and Session Key
“I’m Alice”, R
[{R,K}Alice]Bob
[{R +1,K}Bob]Alice
Alice Bob
Is this secure?
Seems to be OK
o Anyone can see {R,K}Alice and {R +1,K}Bob
Part 3 Protocols 92
Perfect Forward Secrecy
Consider this “issue”…
o Alice encrypts message with shared key K and
sends ciphertext to Bob
o Trudy records ciphertext and later attacks
Alice’s (or Bob’s) computer to recover K
o Then Trudy decrypts recorded messages
Perfect forward secrecy (PFS): Trudy
cannot later decrypt recorded ciphertext
o Even if Trudy gets key K or other secret(s)
Is PFS possible?
Part 3 Protocols 93
Perfect Forward Secrecy
Suppose Alice and Bob share key K
For perfect forward secrecy, Alice and Bob
cannot use K to encrypt
Instead they must use a session key KS and
forget it after it’s used
Can Alice and Bob agree on session key KS
in a way that ensures PFS?
Part 3 Protocols 94
Naïve Session Key Protocol
E(KS, K)
E(messages, KS)
Alice, K Bob, K
ga mod p
gb mod p
Alice, a Bob, b
But Diffie-Hellman is subject to MiM
How to get PFS and prevent MiM?
Part 3 Protocols 96
Perfect Forward Secrecy
E(ga mod p, K)
E(gb mod p, K)
Alice: K, a Bob: K, b
Session key KS = gab mod p
Alice forgets a, Bob forgets b
So-called Ephemeral Diffie-Hellman
Neither Alice nor Bob can later recover KS
Are there other ways to achieve PFS?
Part 3 Protocols 97
Mutual Authentication,
Session Key and PFS
“I’m Alice”, RA
RB, [{RA, gb mod p}Alice]Bob
Part 3 Protocols 99
Public Key Authentication
with Timestamp T
“I’m Alice”, {[T, K]Alice}Bob
{[T +1, K]Bob}Alice
Alice Bob
Alice Bob
Trudy Bob
Alice Bob
In the real world, nothing happens at the right place at the right time.
It is the job of journalists and historians to correct that.
Mark Twain
REPLY
E(timestamp + 1, KAB)
Alice’s Bob
Computer
KDC
SA{“Bob”, KAB, KB{“Alice”, KAB}}
Alice’s workstation
Alice
Bob
KAB{timestamp+1}
Kerberos
Key SA used in authentication
o For confidentiality/integrity
Timestamps for authentication and
replay protection
Recall, that timestamps…
o Reduce the number of messageslike a
nonce that is known in advance
o But, “time” is a security-critical parameter
Part 3 Protocols 126
Kerberos Questions
When Alice logs in, KDC sends E(SA, TGT, KA)
where TGT = E(“Alice”, SA, KKDC)
Q: Why is TGT encrypted with KA?
A: Extra work for no added security!
In Alice’s “Kerberized” login to Bob, why
can Alice remain anonymous?
Why is “ticket to Bob” sent to Alice?
o Why doesn’t KDC send it directly to Bob?
air
interface
Mobile
Base AuC
VLR
Station
“land line”
HLR
PSTN
Base Internet
etc. Home
Visited Station Network
Network Controller
RAND
SRES Call to
destination
No
Mobile Fake
encryption Base Station Base Station