260 likes | 460 Views
ECE 454/CS594 Computer and Network Security. Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011. Security Handshake Pitfalls. Login only Mutual authentication Integrity/encryption after authentication
E N D
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011
Security Handshake Pitfalls Login only Mutual authentication Integrity/encryption after authentication Nonce types Picking random numbers
Security Protocol • An agreement between communication parties about the process and the format of security bootstrap, authentication, key establishment, encryption/hashing algorithm and parameter negotiation, etc. • Typically include: - Authentication handshake - Session key negotiation, algorithm/parameter negotiation - Data encryption and/or integrity protection
Security Bootstrap Shared secret: • Password (for human users) • Pre-shared key (between firewalls) • Ticket by KDC (among a large number of participates) Public key: • Manually configured • Certificate by CA
Login Only: A Bad Idea • Alice sends name and password in clear (across network) to Bob • Bob verifies name and password and communication proceeds
Login Only: A Better Idea Using Shared Secret (1) • f(K,R) can be K{R} or h(K,R) • Authentication is one way: impersonation of Bob, offline password guessing, database reading • How to encrypt subsequent conversation?
Login Only: A Better Idea Using Shared Secret (2) • Problems: same as the previous one • Requires reversible cryptography (hash will not work) • If R is a recognizable number, this protocol does mutual authentication • Can make R recognizable but with limited lifetime, e.g., timestamp. It however requires clock synchronization
Login Only: A Better Idea Using Shared Secret (3) Advantages: • It can be easily added to an existing protocol • More efficient: it saves two message exchanges • Bob is stateless Problems: • Replay attack (single server, multiple servers) • Reset clock attack
Login Only: A Better Idea Using Shared Secret (4) • Same as the previous one, but using a hash • Why transmit timestamp in the clear?
Login Only: A Better Idea Using PKC (1) Implications: • Compromise of Bob's database will not allow attacker to impersonate Alice • Attacker may be able to trick Alice into signing anything
Login Only: A Better Idea Using PKC (2) Implications: • Compromise of Bob's database will not allow attacker to impersonate Alice • Attacker may be able to trick Alice into decrypting anything
Mutual Authentication (1) • Problem: inefficient
Mutual Authentication (2) – Optimized Implications: • More efficient • Subject to reflection attack: easy to obtain chosen plaintext
Reflection Attack • Trudy opens 1st session to Bob • Trudy opens 2nd session to Bob in order to get information needed to complete 1st session
Reflection Attack (Cont’d) Solution: • Alice and Bob should not do exactly the same thing: different keys, different challenges • Different keys: have Bob encrypt with KAlice-Bob and Alice encrypt with KAlice-Bob+1, etc. • Different challenges: initiator (Alice) sends odd R, responder (Bob) sends even R, etc.
Mutual Authentication (3) – Less Optimized Implications: • One "extra" message and Trudy cannot obtain chosen plaintext Rule: the initiator should be the first to prove its identity (the assumption is that the initiator is more likely the bad guy)
Mutual Authentication (4) Implications: • How to obtain public keys? • Store Bob’s public key encrypted with Alice’s password • Store Bob’s public key certificate signed by Alice
Mutual Authentication (5) Implications: • Can be easily added to existing challenge/response protocols • Alice and Bob must encrypt different things • Clock synchronization: time is now security-critical • Reflection attack
Integrity/Encryption After Authentication • How to establish a session key during authentication? • By shared secret • By two-way public key • By one-way public key
Shared Secret After this authentication: • Can we use K{R+1} as the shared session key? • How about K XOR R, K{K+R}, K+K{R}, h{K|R}? In general, a good session key is • different for each session • unguessable by attacker
Two Way Public Key • Alice and Bob each has a public/private key pair • How about Alice picks a random R, and sends {R}Bob to Bob - Trudy can impersonate Alice • How about Alice sends [{R}Bob]Alice to Bob - Trudy can obtain R by overrunning Bob and decrypt old messages • Alice sends Bob [{R1}Bob]Alice, Bob sends Alice [{R2}Bob]Alice, and the session key is R = R1 XOR R2 - Trudy needs to overrun both Alice and Bob • Diffie-Hellman key establishment: Alice sends Bob [gR1 mod p]Alice, Bob sends Alice [gR2 mod p]Bob, and the session key is R = gR1R2mod p - Doesn’t help even if Trudy overruns both Alice and Bob
One Way Public Key • Only Server Bob has a public/private key pair, Client Alice won’t bother having keys and certificate: SSL • Alice picks a random R, and sends {R}Bob to Bob - Trudy can decrypt old messages by overrunning Bob • Diffie-Hellman key establishment: Alice sends Bob gR1 mod p, Bob sends Alice [gR2 mod p]Bob, and the session key is R = gR1R2mod p • Trudy can impersonate Alice in either case
Nonce Types • Nonce: a quantity used only once - Large random number: unguessable, unpredictable, non-reuse w.h.p., makes the best nonce - Timestamp: requires clock synchronization - Sequence number: needs to maintain state unpredictability is important unpredictability is not required
Picking Random Numbers • Different applications require different types of random numbers • A common approach for cryptographic operations: pseudorandom number generator - seed value is critical - common mistakes: seed is from a small space, hashing the current time when a random value is needed, divulging the seed value
Authentication Protocol Checklist Authentication protocols protect against • eavesdropping • impersonation • database reading • message modification • combinations of the above
Reading Assignment • [Kaufman] Chapter 11