• No results found

CS 392/681 - Computer Security

N/A
N/A
Protected

Academic year: 2021

Share "CS 392/681 - Computer Security"

Copied!
26
0
0

Loading.... (view fulltext now)

Full text

(1)

CS 392/681 - Computer Security

Module 3 – Key Exchange Algorithms

(2)

Course Issues

„

HW 3 assigned.

„

Any lab or course issues?

(3)

Key Exchange

„

Cryptographic primitives seen so far assume

„ Alice and Bob share a secret key which is

unknown to Oscar.

„ Alice has a “trusted” copy of Bob’s public key.

„

But how does this happen in the first place?!!

„

Alice and Bob meet and exchange key.

„

Not always practical or possible.

„

We need key exchange protocols!

„

There are

key distribution protocols

and

key

(4)

Session Key Exchange With KDC.

„

Protocol assumes that Alice and Bob share a

session key K

A

and K

B

with a Key Distribution

Center (KDC).

„ Alice calls Trent (Trusted KDC) and requests a

session key to communicate with Bob.

„ Trent generates random session key K and sends

E KA(K) to Alice and E KB(K) to Bob.

„ Alice and Bob decrypt with KA and KB respectively

to get K.

„

This is a key distribution protocol.

(5)

Session Key Exchange With KDC.

„ A -> KDC IDA || IDB || N1

(Hello, I am Alice, I want to talk to Bob, I need a session Key and here is a random nonce identifying this request)

„ KDC -> A E KA( K || IDB || N1 || E KB(K || IDA))

Encrypted(Here is a key, for you to talk to Bob as per your request N1 and also an envelope to Bob containing the same key)

„ A -> B E KB(K || IDA)

(I would like to talk using key in envelope sent by KDC)

„ B -> A E K(N2)

(OK Alice, But can you prove to me that you are indeed Alice and know the key?)

„ A -> A E K(f(N2)) (Sure I can!)

(6)

Session Key Exchange With Public Keys

„

Alice gets Bob’s public key from KDC.

„

Alice generates a random session key,

encrypts with Bob’s public key and sends to

Bob.

„

Bob decrypts using his private key to get

session key.

„

Alice and Bob exchange a

challenge-response.

Above is still susceptible to

man-in-the-middle

(7)

Man-in-the-middle Attack

„ Alice send request to KDC. Mallory intercepts and

sends his own public key.

„ Alice generates random session key and encrypts

using Mallory’s (she thinks Bob’s) public key and send to Bob.

„ Mallory intercepts session key, decrypts, then

encrypts with Bob’s public key and send to Bob.

„ Bob decrypts session key.

„ Alice and Bob use a session key to communicate that

(8)

Diffie-Hellman Key Exchange

„ Protocol for exchanging secret key over public channel.

„ Select global parameters n and g. n is prime and g is a

primitive root in Zn. These parameters are public and known to all.

„ Alice privately selects random a and sends to Bob ga mod n. „ Bob privately selects random b and sends to Alice gb mod n. „ Alice and Bob privately compute gab which is their shared

secret.

„ An observer Oscar can only compute ga mod n * gb mod n= ga+b

mod n. To compute gab he needs to know either a or b or solve

the discrete log problem.

(9)

The Discrete Log Problem

„ Given y and a in Zp where p is prime, find the unique

x in Zp , such that y = ax mod p.

„ For example given 2 and 5 in Z7, find the unique x

such that 5x = 2 mod 7.

„ 51 = 5, 52 = 4, 53 = 6, 54 = 2, 55 = 3, 56 = 1

„ Now, given 949 and 2 in Z2579, find the unique x such

that 2x = 949 mod 2579!!

„ 2765 = 949 mod 2579. Check with bc.

„ No efficient algorithm known – NP-Hard. „ Note, a has to be a

primitive root

.

(10)

Public Key Management

„

Diffie-Hellman is susceptible to

man-in-the-middle attack.

„ Mallory captures a and b in transmission and

replaces with own a’ and b’.

„ Essentially runs two Diffie-Hellman’s. One with Alice

and one with Bob.

„

How do you trust a public key?

1. Public announcement of keys. 2. Publicly available directory. 3. Public Key Authority.

(11)

Public Key Management

5. Public Key Certificates.

„ Certificate consisting of user’s ID and public key.

„ Signed by a trusted third party – A Certificate Authority

(CA).

„ There could be many CA’s.

„ There could be a hierarchy of CA’s.

„

Which approach is best?

„ 1 and 2 are really no solution. „ 3 does not scale well.

„ 4 is interesting but has not succeeded in practice as expected. „ 5 is the solution embraced by industry. This is what we study in

(12)

Public Directory or Authority Solutions.

„

If Alice and Bob want to talk they both get

each others public key from central directory

or authority.

„

Disadvantages

„ Does not scale well.

„ KDC has to store every user’s public key. „ KDC provides single point of failure.

„ Performance bottleneck.

„

Multiple directories or authorities do not solve

(13)

Public Key Certificate

„

Public Key Certificate

– Signed messages specifying a

name (identity) and the corresponding public key.

„ Signed by whom –

Certification Authority

(CA), an

organization that issues public key certificates.

„ We assume that everyone is in possession of a

trusted copy of the CA’s public key.

„ CA could be

„ Internal CA.

„ Outsourced CA.

(14)

Public Key Certificate

Note: Mechanism of certification and content of certificate, will vary but at the minimum we have email verification and contains ID and Public Key. Unsigned certificate: contains user ID, user's public key

Signed certificate: Recipient can verify

Generate hash code of unsigned certificate

Encrypt hash code with CA's private key to form signature

H

(15)

Certificate Revocation

„ CA also needs some mechanism to

revoke

certificates

„ Private key compromised.

„ CA mistake in issuing certificate.

„ Particular service the certificate grants access to may no

longer exist.

„ CA compromised.

„ Expiration time solves the problems only partially. „ Certification Revocation Lists (CRL) – a list of every

certificate that has been revoked but not expired

.

„ CRL’s quickly grow large!

„ CRL’s distributed periodically.

„ What about time period between revocation and distribution

(16)

Advantages of CA Over KDC

„

CA does not need to be on-line!

„

CA can be very simple computing device.

„

If CA crashes, life goes on (except CRL).

„

Certificates can be stored in an insecure

manner!!

„

Compromised CA cannot decrypt messages.

(17)

Multiple CA’s

CIA KDC KGB KDC

Alice

Certificates validating each other’s Public Key

Bob

„ How does Alice talk to Bob?

„ She obtains Bob’s certificate signed by KGB-KDC.

„ She obtains KGB-KDC’s certificate signed by CIA-KDC. „ Concept can be generalized to multiple CA’s.

(18)

X.509

„

Clearly, there is a need for standardization –

X.509.

„

Originally 1988, revised 93 and 95.

„

X.509 is part of X.500 series that defines a

directory service.

„

Defines a framework for authentication

services by X.500 directory to its users.

„

Used in S/MIME, IPSEC, SSL, SET etc.

(19)

X.509 Certificate

Certificate Serial Number Version Issuer Name Signature algorithm identifier Subject Name Extensions Issuer Unique Identifier Subject Unique Identifier algorithm parameters not before algorithms parameters key algorithms parameters encrypted not after Subject's public key info Signature Period of validity V ersion 1 V ersion 2 V ersion 3 all v ersions Issuer Name This Update Date Next Update Date

Signature algorithm identifier algorithm parameters

user certificate serial #

(b) Certificate Revocation List

revocation date algorithms parameters encrypted Signature Revoked certificate

user certificate serial # revocation date

Revoked certificate

(20)

X.509 CA Hierarchy – Example.

U V W Y Z B X C A U<<V>> V<<U>> V<<W>> W<<V>> V<<Y>> Y<<V>> W<<X>> X<<W>> X<<Z>> Y<<Z>> Z<<Y>> Z<<X>> Y<<X>> means the certificate of user X issued by CA Y. To talk to B, A obtains the following chain X<<W>> W<<V>> V<<Y>> Y<<Z>> Z<<B>> Simpler if X has

(21)

X.509 Authentication – One-way.

A

B

1. A{tA, rA, B, sgnData, EKUb [Kab]}

„ Establishes the following

„ Identity of A and message was generated by A „ Message was intended for B

(22)

X.509 Authentication – Two-way.

A

B

1. A{tA, rA, B, sgnData, EKUb [Kab]}

2. B{tB, rB, A, rA, sgnData, EKUa [Kba]}

„ One-Way plus the above which establishes the

following

„ Identity of B and message was generated by B „ Message was intended for A

(23)

X.509 Authentication – Three-way.

A

B

1. A{tA, rA, B, sgnData, EKUb [Kab]}

2. B{tB, rB, A, rB, sgnData, EKUa [Kba]}

3. A{rB}

„ Nonce’s echoed back and forth to prevent replay

attacks.

(24)

Public-key Infrastructure (PKI)

„

Combination of digital certificates, public-key

cryptography, and certificate authorities.

„

A typical enterprise's PKI encompasses

„ issuance of digital certificates to users and servers „ end-user enrollment software

„ integration with corporate certificate directories „ tools for managing, renewing, and revoking

certificates; and related services and support

„

Verisign, Thawte and Entrust – PKI providers.

(25)

Ten Risks of PKI – Ellison and Schneier

„ Who do we trust, and for what? „ Who is using my key?

„ How secure is the verifying computer? „ Which John Robinson is he?

„ Is the CA an authority?

„ Is the user part of the security design?

„ Was it CA or CA plus Registration Authority? „ How did the CA identify the certificate holder? „ How secure are the certificate practices?

(26)

Further Reading

„

X.509 page

http://www.ietf.org/html.charters/pkix-charter.html

„

Ten Risks of PKI

References

Related documents

And the approved budget transfer form (BO-3500) initiated by Business Office staff The projected conference budget form and the request for an organization unit form must

indicates that a lack of disclosure (e.g., a pre-offering quiet period) can create incentives for some investors to privately acquire information, thereby increasing

An open, randomized, phase IIIa study to evaluate the safety and immunogenicity of GlaxoSmithKline Biologicals’ 10-valent pneumococcal conjugate vaccine, when

Fleets that employ an SRM approach to maintenance and repair events will be able to increase asset utilization (truck availability) by reducing Days out of Service (DOS)..

Exchange rates have a direct impact on the user cost of capital through movements in the investment price, g.6 As long as part of the investment is imported (i.e., mK &gt;

Potential sources of finance for the small scale enterprises include commercial banks, non- bank financial institutions, non-governmental organizations (NGOs), multilateral

반면 절차 공정성의 지각과 보상만족 간의 관계는 내적 동기가 낮은 집단에서만 유의미하였는데, 이러한 결과는 업무에 대한 내적 동기가 낮은 집단의

Analysis of research trends in papers published in the Journal of Korean Academy of Child Health Nursing (2005-2009).. Jour- nal of Korean Academy of Child