commitment schemes and identification/authentication

21
Rennes, 23/10/2014 Cristina Onete maria- [email protected] Commitment Schemes and Identification/Authenticatio n

Upload: guy-mays

Post on 30-Dec-2015

49 views

Category:

Documents


0 download

DESCRIPTION

Commitment Schemes and Identification/Authentication. Commitment Schemes. Bob. Alice. Alice. Bob. Example :. Alice and Bob must agree who will clean tonight. They are at their offices. Each tosses a coin & they call:. If tosses are the same, then Alice cleans. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Commitment Schemes and Identification/Authentication

Rennes, 23/10/2014

Cristina Onete

[email protected]

Commitment Schemes and Identification/Authentication

Page 2: Commitment Schemes and Identification/Authentication

Commitment Schemes

Alice Bob

Example:

• Alice and Bob must agree who will clean tonight• They are at their offices. Each tosses a coin & they call:

If tosses are the same, then Alice cleans If tosses are different, then Bob cleans

• Who talks first?

Bob

Alice

Cristina Onete || 06/11/2014 || 2

Page 3: Commitment Schemes and Identification/Authentication

Commitment Schemes

Alice Bob

Alice and Bob toss• Alice talks first

• Bob talks first

BobAlice

How can we avoid this?

Bob says he tossed the same value

Alice says she tossed the opposite value

Cristina Onete || 06/11/2014 || 3

Page 4: Commitment Schemes and Identification/Authentication

Commitment Schemes

Alice Bob

Commitment: an envelope with a strange seal

• Alice talks first

• Commit phase: she hides toss in envelope, gives it to Bob

• Reveal phase: Alice tells Bob how to unseal envelope

• Bob reveals toss

Bob cleans

Cristina Onete || 06/11/2014 || 4

Page 5: Commitment Schemes and Identification/Authentication

Commitment Schemes

Alice Bob

Properties:

• Hiding: The content of the envelope is not visible

Bob doesn’t know anything about Alice’s toss

• Binding: Alice can’t change the content in the envelope

Alice can’t cheat after getting Bob’s toss

Cristina Onete || 06/11/2014 || 5

Page 6: Commitment Schemes and Identification/Authentication

Commitment Schemes

Alice Bob

Formally: 𝐶𝑜𝑚𝑚𝑖𝑡 :{0,1}𝑘×{0,1 }∗→{0,1 }∗

Commitment hiding:

Input 𝑎=𝐶𝑜𝑚𝑚𝑖𝑡 (𝑥 ,𝑤)

……………………𝑥 ,𝑤

Check

Random

Dist𝑤 (𝐶𝑜𝑚𝑚𝑖𝑡 (𝑥1 ,𝑤 ))≈ Dist𝑤 (𝐶𝑜𝑚𝑚𝑖𝑡 (𝑥2 ,𝑤))

Commitment binding:

∀ 𝑥1 ,𝑥2∈ {0,1 }∗ :Prob [ {𝑤 ,𝑤′ }← 𝜀 :𝐶𝑜𝑚𝑚𝑖𝑡 (𝑥1 ,𝑤 )=𝐶𝑜𝑚𝑚𝑖𝑡 (𝑥2 ,𝑤 ′) ]≪1

Cristina Onete || 06/11/2014 || 6

Page 7: Commitment Schemes and Identification/Authentication

Pedersen Commitments

Setup: , prime field, \ , unknown

Commitment of input value :

Alice Bob

𝑥∈ {0,1 }Random

𝑎=𝐶𝑜𝑚𝑚𝑖𝑡 (𝑥 ,𝑤)

• Choose random witness

• Compute

……………………𝑥 ,𝑤

Check

Binding: from = we have

Thus we have Impossible

Cristina Onete || 06/11/2014 || 7

Page 8: Commitment Schemes and Identification/Authentication

Pedersen Commitments

Setup: , prime field, \ , unknown

Commitment of input value :

Alice Bob

𝑥∈ {0,1 }Random

𝑎=𝐶𝑜𝑚𝑚𝑖𝑡 (𝑥 ,𝑤)

• Choose random witness

• Compute

……………………𝑥 ,𝑤

Check

Hiding:Dist𝑤 (𝐶𝑜𝑚𝑚𝑖𝑡 (𝑔𝑤 ) )≈ Dist𝑤(𝐶𝑜𝑚𝑚𝑖𝑡 (𝑔𝑤h))

Cristina Onete || 06/11/2014 || 8

Page 9: Commitment Schemes and Identification/Authentication

DLog-based Commitments

Alice Bob

𝑥∈𝑍𝑞

Random

𝑎=𝐶𝑜𝑚𝑚𝑖𝑡 (𝑥 ,𝑤)……………………𝑥 ,𝑤

Check

Setup: prime, prime, with

Commitment of input value :

(no randomness)

Computationally hiding: DLog Perfectly binding by construction

Cristina Onete || 06/11/2014 || 9

Page 10: Commitment Schemes and Identification/Authentication

Exercise 1

Consider a hash function H

Use the commitment scheme

Commit (𝑥 ,𝑤 )=𝐻 (𝑥 ,𝑤)

Is this commitment binding if H is one-way?

If H is one-way, is this commitment hiding?

Cristina Onete || 06/11/2014 || 10

Page 11: Commitment Schemes and Identification/Authentication

Exercise 2

Let

Use the commitment scheme

, for

Setup: , prime field, \ , unknown

Is this commitment binding? Is this commitment hiding?

What happens if the value s is known?

Cristina Onete || 06/11/2014 || 11

Page 12: Commitment Schemes and Identification/Authentication

Exercise 3

Setup: , prime field. Let

Use the commitment scheme

, for

Is this commitment hiding?

Is this commitment binding?

Cristina Onete || 06/11/2014 || 12

Page 13: Commitment Schemes and Identification/Authentication

Identification & Authentication

Prover Verifier

Goal (identification):• The prover wants to convince the verifier she is who she pre-

tends to be

• Example: interview/application/exam

Goal (authentication):• Prover wants to prove she’s legitimate• Example: owner of a house, student at University, etc

ID

Cristina Onete || 06/11/2014 || 13

Page 14: Commitment Schemes and Identification/Authentication

Challenge-Response

Two-move protocol

• Verifier starts, sending a challenge• Prover sends a response

• Based on the challenge-response, the verifier must make his decision

Prover Verifier

challenge

response

Cristina Onete || 06/11/2014 || 14

Page 15: Commitment Schemes and Identification/Authentication

Challenge-Response

Prover Verifier

challenge

response

Symmetric authentication:

• Verifier stores a keyring of many keys (each corresponding to one prover)

• Goal of challenge-response: verifier can decide whether the prover is legitimate or not

Shared

• Property 1: a legitimate prover can always authenticate• Property 2: an illegitimate prover can never authenticate

Cristina Onete || 06/11/2014 || 15

Page 16: Commitment Schemes and Identification/Authentication

Challenge-Response

Prover Verifier

challenge

response

Shared

Exercise 4:

• Can the verifier always send the same challenge ?

• Can the set of possible challenges be small?

• The response should be a function of the secret key and the challenge: .

• Can we use Can we use

• Can we use a function that is one-way? Like ?

Cristina Onete || 06/11/2014 || 16

Page 17: Commitment Schemes and Identification/Authentication

Challenge-Response

Prover Verifier

challenge

response

Exercise 5:

• Design a challenge-response protocol using a symmetric encryption function

• Now use a PK encryption scheme• Use a pseudo-random hash function• Now use a signature scheme

• Use a commitment scheme and a 1-way hash function

Cristina Onete || 06/11/2014 || 17

Page 18: Commitment Schemes and Identification/Authentication

Exercises

Exercise 6:

Prover Verifier

h𝑐 𝑔←𝑅𝑍𝑛∗

𝑟𝑠𝑝=𝐻𝐾 ( h𝑐 𝑔 )

• Use the protocol above, assuming the hash function produ-ces pseudo-random outputs

• Imagine the verifier stores a large number of symmetric keys (of possible legitimate provers). What is the problem with this?

• What is a simple denial-of-service attack that an attacker can run against a verifier who stores very many keys?

Cristina Onete || 06/11/2014 || 18

Page 19: Commitment Schemes and Identification/Authentication

Exercises

Prover Verifier

h𝑐 𝑔𝑟𝑠𝑝

Exercise 7:• A mutual authentication protocol is one in which both parties

can verify the legitimacy of their partner

• Start from a basic 2-move challenge-response protocol. Can you think of a 3-move protocol that ensures MUTUAL authentication?

• Design a mutual authentication protocol using only a (keyed) hash function. What are the required properties?

Cristina Onete || 06/11/2014 || 19

Page 20: Commitment Schemes and Identification/Authentication

Exercise 8: the age game

One of your friends, a girl, asks you to guess her age

You know the penalty for guessing she is too old: she’ll kick you and punch you, and probably then kill you

So you say: I bet you I know your age. But you have to give me your ID card to check it. If it’s right, I will prove to you that I knew your age. If I am wrong, I’m buying you flowers, chocolates, and an expensive dinner

• Use a commitment scheme. The idea is that you want to be able to prove that your guess was right (if the number you guessed is at most her age – as you will see from her ID) or withold any information about your guess (if you guessed wrongly). That way, she will at least not know how old you thought she was

Cristina Onete || 06/11/2014 || 20

Page 21: Commitment Schemes and Identification/Authentication

CIDRE

Thanks!