Chapter 9: Key Management

Slides:



Advertisements
Similar presentations
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 4.6 Kerberos.
Advertisements

Chapter 14 – Authentication Applications
Authentication Applications. will consider authentication functions will consider authentication functions developed to support application-level authentication.
Key distribution and certification In the case of public key encryption model the authenticity of the public key of each partner in the communication must.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
CIS 725 Key Exchange Protocols. Alice ( PB Bob (M, PR Alice (hash(M))) PB Alice Confidentiality, Integrity and Authenication PR Bob M, hash(M) M, PR Alice.
Csci5233 Computer Security1 Bishop: Chapter 10 (Cont.) Key Management: Certificates.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 14 From Cryptography and Network Security Fourth Edition written by William Stallings, and Lecture slides by Lawrie Brown, the Australian Defence.
CSCI283 Fall 2005 GWU All slides from Bishop’s slide set Public Key Infrastructure (PKI)
1 Authentication Applications Digital Signatures Security Concerns X.509 Authentication Service Kerberos Based on slides by Dr. Lawrie Brown of the Australian.
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #9-1 Chapter 9: Key Management Session and Interchange Keys Key Exchange Cryptographic.
1 Digital Signatures CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute April 12, 2004.
Chapter 9: Key Management
1 Key Management CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute April 1, 2004.
Computer Security1 Bishop: Chapter 9 Key Management.
Slide #9-1 Chapter 9: Key Management Session and Interchange Keys Key Exchange Cryptographic Key Infrastructure Storing and Revoking Keys Digital Signatures.
Computer Science Public Key Management Lecture 5.
Csci5233 Computer Security1 Bishop: Chapter 10 Key Management: Digital Signature.
Cryptography and Network Security Chapter 14 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Csci5233 Computer Security1 Bishop: Chapter 10 (Cont.) Key Management: Storage & Revoking.
Digital Signatures. Public Key Cryptography Public Key Cryptography Requirements 1.It must be computationally easy to encipher or decipher a message.
1 Chapter 9: Key Management All algorithms we have introduced are based on one assumption: keys have been distributed. But how to do that? Key generation,
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Assistant Professor, SIS Lecture 10 Nov 8, 2007 Hash Functions Key Management.
Week 4 - Wednesday.  What did we talk about last time?  RSA algorithm.
Authentication 3: On The Internet. 2 Readings URL attacks
KERBEROS. Introduction trusted key server system from MIT.Part of project Athena (MIT).Developed in mid 1980s. provides centralised private-key third-party.
Courtesy of Professors Chris Clifton & Matt Bishop INFSCI 2935: Introduction of Computer Security1 Nov 4, 2003 Introduction to Computer Security Lecture.
Cryptography and Network Security Chapter 14 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Csci5233 Computer Security1 Bishop: Chapter 10 Key Management.
Slide #9-1 Chapter 9: Key Management Session and Interchange Keys Key Exchange Cryptographic Key Infrastructure Storing and Revoking Keys Digital Signatures.
Fall 2006CS 395: Computer Security1 Key Management.
1IS2150/TEL2810: Introduction to Computer Security Nov 1, 2005 Introduction to Computer Security Lecture 8 Key Management.
Prof. Reuven Aviv, Nov 2013 Public Key Infrastructure1 Prof. Reuven Aviv Tel Hai Academic College Department of Computer Science Public Key Infrastructure.
Cryptography and Network Security Chapter 14 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Key management issues in PGP
Contents Introduction. 9.1 Session and Interchange Keys.
Chapter 9. Key management
Key Management October 26, 2006 Lecture 7
CSC 482/582: Computer Security
Key Management Session and Interchange Key Key Exchange
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Chapter 14 – Authentication Applications
Cryptography and Network Security
KERBEROS.
CS480 Cryptography and Information Security
Authentication Applications
Authentication Protocol
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
IS 2150 / TEL 2810 Introduction to Security
Key Management CS461/ECE422.
Chapter 10: Key Management
Public Key Infrastructure (PKI)
CS60002: Distributed Systems
CS 378 Kerberos Vitaly Shmatikov.
CSC 482/582: Computer Security
CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9
Protocol ap1.0: Alice says “I am Alice”
Overview Key exchange Cryptographic key infrastructure Key storage
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Computer Security: Art and Science, 2nd Edition
Bishop: Chapter 10 Key Management: Digital Signature
KERBEROS.
CDK: Chapter 7 TvS: Chapter 9
KERBEROS Miah, Md. Saef Ullah.
Chapter 9: Key Management
Kerberos and X.509 Fourth Edition by William Stallings
Chapter 10: Key Management
Authentication Applications
AIT 682: Network and Systems Security
Presentation transcript:

Chapter 9: Key Management Session and Interchange Keys Key Exchange Cryptographic Key Infrastructure Storing and Revoking Keys Digital Signatures Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Overview Key exchange Cryptographic key infrastructure Key storage Session vs. interchange keys Classical, public key methods Cryptographic key infrastructure Binding identity to a key Certificates Key storage Key revocation Digital signatures Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Notation Generic form : X  Y : { Z } k message Z enciphered by key k X  Y : { Z || W } kX,Y X sends Y the message produced by concatenating Z and W enciphered by key kX,Y, which is shared by users X and Y A  T : { Z } kA || { W } kA,T A sends T a message consisting of the concatenation of Z enciphered using kA, A’s key, and W enciphered using kA,T, the key shared by A and T r1, r2 nonces (nonrepeating random numbers) Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Session, Interchange Keys Alice wants to send a message m to Bob Assume public key encryption Alice generates a random cryptographic key ks and uses it to encipher m To be used for this message only Called a session key She enciphers ks with Bob’s public key kB kB enciphers all session keys Alice uses to communicate with Bob Called an interchange key Could also be a secret key shared by Alice and Bob Alice sends { m } ks || { ks } kB Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Benefits of Session Keys Limits amount of traffic enciphered with single key Standard practice, to decrease the amount of traffic an attacker can obtain Compared to encrypting all messages with interchange key Prevents some attacks not others – if the number of possible messages are few, then potential for successful discovery. Example: Alice will send Bob message that is either “BUY” or “SELL”. Eve computes possible cipher texts { “BUY” } kB and { “SELL” } kB. Eve intercepts enciphered message, compares, and gets plaintext at once Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

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 Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

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 kA Bob and Cathy share secret key kB Use this to exchange shared key ks Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Simple Protocol { request for session key to Bob } kA,C Alice Cathy 7:15 Alice Cathy { ks } kA,C || { ks } kB,C Alice Cathy 7:20 Okay, Alice. This is your session key ks And tell Bob I got him a session key ks { ks } kB,C 7:25 Alice Bob Hey, Bob, Cathy wants me to forward you a session key ks with which we can talk { message } ks 7:30 Alice Bob Hey, Bob, here’s the message

Problems How does Bob know he is talking to Alice? Replay attack: Eve records message from Alice to Bob, later replays it; Bob may think he’s talking to Alice, but he isn’t Session key reuse: Eve replays message from Alice to Bob, so Bob re-uses session key Protocols must provide authentication and defense against replay Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Replay Attack { ks } kB,C 7:35 Eve Bob { message } ks 7:40 Eve Bob He must be Alice again Hey, Bob, Cathy wants me to forward you a session key ks with which we can talk { message } ks 7:40 Eve Bob He must be Alice again Hey, Bob, here’s the message Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Replay Attack (Cont’d) Why is replaying (a valid) message a problem? Think about this scenario By SOD principle, Alice takes deposit and Bob credits the corresponding account Alice sends Bob a message “Eve just deposited $50k” Eve replays it… Protocols must defend against such replay attack Adds considerable complexity Basic idea is “challenge-response” Eve: “Hey, bob, this is Alice” Bob: “Hmm, then you must have Alice’s key” Bob: (Bob generates r1 ) “Now encrypt this!” Eve: ……

Needham-Schroeder Assume Bob and Alice trust Cathy. r1, r2 are random Needham-Schroeder Assume Bob and Alice trust Cathy. r1, r2 are random. r1, not used before. Nonce. Alice || Bob || r1 Alice Cathy Hey, Cathy, I need to talk to Bob. Alice Cathy {Alice || Bob || r1|| ks ||{Alice|| ks} kB,C } kA,C Hey, Alice, this is Cathy And tell Bob I got him a session key ks this is your key ks Alice Bob { Alice || ks } kB,C Hey, Bob, this is Alice. Cathy wants me to forward you a session key ks with which we can talk Alice Bob { r2 } ks You’re Alice? So you must have ks. Prove it! Alice Bob { r2 – 1 } ks Here’s the proof that I have ks

Alice’s Point of View Second message Third message Encrypted with a key kA,C that only Alice and Cathy know, so only Cathy can create the message Containing a challenge r1, so the message is not a replay Third message Encrypted with a key kB,C that only Bob and Cathy know, so only Bob can read it and extract the session key { Alice || Bob || r1|| ks||{ Alice || ks } kB,C } kA,C Alice Cathy Alice Bob {Alice|| ks} kB,C

Bob’s Point of View Third message Fourth and Fifth messages Encrypted with a key that only Bob and Cathy know, so the message can only be created by Cathy The name Alice is in the message, so Cathy says the session key is to be used while talking to Alice Fourth and Fifth messages Determine if it is a replay from someone other than Alice If not, Alice will respond correctly in fifth message If so, Eve can’t decipher r2 and so can’t respond, or responds incorrectly Alice Bob { Alice || ks } kB,C Alice Bob { r2 } ks Alice Bob { r2 – 1 } ks

Denning-Sacco Modification What if after some time, Eve obtains the session key ks? More likely to be compromised than kA,C or kBB,C Eve replays the third message { Alice || ks } kB,C Eve Bob Hey, Bob, this is Alice (replay) { r2 } ks Eve Bob You’re Alice? So you must have ks. Prove it! { r2 – 1 } ks Eve Bob Here’s the proof that I have ks

Solution In protocol above, Eve impersonates Alice Problem: replay in third step First in previous slide Solution: use time stamp T to detect replay Weakness: if clocks not synchronized, may either reject valid messages or accept replays Parties with either slow or fast clocks vulnerable to replay Resetting clock does not eliminate vulnerability Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Denning-Sacco Modification (Cont’d) Solution: use time stamp T to detect replay Weakness: clocks must be synchronized Alice || Bob || r1 Alice Cathy { Alice || Bob || r1 || ks || { Alice || T || ks } kB,C } kA,C 7:35 Alice Cathy { Alice || T || ks } kB,C 7:36 Alice Bob { r2 } ks Alice Bob { r2 – 1 } ks Alice Bob

Kerberose Chapters 13 and 14 from Kaufmann, Perlman and Speciner More detailed than the textbook (With permission of Prof Duminda)

What Kerberos Provides A centralized authentication service Authenticate users to services Authenticate services to users Servers are relieved of the burden of maintaining authentication information Supports inter-server authentication

Properties of Kerberos Rely exclusively on conventional encryption. Public key based Kerberos has been considered. Stateless: Kerberos server doesn’t need to maintain the state information about any entities being authenticated.

Kerberos Design Requirements Secure A network eavesdropper should not be able to obtain the necessary info to impersonate a user. Reliable Kerberos should be highly available and should employ a distributed server architecture. Transparent The user shouldn’t be aware that authentication is taking place. Scalable The system should be capable of supporting large numbers of clients and servers.

Main Components and Interaction Mode AS TGS Kerberos 1. Request ticket to talk to Bob Client: Alice 2. Invents session key Kab, encrypts with Alice’s master key = EKa(Kab), encrypts with Bob’s master key = EKb(Kab), Sends over to Alice 3. Submits EKb(Kab), Main Component: Key Distribution Center Shares a master key with each principle Generates session keys, encrypts using a remote recipient’s key = Ticket 4. Checks and start using Kab Server: Bob

The Kerberos Protocol Outline of the introduction to the Kerberos protocol A simple authentication protocol A more secure authentication protocol Kerberos Version 4 authentication protocol

A Simple Authentication Protocol Use an authentication server (AS) Basic idea: use a ticket to authenticate a user to a server. Protocol CAS: IDC || PWC || IDV AS C: Ticketv = EKV[IDC || IDV] C V: IDC || Ticketv

A Simple Authentication Protocol (Cont’d) Advantages A centralized authentication service Weaknesses A user needs to enter a password for every different service. Password is transmitted in plaintext. Subject to replay attack

A More Secure Authentication Protocol A new server: ticket-granting server (TGS) The protocol Once per user logon session CAS: IDC || IDtgs AS C: EKC[Tickettgs] Once per type of service C TGS: IDC || IDV || Tickettgs TGS C: TicketV Once per service session C V: IDC || TicketV Tickettgs = EKtgs[IDC || IDtgs || TS1 || lifetime1] TicketV = EKV[IDC || IDV || TS2 || lifetime2] TS=time stamp

A More Secure Authentication Protocol (Cont’d) Ticket-granting ticket (TGT): Tickettgs . Service-granting ticket: TicketV. Weaknesses Replay attack: No authentication of the valid ownership of the tickets. No authentication of the servers. What are the components in the tickets? Why do we have them?

Kerberos Version 4 Protocol Basic idea to address the previous weaknesses Session key Authentication of the valid ownership of the tickets Provide authentication of servers. Assume Authentication Server knows Each client’s master secret key, which is derived from each client’s password

Kerberos Version 4 Protocol (Cont’d) Authentication Service Exchange: to obtain ticket-granting ticket (TGT) CAS: IDC || IDtgs || TS1 AS C: EKC[KC,tgs || IDtgs || TS2 || Lifetime2 || Tickettgs] Tickettgs = EKtgs[KC,tgs || IDC || IDtgs || TS2 || Lifetime2] KC,tgs is the session key between C and TGS!

Kerberos Version 4 Protocol (Cont’d) Ticket-Granting Service Exchange: to obtain service-granting ticket (SGT) C TGS: IDV || Tickettgs || Authenticatorc TGS C: EKC,tgs[KC,V || IDV || TS4 ||Lifetime4|| TicketV] Tickettgs = EKtgs[KC,tgs || IDC || IDtgs || TS2 || Lifetime2] TicketV = EKV[KC,V || IDC || IDV || TS4 || Lifetime4] Authenticatorc = EKC,tgs[IDC || TS3]

Kerberos Version 4 Protocol (Cont’d) Client/Server Authentication Exchange: to obtain service CV: TicketV || Authenticatorc VC: EKC,V[TS5 + 1] TicketV = EKV[KC,V || IDC || ADC || IDV || TS4 || Lifetime4] Authenticatorc = EKC,V[IDC || ADC || TS5]

The Whole Picture Keberos Server Authentication Server (AS) 1. Request TGT 2. TGT + session key 3. Request SGT Ticket-Granting Server (TGS) 4. Ticket + session key 5. Request service 6. Server authenticator Server

Kerberos Deployment The Kerberos server must have the user ID and hashed password of all participating users in its database. The Kerberos server must share a secret key with each server. Kerberi are physically secured Kerberos libraries are distributed on all nodes with users, applications, and other Kerberos-controlled resources

Replicated Kerberos Multiple replica of Kerberos - availability and performance Keeping Kerberos databases consistent Single master Kerberos as the point of direct update to principals’ database entries Updated database is downloaded from the master to all replica Kerberos Periodic download or on-demand

Kerberos Realms and Multiple Kerberi A full-service Kerberos environment consisting of a Kerberos server, a number of clients, and a number of application servers Inter-realm authentication The Kerberos server in each interoperating realm shares a secret key with the server in the other realm. The two Kerberos servers are registered with each other.

Inter-realm Authentication AS TGS Kerberos 1. Request ticket for local TGS client 2. Ticket for local TGS 3. Request ticket for remote TGS 4. Ticket for remote TGS 7. Ticket for remote server 8. Remote server authenticator 5. Request ticket for remote server 6. Ticket for remote server AS TGS Kerberos server Realm B

Race Condition in Multiple Kerberi What happens if some key is updated? An existing ticket may become obsolete since it was encrypted with old keys! Alice’s TGT – TGS has updated its master key Ktgs ! Alice’s ticket to Bob – Bob has updated his DES key KBob ! TGS sends Alice her TGT – Alice has updated her password KAlice ! In Kerberos, TGS and all servers maintain several versions of keys What about Alice? Does she maintain several versions of her keys? Small time window that Alice could not login by using her recently updated password

Kerberos Slides Following Class Text Introduction to Computer Security November 1, 2004 Introduction to Computer Security ©2004 Matt Bishop

Kerberos Authentication system Ticket Authenticator 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 Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Idea User u authenticates to Kerberos server Obtains ticket Tu,TGS for ticket granting service (TGS) User u wants to use service s: User sends authenticator Au, ticket Tu,TGS to TGS asking for ticket for service TGS sends ticket Tu,s to user User sends Au, Tu,s to server as request to use s Details follow Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Tu,s = s || { u || u’s address || valid time || ku,s } ks Ticket Credential saying issuer has identified ticket requester Example ticket issued to user u for service s Tu,s = s || { u || u’s address || valid time || ku,s } ks where: ku,s is session key for user and service Valid time is interval for which ticket valid u’s address may be IP address or something else Note: more fields, but not relevant here Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Au,s = { u || generation time || kt } ku,s Authenticator Credential containing identity of sender of ticket Used to confirm sender is entity to which ticket was issued Example: authenticator user u generates for service s Au,s = { u || generation time || kt } ku,s where: kt is alternate session key Generation time is when authenticator generated Note: more fields, not relevant here Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Protocol user || TGS user Cathy { ku,TGS } ku || Tu,TGS Cathy user service || Au,TGS || Tu,TGS user TGS user || { ku,s } ku,TGS || Tu,s user TGS Au,s || Tu,s user service { t + 1 } ku,s user service Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Analysis First two steps get user ticket to use TGS User u can obtain session key only if u knows key shared with Cathy Next four steps show how u gets and uses ticket for service s Service s validates request by checking sender (using Au,s) is same as entity ticket issued to Step 6 optional; used when u requests confirmation Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Problems Relies on synchronized clocks Tickets have some fixed fields 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 Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Public Key Exchange Here interchange keys known Simple protocol eA, eB Alice and Bob’s public keys known to all dA, dB Alice and Bob’s private keys known only to owner Simple protocol ks is desired session key { ks } eB Alice Bob November 1, 2004 Introduction to Computer Security ©2004 Matt Bishop

Problem and Solution Vulnerable to forgery or replay Because eB known to anyone, Bob has no assurance that Alice sent message Simple fix uses Alice’s private key ks is desired session key { { ks } dA } eB Alice Bob November 1, 2004 Introduction to Computer Security ©2004 Matt Bishop

Notes Can include message enciphered with ks Assumes Bob has Alice’s public key, and vice versa If not, each must get it from public server If keys not bound to identity of 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) Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Man-in-the-Middle Attack send Bob’s public key Eve intercepts request Alice Cathy send Bob’s public key Eve Cathy eB Eve Cathy eE Alice Eve { ks } eE Eve intercepts message Alice Bob { ks } eB Eve Bob Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Cryptographic Key Infrastructure Goal: bind identity to key Classical: not possible as all keys are shared Use protocols to agree on a shared key (see earlier) Public key: bind identity to public key Crucial as people will use key to communicate with principal whose identity is bound to key Erroneous binding means no secrecy between principals Assume principal identified by an acceptable name Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Certificates Binds an identity to a cryptographic key Create token (message) containing Identity of principal (here, Alice) Corresponding public key Timestamp (when issued) Other information (perhaps identity of signer) signed by trusted authority (here, Cathy) Alice Certificate-- CA = { eA || Alice || T } dC Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Use Bob wants to communicate with Alice Bob gets Alice’s certificate If he knows Cathy’s public key, he can decipher the certificate When was certificate issued? Is the principal Alice? Now Bob has Alice’s public key Problem: Bob needs Cathy’s public key to validate certificate Problem pushed “up” a level Two approaches: Merkle’s tree, signature chains Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Certificate Signature Chains Create certificate Generate hash of certificate Encipher hash with issuer’s private key Validate Obtain issuer’s public key Decipher enciphered hash Recompute hash from certificate and compare Problem: getting issuer’s public key Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

X.509 Chains Some certificate components in X.509v3: Version Serial number Signature algorithm identifier: hash algorithm Issuer’s name; uniquely identifies issuer Interval of validity Subject’s name; uniquely identifies subject Subject’s public key Signature: enciphered hash Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

X.509 Certificate Validation Obtain issuer’s public key The one for the particular signature algorithm Decipher signature Gives hash of certificate Recompute hash from certificate and compare If they differ, there’s a problem Check interval of validity This confirms that certificate is current Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Issuers Certification Authority (CA): entity that issues certificates Multiple issuers pose validation problem Alice’s CA is Cathy; Bob’s CA is Don; how can Alice validate Bob’s certificate? Have Cathy and Don cross-certify Each issues certificate for the other Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Validation and Cross-Certifying X<<Y>> X is CA that issued certificate for subject Y Certificates: Cathy<<Alice>> Dan<<Bob> Cathy<<Dan>> Dan<<Cathy>> Alice validates Bob’s certificate Alice obtains Cathy<<Dan>> Alice uses (known) public key of Cathy to validate Cathy<<Dan>> Alice uses Cathy<<Dan>> to validate Dan<<Bob>> Long signatures are possible – each certificate must be validated by the one before it Cathy and Dan are cross certified Each has issued certificate for other Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

PGP Chains OpenPGP certificates structured into packets Packet is a record with a tag describing its purpose One public key packet Zero or more signature packets Public key packet: Version (3 or 4; 3 compatible with all versions of PGP, 4 not compatible with older versions of PGP) Creation time Validity period (not present in version 3) Public key algorithm, associated parameters Public key Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

OpenPGP Signature Packet Version 3 signature packet Version (3) Signature type (level of trust) Creation time (when next fields hashed) Signer’s key identifier (identifies key to encipher hash) Public key algorithm (used to encipher hash) Hash algorithm Part of signed hash (used for quick check) Signature (enciphered hash) Version 4 packet more complex Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Signing Single certificate may have multiple signatures Notion of “trust” embedded in each signature Range from “untrusted” to “ultimate trust” Signer defines meaning of trust level (no standards!) All version 4 keys signed by subject Called “self-signing” Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Validating Certificates Arrows show signatures Self signatures not shown Alice wants to communicate with Bob Alice needs to validate Bob’s OpenPGP cert Does not know Fred, Giselle, or Ellen Alice gets Giselle’s cert Knows Henry slightly, but his signature is at “casual” level of trust Alice gets Ellen’s cert Knows Jack, so uses his cert to validate Ellen’s, then hers to validate Bob’s Jack Henry Ellen Irene Giselle Fred Bob November 1, 2004 Introduction to Computer Security ©2004 Matt Bishop

Storing Keys Multi-user or networked systems: attackers may defeat access control mechanisms Encipher file containing key Attacker can monitor keystrokes to decipher files Key will be resident in memory that attacker may be able to read Use physical devices like “smart card” Key never enters system Card can be stolen, so have 2 devices combine bits to make single key Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Key Revocation Certificates invalidated before expiration Problems Usually due to compromised key May be due to change in circumstance (e.g., someone leaving company) Problems Entity revoking certificate authorized to do so Revocation information circulates to everyone fast enough Network delays, infrastructure problems may delay information Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

CRLs Certificate revocation list lists certificates that are revoked X.509: only certificate issuer can revoke certificate Added to CRL PGP: signers can revoke signatures; owners can revoke certificates, or allow others to do so Revocation message placed in PGP packet and signed Flag marks it as revocation message Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Digital Signature Construct that authenticated origin, contents of message in a manner provable to a disinterested third party (“judge”) Sender cannot deny having sent message (service is “nonrepudiation”) Limited to technical proofs Inability to deny one’s cryptographic key was used to sign One could claim the cryptographic key was stolen or compromised Legal proofs, etc., probably required; not dealt with here Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

This is not a digital signature Common Error Classical: Alice, Bob share key k Alice sends m || { m } k to Bob This is a digital signature WRONG This is not a digital signature Why? Third party cannot determine whether Alice or Bob generated message – Bob could have sent it to himself! Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Classical Digital Signatures Require trusted third party Alice, Bob each share keys with trusted party Cathy To resolve dispute, judge gets { m } kAlice, { m } kBob, and has Cathy decipher them; if messages matched, contract was signed { m }kAlice Alice Bob { m }kAlice Cathy Bob { m }kBob Cathy Bob November 1, 2004 Introduction to Computer Security ©2004 Matt Bishop

Public Key Digital Signatures Alice’s keys are dAlice, eAlice Alice sends Bob m || { m } dAlice In case of dispute, judge computes { { m } dAlice } eAlice and if it is m, Alice signed message She’s the only one who knows dAlice! Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

RSA Digital Signatures Use private key to encipher message Protocol for use is critical Key points: Never sign random documents, and when signing, always sign hash and never document Mathematical properties can be turned against signer Sign message first, then encipher Changing public keys causes forgery Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Attack #1 Example: Alice, Bob communicating nA = 95, eA = 59, dA = 11 nB = 77, eB = 53, dB = 17 26 contracts, numbered 00 to 25 Alice has Bob sign 05 and 17: c = mdB mod nB = 0517 mod 77 = 3 c = mdB mod nB = 1717 mod 77 = 19 Alice computes 0517 mod 77 = 08; corresponding signature is 0319 mod 77 = 57; claims Bob signed 08 Judge computes ceB mod nB = 5753 mod 77 = 08 Signature validated; Bob is toast Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Attack #2: Bob’s Revenge Bob, Alice agree to sign contract 06 Alice enciphers, then signs: (meB mod 77)dA mod nA = (0653 mod 77)11 mod 95 = 63 Bob now changes his public key Computes r such that 13r mod 77 = 6; say, r = 59 Computes reB mod (nB) = 5953 mod 60 = 7 Replace public key eB with 7, private key dB = 43 Bob claims contract was 13. Judge computes: (6359 mod 95)43 mod 77 = 13 Verified; now Alice is toast Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Key Points Key management critical to effective use of cryptosystems Different levels of keys (session vs. interchange) Keys need infrastructure to identify holders, allow revoking Key escrowing complicates infrastructure Digital signatures provide integrity of origin and content Much easier with public key cryptosystems than with classical cryptosystems Introduction to Computer Security ©2004 Matt Bishop November 1, 2004

Exercise 5: Needham and Schroeder suggest the following variant of their protocol: Alice → Bob : Alice Bob → Alice : { Alice, rand3 } kBob Alice → Cathy : { Alice, Bob, rand1, { Alice, rand3 } kBob } Cathy → Alice : { Alice, Bob, rand1, ksession, {Alice, rand3, ksession} kBob } kAlice Alice → Bob : { Alice, rand3, ksession } kBob Bob → Alice : { rand2 } ksession Alice → Bob : { rand2 – 1 }ksession Show that this protocol solves the problem of replay as a result of stolen session keys. ======= Approach: assume that attacker knows the session key ksession , and has intercepted the message at step 5 Two situations – Attacker does not send an initial message to Bob (steps 1 and 2) Attacker does. Introduction to Computer Security ©2004 Matt Bishop November 1, 2004