the key-distribution problem a public-key solution

11
Introduction Key-Distribution Diffie-Hellman Exchange The key-distribution problem A public-key solution Foundations of Cryptography Computer Science Department Wellesley College Fall 2016 Introduction Key-Distribution Diffie-Hellman Exchange Table of contents Introduction Key-Distribution Die-Hellman Exchange

Upload: others

Post on 18-Dec-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

The key-distribution problemA public-key solution

Foundations of CryptographyComputer Science Department

Wellesley College

Fall 2016

Introduction Key-Distribution Diffie-Hellman Exchange

Table of contents

Introduction

Key-Distribution

Di�e-Hellman Exchange

Page 2: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

The key-distribution problem

• Private-key cryptographyrequires shared, secret keysbetween each pair ofcommunicating parties.

• How are all these keysshared in the first place?

• In situations where a largenumber of parties mustpairwise, secretlycommunicate, manyschemes do not scale well.

Intro to cryptology 1-5

Security services

Confidentiality Protection of data from

unauthorized disclosure. Authentication

Assurance that the origin of a communication is correctly identified.

Integrity Only authorized entities are able to modify resources.

Nonrepudiation Protection again denial

by one of the parties. Access control

Prevention of unauthorized use of a resource.

Introduction Key-Distribution Diffie-Hellman Exchange

Key storage and secrecy

• When there are Uemployees, the number ofsecret keys is✓

U2

◆= ⇥(U2) and every

employee holds U � 1 keys.

• The situation is worse whenemployees mustcommunicate with remotedatabases, servers, and soforth.

• All these keys need must besecurely store.

Page 3: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

Open systems

• Private-key cryptographycan be used to solve theproblem of securecommunication in ”closed”systems where it is possibleto distribute secret keys viaphysical means.

• What happens when partiescannot physically meet, orwhere parties have transientinteractions?

Introduction Key-Distribution Diffie-Hellman Exchange

Key distribution centers (KDC)

All employees share a key with theKDC.

1. When Alice wants to communicatewith Bob, she encrypts, using thesecret key she shares with KDC: ‘Alice wishes to communicate

with Bob’

2. The KDC chooses a new randomkey, called the session key andsends this to Alice (encrypted usingAlice’s shared key) and Bob(encrypted using Bob’s shared key).

3. Alice and Bob communicate usingthe session key and destroy it whenthey are done.

Page 4: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

Good news/Bad newsPlus side:

1. Each employee needs to store onlyone secret key. Limited storagedevices, such as smart cards, couldbe used.

2. When an employee joins theorganization all that must be doneis set up a secret-key with theKDC. No other employees need beupdated.

Minus side:

1. A successful attack on the KDCresults in a complete break ofsecurity for all parties.

2. When the KDC is down, securecommunications come to a halt.

Introduction Key-Distribution Diffie-Hellman Exchange

The state of a↵airs before 1976

Page 5: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

After 1976, a new kid on the block

In 1976, Whitfield Di�e and Martin Hellman published a papertitled ”New Directions in Cryptography” in which they proposed acompletely new cryptographic paradigm.

Introduction Key-Distribution Diffie-Hellman Exchange

Addressing the limitations of private-key encryption*

1. Public-key allows key distribution to be done over publicchannels. Initial deployment and system maintenance issimplified.

2. Public-key vastly reduces the need to store many di↵erentsecret keys. Even if a large number of pairs want tocommunicate secretly, each party needs store only one key:her own.

3. Finally, public-key is suitable for open environments whereparties who have never previously interacted can communicatesecretly.

*There are a fair number of details glossed over here, e.g., ensuring authentic

distribution of public keys in the first place.

Page 6: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

Digital signatures

In addition to the public-key encryption, Di�e and Hellmanintroduced a public-key analogue to message authentication codes,call digital signatures.

*Not only does this scheme prevent undetected tampering of a message,

authenticity can be verified by anyone knowing the public key of the sender.

Nonrepudiation: Alice cannot deny her signature.

Introduction Key-Distribution Diffie-Hellman Exchange

Public-key implementation

• Although Di�e and Hellmanintroduced public-keyencryption and digitalsignatures, they did notprovide an implementationof either.

• A year later, Ron Rivest, AdiShamir, and Len Adlemanproposed the RSA problemand presented the firstpublic-key encryption anddigital signature schemes.

Page 7: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

Implements of war

• Di�e and Hellman (andothers publishing incryptography) were underthreat of prosecution.

• Under the InternationalTra�c in Arms Regulations,technical literature oncryptography was consideredan implement of war.

Introduction Key-Distribution Diffie-Hellman Exchange

Interactive key exchange

• Finally, in their now famouspaper, Di�e and Hellmanprovided an implementationof an interactive keyexchange.

• An interactive key exchangeprotocol is a methodwhereby parties who do notshare any secret informationcan generate a shared,secret key by communicatingover a public channel.

Page 8: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

The setting

Alice and Bob run some protocol ⇧ in order to generate a sharedsecret.

• Beginning with a security parameter 1n, Alice and Bob choose(independent) random coins and run protocol ⇧:

• At the end of the protocol, Alice and Bob output keyskA

, kB

2 {0, 1}n, respectively.• The basic correctness requirement is that k

A

= kB

for allchoices of random coins.*

*Thus, we can speak of the key k = k

A

= k

B

.

Introduction Key-Distribution Diffie-Hellman Exchange

A definition of security

The key-exchange experiment KEeavA,⇧(n):

1. Two parties holding 1n execute protocol ⇧ resulting in atranscript trans containing all the messages sent by theparties, and a key k that is output by each of the parties.

2. A random bit b {0, 1} is chosen. If b = 0 then choosek̂ {0, 1}n uniformly at random, and if b = 1 set k̂ := k .

3. A is given trans and k̂ , and outputs a bit b0.

4. The output of the experiment is defined to be 1 if b0 = b, and0 otherwise.

Definition 10.1 A key-exchange protocol ⇧ is secure in the presenceof an eavesdropper if for every probabilistic polynomial-timeadversary A there exists a negligible function negl such that

Pr[KEeavA,⇧(n) = 1] 1

2+ negl(n).

Page 9: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

The Di�e-Hellman key-exchange protocol*

Construction 10.2.

•Common input: The security input 1n

•The protocol:

1. Alice runs G(1n) to obtain (G, q, g).2. Alice chooses x Z

q

uniformly at random, and computeshA

:= g x .3. Alice sends (G, q, g , h

A

) to Bob.4. Bob receives (G, q, g , h

A

). He chooses y Zq

uniformly atrandom and computes h

B

:= g y . Bob sends hB

to Alice andoutputs the key k

B

:= hyA

.5. Alice receives h

B

and outputs the key kA

:= hxB

.

*Checking correctness is easy.

Introduction Key-Distribution Diffie-Hellman Exchange

Security of the Di�e-Hellman exchange

• At a bare bones minimum, inorder for the Di�e-Hellmanexchange to be secure it isnecessary for the discretelogarithm problem to be hardrelative to G.

• However, this is not su�cientsince is may be possible tocompute the key k

A

= kB

without explicitly finding x or y .

• What is required is that g xy beindistinguishable from randomfor any adversary given g , g x ,and g y .

Page 10: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

Decisional Di�e-Hellman (DDH) problem once more

The decisional Di�e-Hellman (DDH) problem is to distinguishDH

g

(h1, h2) from a random group element for randomly chosenh1, h2.

Definition 8.63. We say that the DDH problem is hard relative toG if for all probabilistic polynomial-time algorithms A there existsa negligible function negl such that

|Pr[A(G, q, g , g x , g y , g z) = 1]� Pr[A(G, q, g , g x , g y , g xy ) = 1]| negl(n),

where in each case the probabilities are taken over the experimentin which G(1n) outputs (G, q, g), and the random x , y , z 2 Z

q

arechosen.

Introduction Key-Distribution Diffie-Hellman Exchange

Proof of security

Theorem 10.3. If the decisional Di�e-Hellman problem is hardrelative to G, then the Di�e-Hellman key-exchange protocol ⇧ issecure in the presence of an eavesdropper (with respect to theexperiment K̂E

eavA,⇧.

Proof. Let A be a PPT adversary. SincePr[b = 0] = Pr[b = 1] = 1/2, we have

PrhK̂E

eavA,⇧(n) = 1

i

=1

2· Pr

hK̂E

eavA,⇧(n) = 1 | b = 1

i+

1

2· Pr

hK̂E

eavA,⇧(n) = 1 | b = 0

i.

*Here K̂EeavA,⇧ stands for a modified experiment where if b = 0 the adversary is

given k̂ G chosen uniformly at random.

Page 11: The key-distribution problem A public-key solution

Introduction Key-Distribution Diffie-Hellman Exchange

The adversary’s goal

In experiment K̂EeavA,⇧(n), adversary A receives (G, q, g , h

A

, hB

, k̂),where (G, q, g , h

A

, hB

) is the transcript of the protocol execution,and k̂ is either the actual key g xy (if b = 1) or a random groupelement (if b = 0).

Distinguishing between these two cases is exactly equivalent tosolving the decisional Di�e-Hellman problem.*

*So are we really doing anything here?

Introduction Key-Distribution Diffie-Hellman Exchange

Adversary’s probability of success

PrhK̂E

eavA,⇧(n) = 1

i

=1

2· Pr

hK̂E

eavA,⇧(n) = 1 | b = 1

i+

1

2· Pr

hK̂E

eavA,⇧(n) = 1 | b = 0

i

=1

2· Pr[A(G, g , q, g x , g y , g xy ) = 1] +

1

2· Pr[A(G, g , q, g x , g y , g z) = 0]

=1

2· Pr[A(G, g , q, g x , g y , g xy ) = 1] +

1

2· (1� Pr[A(G, g , q, g x , g y , g z) = 1])

=1

2+

1

2· (Pr[A(G, g , q, g x , g y , g xy ) = 1]� Pr[A(G, g , q, g x , g y , g z) = 1])

1

2+

1

2· |Pr[A(G, g , q, g x , g y , g xy ) = 1]� Pr[A(G, g , q, g x , g y , g z) = 1]| .

If the decisional Di�e-Hellman assumption is hard relative to G, this theabsolute value in the final line is bounded by some negligible runction negl, and

PrhK̂E

eavA,⇧(n) = 1

i 1

2+

1

2· negl(n).