Presentation is loading. Please wait.

Presentation is loading. Please wait.

Csci5233 Computer Security1 Bishop: Chapter 10 Key Management.

Similar presentations


Presentation on theme: "Csci5233 Computer Security1 Bishop: Chapter 10 Key Management."— Presentation transcript:

1 csci5233 Computer Security1 Bishop: Chapter 10 Key Management

2 csci5233 Computer Security2 Topics Key exchange –Session vs interchange keys –Classical vs public key methods –Key generation Cryptographic key infrastructure –Certificates Key storage –Key escrow –Key revocation Digital signatures

3 csci5233 Computer Security3 Notation X  Y : { Z || W } k X,Y –X sends Y the message produced by concatenating Z and W enciphered by key k X,Y, which is shared by users X and Y A  T : { Z } k A || { W } k A,T –A sends T a message consisting of the concatenation of Z enciphered using k A, A’s key, and W enciphered using k A,T, the key shared by A and T r 1, r 2 : nonces (nonrepeating random numbers)

4 csci5233 Computer Security4 Session, Interchange Keys Alice wants to send a message m to Bob –Assume public key encryption –Alice generates a random cryptographic key k s and uses it to encipher m To be used for this message only Called a session key –She enciphers k s with Bob’s public key k B k B enciphers all session keys Alice uses to communicate with Bob Called an interchange key –Alice sends { m } k s { k s } k B

5 csci5233 Computer Security5 Benefits Limits amount of traffic enciphered with single key –Standard practice, to decrease the amount of traffic an attacker can obtain Possible attacks –Example: Alice will send Bob a message that is either “BUY” or “SELL”. Eve computes possible ciphertexts { “BUY” } k B and { “SELL” } k B. Eve intercepts enciphered message, compares, and gets plaintext at once.

6 csci5233 Computer Security6 Key Exchange Algorithms Goal: Alice, Bob get shared key –Key cannot be sent in clear Attacker can listen in Key can be sent enciphered, or derived from exchanged data plus data not known to an eavesdropper –Alice, Bob may trust third party –All cryptosystems, protocols publicly known Only secret data is the keys, ancillary information known only to Alice and Bob needed to derive keys Anything transmitted is assumed known to attacker

7 csci5233 Computer Security7 Classical Key Exchange Bootstrap problem: how do Alice, Bob begin? –Alice can’t send it to Bob in the clear! Assume trusted third party, Cathy –Alice and Cathy share secret key k A –Bob and Cathy share secret key k B Use this to exchange shared key k s

8 csci5233 Computer Security8 Simple Protocol 1. Alice Cathy { request for session key to Bob } k A 2. Alice Cathy { k s } k A || { k s } k B 3. Alice Bob { k s } k B Then k s can be used as the secret key between Alice and Bob. e.g., 4. Alice  Bob {M} k s

9 csci5233 Computer Security9 Problems ? How does Bob know he is talking to Alice? –Replay attack: Eve records message from Alice to Bob (esp. messages 3 and 4), later replays it; Bob may think he’s talking to Alice, but he isn’t. e.g., Session key reuse: Eve replays message from Alice to Bob, so Bob re-uses session key. e.g., Eve replays the message {“Deposit $500 to Jack’s account” }, originally sent from Alice to Bob. Protocols must provide authentication and defense against replay.

10 csci5233 Computer Security10 Needham-Schroeder 1. AliceCathy Alice || Bob || r 1 2. AliceCathy { Alice || Bob || r 1 || k s || { Alice || k s } k B } k A 3. AliceBob { Alice || k s } k B 4. AliceBob { r 2 } k s 5. AliceBob { r 2 – 1 } k s

11 csci5233 Computer Security11 Argument: Alice talking to Bob Second message –Enciphered using key only she and Cathy know So Cathy must have enciphered it –Response to first message As r 1 in it matches r 1 in first message Third message –Alice knows only Bob can read it As only Bob can derive session key from that message –Any messages enciphered with that key are from Bob

12 csci5233 Computer Security12 Argument: Bob talking to Alice Third message –Enciphered using key only he and Cathy know So Cathy must have enciphered it –Names Alice, session key Cathy provided session key, says Alice is the other party //identity associated with the session key Fourth message –Uses session key to determine if it is replay from Eve If not, Alice will respond correctly in fifth message If so, Eve can’t decipher r 2 and so can’t respond, or responds incorrectly

13 csci5233 Computer Security13 Denning-Sacco Modification Assumption of Needham-Schroeder: All keys are secret. Question: Suppose Eve can obtain the session key. How does that affect the protocol? –In what follows, Eve knows k s. a. EveBob { Alice || k s } k B b. Alice (intercepted by Eve)Bob { r 2 } k s c. EveBob { r 2 – 1 } k s

14 csci5233 Computer Security14 Problem & Solution In the protocol above, Eve impersonates Alice. Problem: replay in the third step of Needham- Schroeder –i.e., Step a in the previous slide Solution: use time stamp T to detect replay

15 csci5233 Computer Security15 Needham-Schroeder with Denning-Sacco Modification 1. AliceCathy Alice || Bob || r 1 2. AliceCathy { Alice || Bob || r 1 || k s || { Alice || T || k s } k B } k A 3. AliceBob { Alice || T || k s } k B 4. AliceBob { r 2 } k s 5. AliceBob { r 2 – 1 } k s Bob will reject the message if T is too old.

16 csci5233 Computer Security16 Needham-Schroeder with Denning-Sacco Modification Weakness: If clocks are not synchronized, Bob may either reject valid messages or accept replays. –[Denning-Sacco] Parties with slow clocks are vulnerable to replay. –[Gong] Parties with fast clocks are also vulnerable. + Resetting clock does not eliminate vulnerability.

17 csci5233 Computer Security17 Otway-Rees Protocol Corrects the problem in the Needham-Schroeder –That is, Eve replaying the third message in the protocol Does not use timestamps –Not vulnerable to the problems that Denning-Sacco modification has Uses an integer n to associate all messages with particular exchange

18 csci5233 Computer Security18 The Protocol 1. AliceBob n || Alice || Bob || { r 1 || n || Alice || Bob } k A 2. CathyBob n || Alice || Bob || { r 1 || n || Alice || Bob } k A || { r 2 || n || Alice || Bob } k B 3. CathyBob n || { r 1 || k s } k A || { r 2 || k s } k B 4. AliceBob n || { r 1 || k s } k A

19 csci5233 Computer Security19 Argument: Alice talking to Bob Fourth message –If n matches the first message, Alice knows it is part of this exchange protocol. –Cathy generated k s because only she and Alice know k A. –Alice determines that the enciphered part belongs to the exchange as r 1 matches r 1 in encrypted part of the first message.

20 csci5233 Computer Security20 Argument: Bob talking to Alice Third message –If n matches the second message, Bob knows it is part of this exchange protocol. –Cathy generated k s because only she and Bob know k B. –Bob knows that the enciphered part belongs to the exchange as r 2 matches r 2 in encrypted part of the second message.

21 csci5233 Computer Security21 Replay Attack against the Otway- Rees Protocol ? Eve acquires a k s and the message in the third step –n || { r 1 || k s } k A || { r 2 || k s } k B Eve forwards appropriate part to Alice –Alice has no ongoing key exchange with Bob: n matches nothing, so is rejected. –Alice has ongoing key exchange with Bob: n does not match, so is again rejected. If replay is for the current key exchange, and Eve sent the relevant part before Bob did, Eve could simply listen to traffic; no replay is needed for Eve to get the information.

22 csci5233 Computer Security22 Kerberos Authentication system –Based on Needham-Schroeder with Denning-Sacco modification –Central server plays role of trusted third party (“Cathy”) Ticket –Issuer vouches for identity of requester of service Authenticator –Identifies sender

23 csci5233 Computer Security23 Idea User u authenticates to the Kerberos server: –Obtains ticket T u,TGS for ticket granting service (TGS) User u wants to use service s: –User u sends authenticator A u, ticket T u,TGS to the TGS asking for ticket for service s. –TGS sends ticket T u,s to user u. –User sends A u, T u,s to the server as a request to use s. Details follow

24 csci5233 Computer Security24 Ticket Credential saying the ticket issuer (i.e., the authentication server) has identified the ticket requester (i.e., user u) Example ticket issued to user u for service s T u,s = s || { u || u’s address || valid time || k u,s } k s where: –k u,s is session key for user u and the ticket granting service s. –k s is the key shared between s and the authentication server –Valid time is interval for which the ticket is valid. –u’s address may be IP address or something else Note: more fields, but not relevant here

25 csci5233 Computer Security25 Authenticator Credential containing identity of the sender of a ticket –Used to confirm the sender is the entity to which the ticket was issued. Example: an authenticator that user u generates for authenticating himself to service s A u,s = { u || generation time || k t } k u,s where: –k t is an alternate session key –Generation time is when authenticator generated Note: more fields, not relevant here

26 csci5233 Computer Security26

27 csci5233 Computer Security27 Protocol 1. userCathy user || TGS Cathy 2. user { k u,TGS } k u || T u,TGS 3. userTGS service || A u,TGS || T u,TGS 4. userTGS user || { k u,s } k u,TGS || T u,s 5. userservice A u,s || T u,s 6. userservice { t + 1 } k u,s

28 csci5233 Computer Security28 Exercises 1.In constructing A u,s (see steps 3 and 5), the user u needs to know his session key with s, i.e., k u,s. How does u get the session key? Hint: Show details of A u,s and T u,s. 2.How is the session key between u and the TGS, i.e., k u,TGS, used in the protocol? 3.How is the session key between u and the service provider s, i.e., k u,s, used in the protocol? c.f., An alternative illustration of the Kerberos protocol: http://sce.cl.uh.edu/yang/teaching/csci5233fall02/Kerberos_Authenticati on_Steps.html http://sce.cl.uh.edu/yang/teaching/csci5233fall02/Kerberos_Authenticati on_Steps.html

29 csci5233 Computer Security29 Analysis First two steps get user ticket to use TGS –User u can obtain session key, k u,TGS, only if u knows key shared with Cathy, K u. Next four steps show how u gets and uses ticket for service s –Service s validates request by checking sender (using A u,s ) is the same as entity ticket issued to –Step 6 optional; used when u requests confirmation

30 csci5233 Computer Security30 Problems Relies on synchronized clocks –If not synchronized and old tickets, authenticators not cached, replay is possible. Tickets have some fixed fields –Dictionary attacks possible –Kerberos 4 session keys weak (had much less than 56 bits of randomness); researchers at Purdue found them from tickets in minutes Solutions? A potential research or survey project

31 csci5233 Computer Security31 Key Exchange using Public Key Here interchange keys known –e A, e B : Alice and Bob’s public keys known to all –d A, d B : Alice and Bob’s private keys known only to the owner Simple protocol –k s is the desired session key Alice Bob { k s } e B

32 csci5233 Computer Security32 Problem and Solution Vulnerable to forgery or replay –Because e B known to anyone, Bob has no assurance that it was really Alice that sent the message Simple fix uses Alice’s private key –k s is the desired session key Alice Bob { { k s } d A } e B

33 csci5233 Computer Security33 Notes Can include message enciphered with ks Assumes Bob has Alice’s public key, and vice versa –If not, each must get it from a public server –If keys not bound to identity of the owner, attacker Eve can launch a man-in-the-middle attack (next slide; Cathy is public server providing public keys) Solution to this (binding identity to keys) discussed later as public key infrastructure (PKI)

34 csci5233 Computer Security34 Man-in-the-Middle Attack (in key exchange using public keys) AliceCathy send Bob’s public key Eve Cathy send Bob’s public key Eve Cathy eBeB Alice eEeE Eve Alice Bob { k s } e E Eve Bob { k s } e B Eve intercepts request Eve intercepts message

35 csci5233 Computer Security35 Key Generation Goal: generate difficult-to-guess keys Problem statement: given a set of K potential keys, choose one randomly –Equivalent to selecting a random number between 0 and K–1 inclusive Why is this hard: generating random numbers –Actually, numbers are usually pseudo-random, that is, generated by an algorithm

36 csci5233 Computer Security36 What is “Random”? Sequence of cryptographically ransom numbers: a sequence of numbers n 1, n 2, … such that for any integer k > 0, an observer cannot predict n k even if all of n 1, …, n k–1 are known –Best: physical source of randomness Random pulses Electromagnetic phenomena Characteristics of computing environment such as disk latency Ambient background noise

37 csci5233 Computer Security37 What is “Pseudorandom”? Sequence of cryptographically pseudorandom numbers: sequence of numbers intended to simulate a sequence of cryptographically random numbers but generated by an algorithm –Very difficult to do this well Linear congruential generators [n k = (an k–1 + b) mod n]: broken Polynomial congruential generators [n k = (a j n k–1 j + … + a 1 n k–1 a 0 ) mod n]: broken too Here, “broken” means next number in sequence can be determined

38 csci5233 Computer Security38 Best Pseudorandom Numbers Strong mixing function: function of 2 or more inputs with each bit of output depending on some nonlinear function of all input bits –Examples: DES, MD5, SHA-1 –Use on UNIX-based systems: (date; ps gaux) | md5 where “ps gaux” lists all information about all processes on system

39 csci5233 Computer Security39 Next  Continued (Bishop, Chapter 10): Cryptographic key infrastructure –Certificates Key storage –Key escrow –Key revocation Digital signatures


Download ppt "Csci5233 Computer Security1 Bishop: Chapter 10 Key Management."

Similar presentations


Ads by Google