lecture 10 overview. key management public-key encryption helps address key distribution problems...

59
Lecture 10 Overview

Upload: ethan-barrett

Post on 27-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Lecture 10 Overview

Page 2: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Key Management

• public-key encryption helps address key distribution problems

• have two aspects of this:– distribution of public keys– use of public-key encryption to distribute secret

keys

CS 450/650 Lecture 10: Key Exchange 2

Page 3: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Distribution of Public Keys

• can be considered as using one of:– public announcement– publicly available directory– public-key authority– public-key certificates

CS 450/650 Lecture 10: Key Exchange 3

Page 4: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Public Announcement

• users distribute public keys to recipients or broadcast to community at large– eg. append PGP keys to email messages or post to

news groups or email list

• major weakness is forgery– anyone can create a key claiming to be someone

else and broadcast it– until forgery is discovered attacker can

masquerade as claimed user

CS 450/650 Lecture 10: Key Exchange 4

Page 5: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Publicly Available Directory

• can obtain greater security by registering keys with a public directory

• directory must be trusted with properties:– contains {name, public-key} entries– participants register securely with directory– participants can replace key at any time– directory is periodically published– directory can be accessed electronically

• still vulnerable to tampering or forgeryCS 450/650 Lecture 10: Key Exchange 5

Page 6: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Public-Key Authority

• improve security by tightening control over distribution of keys from directory

• has properties of directory• requires users to know public key for the

directory• users interact with directory to obtain any

desired public key securely• requires real-time access to directory when

keys are neededCS 450/650 Lecture 10: Key Exchange 6

Page 7: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Public-Key Authority

CS 450/650 Lecture 10: Key Exchange 7

Page 8: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Public-Key Certificates

• certificates allow key exchange without real-time access to public-key authority

• a certificate binds identity to public key – usually with other info such as period of validity,

rights of use

• all contents signed by a trusted Public-Key or Certificate Authority (CA)

• can be verified by anyone who knows the public-key authority’s public-key

CS 450/650 Lecture 10: Key Exchange 8

Page 9: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Public-Key Certificates

CS 450/650 Lecture 10: Key Exchange 9

Page 10: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Distribution of Secret Keys

• use previous methods to obtain public-key• can use for secrecy or authentication• public-key algorithms are slow• usually prefer to use private-key encryption to

protect message contents• hence need a session key• have several alternatives for negotiating a

suitable session

CS 450/650 Lecture 10: Key Exchange 10

Page 11: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Simple Secret Key Distribution

• proposed by Merkle in 1979– A generates a new temporary public key pair– A sends B the public key and the identity– B generates a session key K sends it to A encrypted

using the supplied public key– A decrypts the session key and both use

• Man in the middle attack:– an opponent can intercept and impersonate both

halves of protocol

CS 450/650 Lecture 10: Key Exchange 11

Page 12: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Public-Key Distribution of Secret Keys

• if have securely exchanged public-keys:

CS 450/650 Lecture 10: Key Exchange 12

Page 13: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Diffie-Hellman Key Exchange

• public-key type scheme– proposed in 1976– note: now know that Williamson (UK CESG)

secretly proposed the concept in 1970

• A practical method for public exchange of a secret key

• Used in a number of commercial products

CS 450/650 Lecture 10: Diffie-Hellman Key Exchange 13

Page 14: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Diffie-Hellman Key Exchange

• public-key distribution scheme – cannot be used to exchange an arbitrary message – rather it can establish a common key – known only to the two participants

• based on exponentiation in a finite field– modulo a prime or a polynomial

• security relies on the difficulty of computing discrete logarithms

CS 450/650 Lecture 10: Diffie-Hellman Key Exchange 14

Page 15: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Diffie-Hellman Setup

• all users agree on global parameters:– large prime integer or polynomial p– g = primitive root mod p

• for every integer a that has gcd(a, p) = 1, there is an integer k such that gk ≡ a (mod p)

• each user generates their key– chooses a secret key (number): a < p – compute their public key: A = ga mod p

CS 450/650 Lecture 10: Diffie-Hellman Key Exchange 15

Page 16: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Diffie-Hellman Key Exchange

• shared session key for users is KAB: – KAB = gab mod p

= Ab mod p (which B can compute) = Ba mod p (which A can compute)

• g can be small– 2 or 5 is common

• a, b, p should be large• attacker needs a or b to obtain the session key

– must solve discrete logCS 450/650 Lecture 10: Diffie-Hellman Key Exchange 16

Page 17: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Key Exchange Protocols

• users could create random Diffie-Hellman keys each time they communicate

• users could create a known Diffie-Hellman key and publish in a directory, then consulted and used to securely communicate with them

• both of these are vulnerable to a man-in-the-middle attack– authentication of the keys is needed

CS 450/650 Lecture 10: Diffie-Hellman Key Exchange 17

Page 18: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Lecture 11

Digital Certificates

CS 450/650

Fundamentals of Integrated Computer Security

Slides are modified from Robin Burke

Page 19: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Trusting a Public Key

• We can't trust – the public key associated with a message

• We might trust– an authoritative source to vouch for Alice

Page 20: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Digital Certificates

• A digital certificate is a digital file that certifies the identity of – an individual,– an institution, – a server,– a router seeking access to computer- based

information.

• It is issued by a Certification Authority (CA).

Page 21: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Digital certificates

•amazon.com

name public

keyX.509

certificate

Page 22: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Trusted third party• Certification authority (CA)

• They issue digital certificates and validate holders’ identity and authority.

• CA can– meet with Alice– look at her driver's license / birth certificate / etc– take her fingerprints

• CA will then– sign her public key

Page 23: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Man-in-the-middle?

• When Trudy tries to substitute her public key for Alice's

– Bob will either notice that the key isn't certified, or

– Notice that it is certified but not for Alice, for someone else

Page 24: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Masquerading as CA?

• Trudy could falsely issue a certificate– sign the certificate pretending to be the CA

• But– strong interest in making CA’s correct public

key well known

• Multiple sources to access the CA's public key– Some public keys are actually bundled with

IE

Page 25: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Public key certificate

• A public key• An identifier

• Certificate by the CA– Embed public key along with other identifying

information – cryptographically sign it as a tamper-proof seal

• verifying the integrity of the data within the certificate• validating its use

Page 26: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Benefits of certification

• Alice and Bob can exchange certificates directly– no need for a separate way to communicate public

keys– certificate is self-protecting

• Many users can participate– only need to know CA's public key

Page 27: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Uses of Digital CertificatesIn a number of Internet applications that include:1. Secure Socket Layer (SSL) developed by Netscape

Communications Corporation2. Secure Multipurpose Internet Mail Extensions

(S/MIME) Standard for securing email and electronic data interchange (EDI).

3. Secure Electronic Transactions (SET) protocol for securing electronic payments

4. Internet Protocol Secure Standard (IPSec) for authenticating networking devices

Page 28: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Issues

• Trust in the CA– issuance policies

• Security of the CA's private key– very important!!!

Page 29: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Multiple CAs

• If there is only one CA– all is simple

• Multiple CAs– Alice's public key is signed by C1– Bob's public key is signed by C2

• How can Bob be confident?– maybe C1 is really Trudy in disguise

Page 30: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Solutions• Full distribution

– every user has the public key for every CA– Impractical

• Cross certification– Suppose Alice presents Bob with C1's public key– Signed by C2– Bob can verify the certificate C2– C1's public key can be trusted– Therefore Alice's public key can be trusted

Page 31: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Hierarchical trust model• Root CA

– a generally-trusted CA• e.g. Federal Reserve Bank

– all parties trust root• Non-root CAs

– have certificates signed by root CA, or– signed by another non-root CA

• closer to the root CA

• Certification path– the chain of certifications from the root to a

particular public key certificate

Page 32: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

CA relationships• Intra-organization communication

– Bank ATM network– Organization can be its own CA

• The third party CA– CA is an independent entity– is like a notary public– is evaluating the truth of a person's representation– may be liable if due diligence is not performed

Page 33: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Validity

• Public key is not valid forever– limits risk associated with key compromise– 1 year is typical

• Certificates have a valid period– expired certificate may still be useful

• non-repudiation

– new certificate issued when old one expires• Possibly the same key re-certified

Page 34: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Certificate assumptions

• During the valid period– public key is valid for use– association with identity assumed correct– revocation notifications will be published

Page 35: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Revocation

• What if Trudy hacks into Bob's computer and steals his private key?– Alice will still be sending encrypted messages, but

now Trudy can read

• Certificate must be revoked– can no longer be trusted– new certificate issued– how does Alice find this out?

Page 36: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Revoking a certificate

• Reasons for revocation– Detected or suspected compromise– Change of data

• e.g. subject name

– Change of relationship between subject and CA• e.g. employee quitting a job from an organization which

uses the current CA

Page 37: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Who can revoke?

• who revokes?– the subject– the CA– an authorized third party

• e.g. the organization with an employee quitting

• Authentication of the source of revocation request is needed.

Page 38: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Certificate Revocation List• CRL is a time-stamped list of revoked

certificates, – digitally signed by the CA– available to all users

• Each revoked cert is identified by a certificate serial number

• CRL contains digital signatures, thus can be sent via unprotected channels

• Users of public key certificates should check a suitably-recent CRL

Page 39: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Certificate Revocation List

• The user of a public key– must check the CRL – every time the key is used– not enough to check when the certificate is

originally accepted

• CA– must keep a revoked certificate in the CRL until it

expires– list could get large

Page 40: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Example• Trudy steals Bob's private key• Bob discovers break-in

– requests certificate revocation• Trudy sends a forged message to Alice• Alice verifies message

– checks CRL– no problems with Bob's public key

• CA publishes CRL with Bob's revocation– too late

Page 41: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

CRL Distribution

• Pull method– CA periodically updates CRL depository– users check when using a public key

• Push method– broadcast new CRL when it changes

• Both subject to denial of service attacks

Page 42: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Online Certificate Status Protocol

• Request / response protocol– Verifier receives up-to-the-minute status info

• Alice checks Bob's public key directly with CA– most effective– most costly

• Costs– handling traffic for every public key use– handling cryptographic operations at high spped– maintaining high security in Internet environment

• Also subject to denial of service attack

Page 43: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Short-Lived Certificates

• Certificate valid for 1 day at a time– re-requested each day– possibly the same public key

• Revocation not necessary– client stops asking for a new certificate

• Suitable for limited resource systems– e.g. mobile wireless systems

• Assumes efficient certificate generation

Page 44: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Bob’s public

key

Bob’s identifying informatio

n

CA private

key

K B+

certificate for Bob’s public

key, signed by CA

Digital signature (encrypt)K B

+

K CA-

Bob’s public

key

Bob’s identifying informatio

n

CA private

key

K B+

certificate for Bob’s public

key, signed by CA

K B+

K CA

Obtaining a certificate

Page 45: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

CA's key management • CA keys have many uses

– signing (real-time validation)– historical validation

• Short-use private keys– better security

• But– a signed certificate can't have a valid period

beyond the signer's certificate• CA will need multiple keys for different

purposes

Page 46: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Certificate distribution

• Alice sends Bob a two line signed email– signature ≈ message size– certificate > message size

• Alice's public key + CA's signature

– certificate for each CA in certification path

• Certification info could easily be 10x the message size

• What if Bob already has Alice's public key?

Page 47: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Certificate + Signature

• Inefficient

• Not practical in network environment

• Different users might need different certification paths– can't predict which certificates to include

Page 48: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Directory services

• General case for public key discovery

• Online access to a directory– request a public key certificate for a given user

• In this case– Alice sends only the signed message– Bob is responsible for getting Alice's certificate

Page 49: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Obtaining an Individual’s Public Key

– When Alice wants Bob’s public key:• Alice gets Bob’s certificate (from Bob or elsewhere).• apply CA’s public key to Bob’s certificate, get Bob’s

public key

K B+

digital

signature

(decrypt) K B+

CA public

key

K CA

Bob’s public

key

Page 50: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

X.500 Directory services• Developed by the international standards

bodies

• Extremely general– look up by name– browse available entities– representing people, devices, applications, etc.

• Extension for public key certificates– X.509

Page 51: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

LDAP Directory services

• Useful subset of X.500

• Easier to implement than X.500

• Widely available– Uses X.509 certificates

Page 52: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

X.509 Certificate format

Page 53: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

• Serial number (unique to issuer)• info about certificate owner, including algorithm and

key value itself (not shown)

Example of a Certificate

• info about certificate issuer

• valid dates• digital signature

by issuer

Page 54: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

IDs• Many things need to be identified

– what algorithm?– who is the CA?– whose key are we signing?

• X.500 Names– every unique individual

• must have a unique name– hierarchical naming scheme

• X.500 Object Identifiers– for things like algorithms– also hierarchical– but with integer components

Page 55: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Directory Information Tree

• Country– C=US, Canada, Mexico, etc.

• Organization– O=DePaul University, UIC, Northwestern

University, etc.

• Organizational unit– OU=CTI, LA&S, Commerce, Theater, etc.

• Common Name– CN=Robin Burke, Yonghe Yan, etc.

Page 56: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Distinguished name

• A collection of choices at each level of the DIT– leading to an individual

• Not necessarily a person– printer, router, application, web server

• DN– {C=US, O=DePaul University, OU=CTI, CN=Robin

Burke}

Page 57: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Name collision

• Typically we augment the common name with some other identifier– employee / student id– email address

Page 58: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Object identifiers• Problem

– different organization may want their own "objects"

– impossible to create a list of legal values in advance

• Like DIT tree– but with integers

• Used to label– algorithms– certificate types

Page 59: Lecture 10 Overview. Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys

Example• 1.2.840.113549.1.1.5

– this is a digital signature algorithm SHA-1 from RSA Labs

• How do we know this?– 1 = ISO– 2 = Indicates a member of the

organization– 840 = the USA– 113549 = RSA's organizational id– RSA chooses the rest of the identifiers

OID: 1.2.840.113549.1.1.5

0 (itu-t) 1 (iso) 2 (joint-iso-itu-t)

2 (member-body)

840 (us)

113549 (rsadsi)

1 (pkcs)

1 (pkcs-1)

5 (sha-1WithRASEncryption)

16 (country)

840 (us)

1 (organization)

15678 (sharons)