44
Network Security Network Security Essentials Essentials Chapter 4 Chapter 4 Fourth Edition Fourth Edition by William Stallings by William Stallings (Based on lecture slides (Based on lecture slides by Lawrie Brown by Lawrie Brown

Network Security Essentials Chapter 4

  • Upload
    misu

  • View
    125

  • Download
    5

Embed Size (px)

DESCRIPTION

Network Security Essentials Chapter 4. Fourth Edition by William Stallings (Based on lecture slides by Lawrie Brown. Chapter 4 – Key Management and Distribution. - PowerPoint PPT Presentation

Citation preview

Page 1: Network Security Essentials Chapter 4

Network Security EssentialsNetwork Security EssentialsChapter 4Chapter 4

Fourth EditionFourth Edition

by William Stallingsby William Stallings

(Based on lecture slides by Lawrie (Based on lecture slides by Lawrie BrownBrown

Page 2: Network Security Essentials Chapter 4

Chapter 4 – Key Management Chapter 4 – Key Management and Distributionand Distribution

No Singhalese, whether man or woman, No Singhalese, whether man or woman, would venture out of the house without a would venture out of the house without a bunch of keys in his hand, for without such bunch of keys in his hand, for without such a talisman he would fear that some devil a talisman he would fear that some devil might take advantage of his weak state to might take advantage of his weak state to slip into his body. slip into his body.

——The Golden Bough, Sir James George The Golden Bough, Sir James George FrazerFrazer

Page 3: Network Security Essentials Chapter 4

OutlineOutline

Key distribution (Ref. Chap.14)Key distribution (Ref. Chap.14) User authentication: Kerberos (Ref. User authentication: Kerberos (Ref.

Chap.15)Chap.15) Public-key certificate (Ref. Chap.14)Public-key certificate (Ref. Chap.14) Public-key infrastructure (Ref. Chap.14)Public-key infrastructure (Ref. Chap.14)

Page 4: Network Security Essentials Chapter 4

Key Management and Key Management and DistributionDistribution

Topics of cryptographic key management / Topics of cryptographic key management / key distribution are complex key distribution are complex Cryptographic, protocol, & management issuesCryptographic, protocol, & management issues

Symmetric schemes require both parties to Symmetric schemes require both parties to share a common secret keyshare a common secret key

Public key schemes require parties to Public key schemes require parties to acquire valid public keysacquire valid public keys

Have concerns with doing bothHave concerns with doing both

Page 5: Network Security Essentials Chapter 4

Key DistributionKey Distribution

Symmetric schemes require both parties Symmetric schemes require both parties to share a common secret keyto share a common secret key

Issue is how to securely distribute this key Issue is how to securely distribute this key whilst protecting it from otherswhilst protecting it from others

Frequent key changes can be desirableFrequent key changes can be desirable Often secure system failure due to a break Often secure system failure due to a break

in the key distribution scheme in the key distribution scheme

Page 6: Network Security Essentials Chapter 4

Key DistributionKey Distribution

Given parties A and B have various Given parties A and B have various key key distributiondistribution alternatives: alternatives:

1.1. A can select key and physically deliver to BA can select key and physically deliver to B

2.2. Third party can select & deliver key to A & BThird party can select & deliver key to A & B

3.3. Uf A & B have communicated previously can Uf A & B have communicated previously can use previous key to encrypt a new keyuse previous key to encrypt a new key

4.4. If A & B have secure communications with a If A & B have secure communications with a third party C, C can relay key between A & Bthird party C, C can relay key between A & B

Page 7: Network Security Essentials Chapter 4

Option 4Option 4

Elements in option 4Elements in option 4 Key distribution center (KDC)Key distribution center (KDC) Session key: valid for the duration of a logical Session key: valid for the duration of a logical

connectionconnection Permanent key: for distributing session keysPermanent key: for distributing session keys

StepsSteps Connection request: A -> KDCConnection request: A -> KDC Connection approval: KDC generates unique Connection approval: KDC generates unique

one-time session key, and send to A and Bone-time session key, and send to A and B Data exchange using session key: A <-> BData exchange using session key: A <-> B

Page 8: Network Security Essentials Chapter 4

KerberosKerberos

Trusted key server system from MIT Trusted key server system from MIT Provides centralised private-key third-party Provides centralised private-key third-party

authentication in a distributed networkauthentication in a distributed network Allows users access to services distributed Allows users access to services distributed

through networkthrough network Without needing to trust all workstationsWithout needing to trust all workstations Rather all trust a central authentication serverRather all trust a central authentication server

Two versions in use: 4 & 5 (RFC 4120)Two versions in use: 4 & 5 (RFC 4120)

Page 9: Network Security Essentials Chapter 4

Kerberos RequirementsKerberos Requirements

Its first report identified requirements as:Its first report identified requirements as: SecureSecure ReliableReliable TransparentTransparent ScalableScalable

Implemented using an authentication Implemented using an authentication protocol based on Needham-Schroederprotocol based on Needham-Schroeder

Page 10: Network Security Essentials Chapter 4

A Simple Authentication A Simple Authentication DialogueDialogue

To prevent impersonationTo prevent impersonation C C V: ID V: IDCC||P||PCC

Burden on each serverBurden on each server Authentication server (AS)Authentication server (AS)

1.1. CCAS: IDAS: IDCC||P||PCC||ID||IDVV

2.2. ASASC: TicketC: Ticket

3.3. CCV: IDV: IDCC||Ticket||Ticket

Ticket=E(Ticket=E(KKvv, [ID, [IDCC||AD||ADCC||ID||IDVV])])

Page 11: Network Security Essentials Chapter 4

A More Secure Authentication A More Secure Authentication DialogueDialogue

Problems with the previous scenarioProblems with the previous scenario A user has to enter a password many timesA user has to enter a password many times

• Once for every different serviceOnce for every different service Plaintext transmission of the passwordPlaintext transmission of the password

Page 12: Network Security Essentials Chapter 4

Ticket-granting server (TGS)Ticket-granting server (TGS) Once per user logon sessionOnce per user logon session

1.1. CCAS: IDAS: IDCC||ID||IDtgstgs

2.2. ASASC: E(C: E(KKCC, Ticket, Tickettgstgs)) Once per type of serviceOnce per type of service

3.3. C->TGS: IDC->TGS: IDCC||ID||IDVV||Ticket||Tickettgstgs

4.4. TGSTGSC: TicketC: Ticketvv

Once per server sessionOnce per server session5.5. CCV: IDV: IDCC||Ticket||Ticketvv

TicketTickettgstgs=E(=E(KKtgstgs, [ID, [IDCC||AD||ADCC||ID||IDtgstgs||||TSTS11||Lifetime||Lifetime11])]) TicketTicketvv=E(=E(KKvv, [ID, [IDCC||AD||ADCC||ID||IDVV||||TSTS22||Lifetime||Lifetime22])])

Page 13: Network Security Essentials Chapter 4

ProblemsProblems Lifetime of the ticketsLifetime of the tickets

• A network service must be able to prove that the A network service must be able to prove that the person using the ticket is the same person to person using the ticket is the same person to whom the ticket was issuedwhom the ticket was issued

• Session keySession key in Kerberos in Kerberos Servers need to authenticate themselves to Servers need to authenticate themselves to

usersusers• Mutual authenticationMutual authentication

Page 14: Network Security Essentials Chapter 4

Kerberos v4 OverviewKerberos v4 Overview

A basic third-party authentication schemeA basic third-party authentication scheme Have an Authentication Server (AS) Have an Authentication Server (AS)

Users initially negotiate with AS to identify self Users initially negotiate with AS to identify self AS provides a non-corruptible authentication AS provides a non-corruptible authentication

credential (credential (ticket granting ticket TGTticket granting ticket TGT) ) Have a Ticket Granting server (TGS)Have a Ticket Granting server (TGS)

Users subsequently request access to other Users subsequently request access to other services from TGS on basis of users TGTservices from TGS on basis of users TGT

Using a complex protocol using DESUsing a complex protocol using DES

Page 15: Network Security Essentials Chapter 4

Kerberos v4 DialogueKerberos v4 Dialogue

Page 16: Network Security Essentials Chapter 4

Authentication service exchange to obtain Authentication service exchange to obtain ticket-granting ticketticket-granting ticket

1.1. CCAS: IDAS: IDCC||ID||IDtgstgs||TS||TS11

2.2. ASASC: E(C: E(KKCC, [, [KKC,tgsC,tgs||ID||IDtgstgs||TS||TS22||Lifetime||Lifetime22||||

TicketTickettgstgs])])

TicketTickettgstgs=E(=E(KKtgstgs, [, [KKC,tgsC,tgs|| ID|| IDCC||AD||ADCC||ID||IDtgstgs||TS||TS22||||

LifetimeLifetime22])])

[Session key: [Session key: KKC,tgsC,tgs]]

Page 17: Network Security Essentials Chapter 4

Ticket-granting service exchange to obtain Ticket-granting service exchange to obtain ticket-granting ticketticket-granting ticket

3.3. C->TGS: IDC->TGS: IDVV||Ticket||Tickettgstgs||||AuthenticatorAuthenticatorCC

4.4. TGSTGSC: E(C: E(KKC,tgsC,tgs , , [[KKc,vc,v||ID||IDvv||TS||TS44||Ticket||Ticketvv])])

TicketTickettgstgs=E(=E(KKtgstgs, [, [KKC,tgsC,tgs|| ID|| IDCC||AD||ADCC||ID||IDtgstgs||TS||TS22||||

LifetimeLifetime22])])

TicketTicketvv=E(=E(KKvv, [, [KKc,vc,v|| ID|| IDCC||AD||ADCC||ID||IDVV||TS||TS44||Lifetime||Lifetime44])])

AuthenticatorAuthenticatorCC = E( = E(KKC,tgsC,tgs,, [ID[IDCC||AD||ADCC||TS||TS33])])

[Session key: [Session key: KKC,vC,v]]

Page 18: Network Security Essentials Chapter 4

Client/Server Authentication Exchange to Client/Server Authentication Exchange to obtain serviceobtain service

5.5. CCV: TicketV: Ticketvv||||AuthenticatorAuthenticatorCC

6.6. VVC: E(C: E(KKc,vc,v, [TS, [TS55+1]) (for mutual +1]) (for mutual

authentication)authentication) TicketTicketvv=E(=E(KKvv, [, [KKc,vc,v || ID || IDCC||AD||ADCC||ID||IDVV||TS||TS44||||

LifetimeLifetime44])])

AuthenticatorAuthenticatorCC = E( = E(KKC,vC,v,, [ID[IDCC||AD||ADCC||TS||TS55])])

Page 19: Network Security Essentials Chapter 4

Kerberos 4 OverviewKerberos 4 Overview

Page 20: Network Security Essentials Chapter 4

Kerberos RealmsKerberos Realms

A Kerberos environment consists of:A Kerberos environment consists of: A Kerberos serverA Kerberos server A number of clients, all registered with serverA number of clients, all registered with server Application servers, sharing keys with serverApplication servers, sharing keys with server

This is termed a realmThis is termed a realm Typically a single administrative domainTypically a single administrative domain

In multiple realms, their Kerberos servers In multiple realms, their Kerberos servers must share keys and trust must share keys and trust

Page 21: Network Security Essentials Chapter 4

Kerberos RealmsKerberos Realms

Page 22: Network Security Essentials Chapter 4

CCAS: IDAS: IDCC||ID||IDtgstgs||TS||TS11

ASASC: E(KC: E(KCC, [K, [KC,tgsC,tgs||ID||IDtgstgs||TS||TS22||Lifetime||Lifetime22||Ticket||Tickettgstgs])])

C->TGS: IDC->TGS: IDtgsremtgsrem||Ticket||Tickettgstgs||Authenticator||AuthenticatorCC

TGSTGSC: E(KC: E(KC,tgsC,tgs , , [[KKc,tgsremc,tgsrem||ID||IDtgsremtgsrem||TS||TS44||||TicketTickettgsremtgsrem])])

C->TGSC->TGSremrem: ID: IDVremVrem||||TicketTickettgsremtgsrem||Authenticator||AuthenticatorCC

TGSTGSremremC: E(C: E(KKC,tgsremC,tgsrem, , [K[Kc,vremc,vrem||ID||IDvremvrem||TS||TS66||Ticket||Ticketvremvrem])])

CCVVremrem: Ticket: Ticketvremvrem||Authenticator||AuthenticatorCC

Page 23: Network Security Essentials Chapter 4

Kerberos Version 5Kerberos Version 5

Developed in mid 1990’s (RFC1510)Developed in mid 1990’s (RFC1510) Specified as Internet standard (RFC 4120)Specified as Internet standard (RFC 4120) Provides improvements over v4Provides improvements over v4

Addresses environmental shortcomingsAddresses environmental shortcomings• Encryption alg, network protocol, byte order, ticket Encryption alg, network protocol, byte order, ticket

lifetime, authentication forwarding, interrealm authlifetime, authentication forwarding, interrealm auth And technical deficienciesAnd technical deficiencies

• Double encryption, non-std mode of use, session Double encryption, non-std mode of use, session keys, password attackskeys, password attacks

Page 24: Network Security Essentials Chapter 4

Kerberos v5 DialogueKerberos v5 Dialogue

Page 25: Network Security Essentials Chapter 4

Key distribution using Key distribution using asymmetric encryptionasymmetric encryption

Distribution of public keysDistribution of public keys Use of public-key encryption to distribute Use of public-key encryption to distribute

secret keyssecret keys

Page 26: Network Security Essentials Chapter 4

Public-Key CertificatesPublic-Key Certificates

To send or broadcast public keys to the To send or broadcast public keys to the community is convenient, butcommunity is convenient, but Anyone can forge such announcementAnyone can forge such announcement

Public-key certificatePublic-key certificate CA: certificate authorityCA: certificate authority Certificate: (public key + user ID) signed by Certificate: (public key + user ID) signed by

CACA

Page 27: Network Security Essentials Chapter 4

X.509 X.509 Certificate Certificate

UseUse

Page 28: Network Security Essentials Chapter 4

Public-key distribution of Public-key distribution of secret keyssecret keys

How to distribute the secret key between How to distribute the secret key between Alice and Bob?Alice and Bob? Diffie-Hellman key exchangeDiffie-Hellman key exchange

• No authentication of the two communicating No authentication of the two communicating partnerspartners

Public-key certificatePublic-key certificate• Encrypt the message with one-time session keyEncrypt the message with one-time session key• Encrypt the session key using public-key Encrypt the session key using public-key

encryption with Alice’s public keyencryption with Alice’s public key• Attach the encrypted session key to the messageAttach the encrypted session key to the message

Page 29: Network Security Essentials Chapter 4

X.509 CertificatesX.509 Certificates

ITU-T X.509ITU-T X.509 A part of X.500 directory serviceA part of X.500 directory service

• Database of information about usersDatabase of information about users A framework for providing authentication services A framework for providing authentication services

by X.500 directory to its usersby X.500 directory to its users A repository of public-key certificatesA repository of public-key certificates Used in S/MIME (Chap.7), IP security (Chap.8), Used in S/MIME (Chap.7), IP security (Chap.8),

SSL/TLS (Chap.5)SSL/TLS (Chap.5) First issued in 1988, revised recommendation in First issued in 1988, revised recommendation in

1993, third version in 1995 and revised in 20001993, third version in 1995 and revised in 2000 Does not dictate the use of a specific alg but Does not dictate the use of a specific alg but

recommends RSArecommends RSA

Page 30: Network Security Essentials Chapter 4

X.509 CertificatesX.509 Certificates

Issued by a Certification Authority (CA), containing: Issued by a Certification Authority (CA), containing: version V (1, 2, or 3) version V (1, 2, or 3) serial number SN (unique within CA) identifying certificate serial number SN (unique within CA) identifying certificate signature algorithm identifier AIsignature algorithm identifier AI issuer X.500 name CAissuer X.500 name CA period of validity TA (from - to dates) period of validity TA (from - to dates) subject X.500 name A (name of owner) subject X.500 name A (name of owner) subject public-key info Ap (algorithm, parameters, key) subject public-key info Ap (algorithm, parameters, key) issuer unique identifier (v2+) issuer unique identifier (v2+) subject unique identifier (v2+) subject unique identifier (v2+) extension fields (v3) extension fields (v3) signature (of hash of all fields in certificate) signature (of hash of all fields in certificate)

Notation Notation CA<<A>>CA<<A>> denotes certificate for A signed by CA denotes certificate for A signed by CA

Page 31: Network Security Essentials Chapter 4

X.509 CertificatesX.509 Certificates

Page 32: Network Security Essentials Chapter 4

Obtaining a Obtaining a Certificate Certificate

Any user with access to CA can get any Any user with access to CA can get any certificate from it certificate from it

Only the CA can modify a certificate Only the CA can modify a certificate Because cannot be forged, certificates can Because cannot be forged, certificates can

be placed in a public directory be placed in a public directory

Page 33: Network Security Essentials Chapter 4

CA Hierarchy CA Hierarchy

If both users share a common CA then they are If both users share a common CA then they are assumed to know its public key assumed to know its public key

Otherwise CA's must form a hierarchy Otherwise CA's must form a hierarchy Use certificates linking members of hierarchy to Use certificates linking members of hierarchy to

validate other CA's validate other CA's Each CA has certificates for clients (forward) and Each CA has certificates for clients (forward) and

parent (backward) parent (backward) Each client trusts parents certificates Each client trusts parents certificates Enable verification of any certificate from one CA Enable verification of any certificate from one CA

by users of all other CAs in hierarchy by users of all other CAs in hierarchy

Page 34: Network Security Essentials Chapter 4

CA Hierarchy UseCA Hierarchy Use

Page 35: Network Security Essentials Chapter 4

Certificate RevocationCertificate Revocation

Certificates have a period of validityCertificates have a period of validity May need to revoke before expiry, eg:May need to revoke before expiry, eg:

1.1. User's private key is compromisedUser's private key is compromised

2.2. User is no longer certified by this CAUser is no longer certified by this CA

3.3. CA's certificate is compromisedCA's certificate is compromised

CA’s maintain list of revoked certificatesCA’s maintain list of revoked certificates The Certificate Revocation List (CRL)The Certificate Revocation List (CRL)

Users should check certificates with CA’s CRLUsers should check certificates with CA’s CRL

Page 36: Network Security Essentials Chapter 4

X.509 Version 3X.509 Version 3

Has been recognised that additional Has been recognised that additional information is needed in a certificate information is needed in a certificate Email/URL, policy details, usage constraintsEmail/URL, policy details, usage constraints

Rather than explicitly naming new fields Rather than explicitly naming new fields defined a general extension methoddefined a general extension method

Extensions consist of:Extensions consist of: Extension identifierExtension identifier Criticality indicatorCriticality indicator Extension valueExtension value

Page 37: Network Security Essentials Chapter 4

Certificate ExtensionsCertificate Extensions

Key and policy informationKey and policy information Convey info about subject & issuer keys, plus Convey info about subject & issuer keys, plus

indicators of certificate policyindicators of certificate policy Certificate subject and issuer attributesCertificate subject and issuer attributes

Support alternative names, in alternative Support alternative names, in alternative formats for certificate subject and/or issuerformats for certificate subject and/or issuer

Certificate path constraintsCertificate path constraints Allow constraints on use of certificates by Allow constraints on use of certificates by

other CA’sother CA’s

Page 38: Network Security Essentials Chapter 4

Public Key InfrastructurePublic Key Infrastructure

Page 39: Network Security Essentials Chapter 4

PKIX ManagementPKIX Management

Functions:Functions: RegistrationRegistration InitializationInitialization CertificationCertification Key pair recoveryKey pair recovery Key pair updateKey pair update Revocation requestRevocation request Cross certificationCross certification

Protocols: CMP (RFC 2510), CMC (RFC Protocols: CMP (RFC 2510), CMC (RFC 2797)2797)

Page 40: Network Security Essentials Chapter 4

Federated Identity Federated Identity ManagementManagement

Use of common identity management schemeUse of common identity management scheme Across multiple enterprises & numerous applications Across multiple enterprises & numerous applications Supporting many thousands, even millions of users Supporting many thousands, even millions of users

Principal elements are:Principal elements are: Authentication, authorization, accounting, Authentication, authorization, accounting,

provisioning, workflow automation, delegated provisioning, workflow automation, delegated administration, password synchronization, self-service administration, password synchronization, self-service password reset, federationpassword reset, federation

Kerberos contains many of these elementsKerberos contains many of these elements

Page 41: Network Security Essentials Chapter 4

Identity ManagementIdentity Management

Page 42: Network Security Essentials Chapter 4

Identity Identity FederationFederation

Page 43: Network Security Essentials Chapter 4

Standards UsedStandards Used

Security Assertion Markup Language (SAML)Security Assertion Markup Language (SAML) XML-based language for exchange of security XML-based language for exchange of security

information between online business partnersinformation between online business partners Part of OASIS (Organization for the Part of OASIS (Organization for the

Advancement of Structured Information Advancement of Structured Information Standards) standards for federated identity Standards) standards for federated identity managementmanagement e.g. e.g. WS-Federation for browser-based federationWS-Federation for browser-based federation

Need a few mature industry standardsNeed a few mature industry standards

Page 44: Network Security Essentials Chapter 4

Federated Identity ExamplesFederated Identity Examples