1 / 19

Key Management

Key Management. Shared Key Exchange Problem. How do Alice and Bob exchange a shared secret? Offline Doesn’t scale Using public key cryptography (possible) Using specially crafted messages ( Diffie Hellman) Using a trusted third party (KDC) Secrets should never be sent in clear

sal
Download Presentation

Key Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Key Management

  2. Shared Key Exchange Problem • How do Alice and Bob exchange a shared secret? • Offline • Doesn’t scale • Using public key cryptography (possible) • Using specially crafted messages (Diffie Hellman) • Using a trusted third party (KDC) • Secrets should never be sent in clear • We should prevent replay attacks • We should prevent reuse of old keys

  3. Diffie Hellman Key Exchange • Exchange a secret with someone you never met while shouting in a room full of people • Alice and Bob agree on g and large n • Alice chooses random a, sends • Bob chooses random b, sends • Alice takes Bob’s message and calculates • Bob does the same; now they both know shared secret

  4. KDC Based Key Distribution • Building up to Needham Schroeder/Kerberos • User sends req. to KDC (key distrib. center) • KDC generates a shared key: Kc,s • Keys KKDC,C andKKDC,S are preconfigured • No keys ever traverse net in the clear • Why are identities in tickets? • 1. C, S • 3. EKKDC,S{C, Kc,s} C KDC S ticket • 2. EKKDC,C{S, Kc,s}

  5. KDC Based Key Distribution • KDC does not have to talk both to C and S • Messages 2 or 3 can be replayed by M • Force C and S to use same secret for a long time • Cause S to have an old ticket, break comm. w C • ticketS = EKKDC,S{C, Kc,s} • 1. C, S C KDC S • 2. EKKDC,C{S, Kc,s}, ticketS • 3. ticketS

  6. Needham-Shroeder Key Exchange • Use nonces to prevent replay attacks • ticketS = EKKDC,S{C, Kc,s} • 1. N1, C, S C S KDC • 2. EKKDC,C{N1, S, Kc,s,ticketS} • 3. EKC,S{N2}, ticketS • 4. EKC,S{N2-1, N3} • 5. EKC,S{N3-1}

  7. Whys … • Why N1? • Why N2? • Why N3? • Why encrypt ticketS

  8. Problem • What happens if attacker gets session key? • Can reuse old session key to answer challenge-response, generate new requests, etc • Need timestamps to ensure freshness = tickets expire after some time

  9. Solution • Introduce Ticket Granting Server (TGS) • Daily ticket plus session keys • Authentication server (AS) authenticates users • TGS+AS = KDC • This is modified Needham-Schroeder • Basis for Kerberos

  10. TGS 3. TGSReq 4. TGSRep C S 5. SReq Kerberos Third-party authentication service • Distributes session keys for authentication, confidentiality, and integrity AS 2. ASRep 1. ASReq

  11. Kerberos KC, AS = f(passuser) • ASReq= username, TGS, timestamp1 • TTGS = EKAS,TGS(C, KTGS,C, timestamp2, lifetime2) • ASRep = EKC,AS(KTGS,C, TGS, timestamp2, lifetime2), TTGS • TGSReq = TTGS, S, EKTGS,C(C, timestamp3) • TS = EKS,TGS(C, KC,S, timestamp4, lifetime4) • TGSRep = TS, EKC,TGS(KC,S, S, timestamp4, lifetime4) • SReq = EKC,S(C, timestamp5), TS

  12. Public Key Exchange Problem • How do we verify an identity: • Alice sends to Bob her public key Pub(A) • Bob sends to Alice his public key Pub(B) • How do we ensure that those keys really belong to Alice and Bob?Need a trusted third party

  13. Man-in-the-Middle Attack On Key Exchange • Alice sends to Bob her public key Pub(A) • Mallory captures this and sends to Bob Pub(M) • Bob sends to Alice his public key Pub(B) • Mallory captures this and sends to Alice Pub(M) • Now Alice and Bob correspond through Mallory who can read/change all their messages

  14. Public Key Exchange • Public key is public but … • How does either side know who and what the key is for? • Does this solve key distribution problem? • No – while confidentiality is not required, integrity is • Still need trusted third party • Digital certificates – certificate authority (CA) signs identity+public key tuple with its private key • Problem is finding a CA that both client and server trust

  15. Digital Certificates • Everyone has Trent’s public key • Trent signs both Alice’s and Bob’s public keys – he generates public-key certificate • When they receive keys, verify the signature • Mallory cannot impersonate Alice or Bob because her key is signed as Mallory’s • Certificate usually contains more than the public key • Name, network address, organization • Trent is known as Certificate Authority (CA)

  16. Certificate-Based Key Exchange • Authentication steps • Alice provides nonce, or a timestamp is used instead, along with her certificate. • Bob selects session key and sends it to Alice with nonce, encrypted with Alice’s public key, and signed with Bob’s private key. He sends his certificate too • Alice validates certificate – it is really Bob’s key inside • Alice checks signature and nonce – Bob really generated the message and it is fresh

  17. PGP • Pretty Good Privacy • “Web of Trust” • Public key, identity association is signed by many entities • Receiver hopefully can locate several signatures that he can trust • Like an endorsement scheme

  18. SSH • User keys installed on server out of band • User logs in with a password • Copies her public key onto server • Weak assurance of server keys • User machine remembers server keys on first contact • Checks if this is still the same host on subsequent contact • But no check on first contact

  19. Recovery From Stolen Private Keys • Revocation lists (CRL’s) • Long lists • Hard to propagate • Lifetime / Expiration • Short life allows assurance of validity at time of issue • Real time validation • Receiver of a certificate asks the CA who signed it if corresponding private key was compromised • Can cache replies

More Related