631
1/205 Lecture Slides Cryptographic Protocols Version 1.5 February 2, 2020 Berry Schoenmakers Department of Mathematics and Computer Science, Technical University of Eindhoven, P.O. Box 513, 5600 MB Eindhoven, The Netherlands. [email protected] [email protected] Cryptographic Protocols (2DMI00) www.win.tue.nl/˜berry/2DMI00/ Spring 2020

Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

  • Upload
    others

  • View
    11

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

1/205

Lecture SlidesCryptographic Protocols

Version 1.5February 2, 2020

Berry SchoenmakersDepartment of Mathematics and Computer Science,

Technical University of Eindhoven,P.O. Box 513, 5600 MB Eindhoven, The Netherlands.

[email protected]@win.tue.nl

Cryptographic Protocols (2DMI00)www.win.tue.nl/˜berry/2DMI00/

Spring 2020

Page 3: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

3/205

Preface

Course Grading 2DMI00

2DMI00 course: 5 ECTS

Written exam (closed book): 80%

MPyC programming assignment: 20%

Requirement: passing grade at least 5.5 for written exam.

Page 4: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

4/205

Preface

Motivating Example: Secret Santa

Web server (acting as trusted party) generates randompermutation π of {1, 2, . . . , n} without fixed points (so π(i) 6= i).Web server sends π(i) to party Pi in private.

Cheating web server couldpick an arbitrary function for π (e.g., with π(1) = π(2))influence who picks whotell others who picked who...

Q: How to do this by means of a cryptographic protocol—no trusted party?A: Use a secure multiparty computation protocol!

Page 5: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

4/205

Preface

Motivating Example: Secret Santa

Web server (acting as trusted party) generates randompermutation π of {1, 2, . . . , n} without fixed points (so π(i) 6= i).Web server sends π(i) to party Pi in private.

Cheating web server couldpick an arbitrary function for π (e.g., with π(1) = π(2))influence who picks whotell others who picked who...

Q: How to do this by means of a cryptographic protocol—no trusted party?A: Use a secure multiparty computation protocol!

Page 6: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

4/205

Preface

Motivating Example: Secret Santa

Web server (acting as trusted party) generates randompermutation π of {1, 2, . . . , n} without fixed points (so π(i) 6= i).Web server sends π(i) to party Pi in private.

Cheating web server couldpick an arbitrary function for π (e.g., with π(1) = π(2))influence who picks whotell others who picked who...

Q: How to do this by means of a cryptographic protocol—no trusted party?A: Use a secure multiparty computation protocol!

Page 7: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

4/205

Preface

Motivating Example: Secret Santa

Web server (acting as trusted party) generates randompermutation π of {1, 2, . . . , n} without fixed points (so π(i) 6= i).Web server sends π(i) to party Pi in private.

Cheating web server couldpick an arbitrary function for π (e.g., with π(1) = π(2))influence who picks whotell others who picked who...

Q: How to do this by means of a cryptographic protocol—no trusted party?A: Use a secure multiparty computation protocol!

Page 8: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

5/205

Preface

Electronic Voting Using Verifiable Mixes

Page 9: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

6/205

Preface

Zero-knowledge Proof in Your Laptop?Direct Anonymous Attestation

Advanced NoninteractiveZero-Knowledge proof,effectively a Group Signature

To prove thatPC/laptop is authentic(signing key belongs togenuine “trusted computer”)but without giving away itsidentity

Page 10: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

6/205

Preface

Zero-knowledge Proof in Your Laptop?Direct Anonymous Attestation

Advanced NoninteractiveZero-Knowledge proof,effectively a Group Signature

To prove thatPC/laptop is authentic(signing key belongs togenuine “trusted computer”)but without giving away itsidentity

Page 11: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

7/205

Preface

Zero-knowledge Proof in Your Cryptocurrencies?

Enhance privacy properties of cryptocurrencies.

By hiding transaction details such as payer’s identity or amount.

Monero based on CryptoNote.CryptoNote white paper includes 1-out-of-m Σ-proof (Exercise 5.4.3) to hidethe payer’s identity among ad hoc groups of m potential payers. Σ-proof usedfor one-time ring signatures, or, rather, list signatures.

Building on Zerocoin, Zcash employs a type of zero-knowledge proofs knownas zk-SNARKs.

Also related: Bulletproofs. See Exercise 5.3.2 for a Σ-protocol for rangeproofs (or, interval proofs).

Page 12: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

8/205

Preface

Secure Multiparty Computation Unleashed!

In four 2018 Gartner Hype Cycle reports, see unboundtech.com.

To implement blockchains like Cardano.Blockchains and cryptocurrencies utilize wealth of cryptographic protocols(implemented as open-source software, written in high-level programminglanguages, using advanced cryptography libraries, running on fast PCs/servers).

Page 13: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

9/205

Preface

Crypto 1.0: Caesar Cipher

Rotate the alphabet by a fixed offset

Page 14: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

10/205

Preface

Crypto 1.0

Crypto 1.0 concerns- encryption and authentication of data,- during communication and storage/retrieval

Crypto 1.0 primitives:Symmetric (secret key):

Stream/block ciphersMessage authentication codes

Asymmetric (public key):Public-key encryptionDigital signaturesKey-exchange protocols

Keyless:Cryptographic hash functions

Page 15: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

10/205

Preface

Crypto 1.0

Crypto 1.0 concerns- encryption and authentication of data,- during communication and storage/retrieval

Crypto 1.0 primitives:Symmetric (secret key):

Stream/block ciphersMessage authentication codes

Asymmetric (public key):Public-key encryptionDigital signaturesKey-exchange protocols

Keyless:Cryptographic hash functions

Page 16: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

11/205

Preface

Crypto 2.0

Crypto 2.0 additionally concerns- computing with encrypted data,- partial information release of data,- hiding identity of data owners or any link with them.

Crypto 2.0 primitives:homomorphic encryption Rivest-Adleman-Dertouzos 1978, Gentry 2009

secret sharing Blakley 1979, Shamir 1979

blind signatures Chaum 1982

oblivious transfer M. Rabin 1981, Even-Goldreich-Lempel 1985

zero-knowledge proofs Goldwasser-Micali-Rackoff 1985, Goldreich-Micali-Wigderson 1986

secure two/multi-party computation Yao 1982–1986, GMW 1987, BGW 1988, CCD 1988

functional encryption Sahai-Waters 2005, Boneh-Sahai-Waters 2011, GKPVZ 2013

indistinguishability obfuscation Garg-Gentry-Halevi-Raykova-Sahai-Waters 2013, GMMSSZ 2016

Page 17: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

11/205

Preface

Crypto 2.0

Crypto 2.0 additionally concerns- computing with encrypted data,- partial information release of data,- hiding identity of data owners or any link with them.

Crypto 2.0 primitives:homomorphic encryption Rivest-Adleman-Dertouzos 1978, Gentry 2009

secret sharing Blakley 1979, Shamir 1979

blind signatures Chaum 1982

oblivious transfer M. Rabin 1981, Even-Goldreich-Lempel 1985

zero-knowledge proofs Goldwasser-Micali-Rackoff 1985, Goldreich-Micali-Wigderson 1986

secure two/multi-party computation Yao 1982–1986, GMW 1987, BGW 1988, CCD 1988

functional encryption Sahai-Waters 2005, Boneh-Sahai-Waters 2011, GKPVZ 2013

indistinguishability obfuscation Garg-Gentry-Halevi-Raykova-Sahai-Waters 2013, GMMSSZ 2016

Page 18: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

12/205

Preface

Crypto 1.0 vs Crypto 2.0

Crypto 1.0 encryption and authentication:protect against malicious outsiders

attacks on storage or communication media

can be achieved using symmetric cryptovery high performance

Crypto 2.0 primitives additionally:protect against malicious or corrupt insiders

attacks by your protocol “partners”

uses more powerful cryptographic primitives, essentially asymmetric cryptomuch harder to do efficiently

Page 19: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

12/205

Preface

Crypto 1.0 vs Crypto 2.0

Crypto 1.0 encryption and authentication:protect against malicious outsiders

attacks on storage or communication media

can be achieved using symmetric cryptovery high performance

Crypto 2.0 primitives additionally:protect against malicious or corrupt insiders

attacks by your protocol “partners”

uses more powerful cryptographic primitives, essentially asymmetric cryptomuch harder to do efficiently

Page 20: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

13/205

Contents

1 Introduction

1.1 Terminology

1.2 Preliminaries1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

1.3 Assumptions1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Page 21: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

14/205

Contents

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

2.2 Authenticated Key Exchange2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Page 22: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

15/205

Contents

3 Commitment Schemes

3.1 Definitions

3.2 Examples3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

3.3 Homomorphic Commitments

Page 23: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

16/205

Contents

4 Identification Protocols

4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.4.1 Using Symmetric Encryption4.4.2 Using Symmetric Authentication4.4.3 Using Asymmetric Encryption4.4.4 Using Asymmetric Authentication4.5 Zero-Knowledge Identification Protocols4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol4.6 Witness Hiding Identification Protocols4.6.1 Okamoto Protocol

Page 24: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

17/205

Contents

5 Zero-Knowledge Proofs

5.1 Σ-Protocols

5.2 Composition of Σ-Protocols5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Page 25: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

18/205

Contents

6 Threshold Cryptography

6.1 Secret Sharing6.1.1 Shamir Threshold Scheme

6.2 Verifiable Secret Sharing6.2.1 Feldman VSS6.2.2 Pedersen VSS

6.3 Threshold Cryptosystems6.3.1 Threshold ElGamal Cryptosystem

Page 26: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

19/205

Contents

7 Secure Multiparty Computation

7.1 Electronic Voting

7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Page 27: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

20/205

Contents

8 Blind Signatures

8.1 Definitions

8.2 Chaum Blind Signature Scheme

8.3 Blind Signatures from Σ-Protocols

Page 28: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

21/205

Contents

Appendices

A Fundamental Lemma of Cryptology

B Spell Check

Page 29: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

22/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Cryptology = Cryptography + Cryptanalysis

Field of cryptology is divided into two mutually dependent fields:Cryptography: design of (mathematical) schemes related to information security

which resist cryptanalysis.Cryptanalysis: study of (mathematical) techniques for attacking cryptographic

schemes.

IACRInternational Association for Cryptologic Researchwww.iacr.org

IACR employs e-voting since 2010! See www.iacr.org/elections. (Underlyingcryptographic voting scheme is covered in Section 7.1.)

Page 30: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

23/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Cryptographic Algorithms/Protocols/Schemes

Definition 1.1Cryptographic Algorithm: well-defined transformation, which on a given input

value produces an output value, achieving certain securityobjectives.

Cryptographic Protocol: distributed algorithm describing precisely the interactionsbetween two or more entities, achieving certain security objectives.

Cryptographic Scheme: suite of related cryptographic algorithms andcryptographic protocols, achieving certain security objectives.

ExampleDigital signature schemes consist of three cryptographic algorithms:

key generationsignature generationsignature verification

Page 31: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

23/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Cryptographic Algorithms/Protocols/Schemes

Definition 1.1Cryptographic Algorithm: well-defined transformation, which on a given input

value produces an output value, achieving certain securityobjectives.

Cryptographic Protocol: distributed algorithm describing precisely the interactionsbetween two or more entities, achieving certain security objectives.

Cryptographic Scheme: suite of related cryptographic algorithms andcryptographic protocols, achieving certain security objectives.

ExampleDigital signature schemes consist of three cryptographic algorithms:

key generationsignature generationsignature verification

Page 32: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

23/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Cryptographic Algorithms/Protocols/Schemes

Definition 1.1Cryptographic Algorithm: well-defined transformation, which on a given input

value produces an output value, achieving certain securityobjectives.

Cryptographic Protocol: distributed algorithm describing precisely the interactionsbetween two or more entities, achieving certain security objectives.

Cryptographic Scheme: suite of related cryptographic algorithms andcryptographic protocols, achieving certain security objectives.

ExampleDigital signature schemes consist of three cryptographic algorithms:

key generationsignature generationsignature verification

Page 33: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

23/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Cryptographic Algorithms/Protocols/Schemes

Definition 1.1Cryptographic Algorithm: well-defined transformation, which on a given input

value produces an output value, achieving certain securityobjectives.

Cryptographic Protocol: distributed algorithm describing precisely the interactionsbetween two or more entities, achieving certain security objectives.

Cryptographic Scheme: suite of related cryptographic algorithms andcryptographic protocols, achieving certain security objectives.

ExampleDigital signature schemes consist of three cryptographic algorithms:

key generationsignature generationsignature verification

Page 34: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

24/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Communication Model

Entities in a cryptographic scheme are connected by communication channels.

Entities can be persons, organizations, devices, etc.In cryptography, one often speaks of parties.

Entities interact in a cryptographic protocol by exchanging messagesover specific communication channels.

Communication model describes mix of available channels:point-to-point channelbroadcast channelprivate channel (secure channel)public channel (insecure channel)bulletin board (similar to blockchain)

Page 35: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

24/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Communication Model

Entities in a cryptographic scheme are connected by communication channels.

Entities can be persons, organizations, devices, etc.In cryptography, one often speaks of parties.

Entities interact in a cryptographic protocol by exchanging messagesover specific communication channels.

Communication model describes mix of available channels:point-to-point channelbroadcast channelprivate channel (secure channel)public channel (insecure channel)bulletin board (similar to blockchain)

Page 36: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

24/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Communication Model

Entities in a cryptographic scheme are connected by communication channels.

Entities can be persons, organizations, devices, etc.In cryptography, one often speaks of parties.

Entities interact in a cryptographic protocol by exchanging messagesover specific communication channels.

Communication model describes mix of available channels:point-to-point channelbroadcast channelprivate channel (secure channel)public channel (insecure channel)bulletin board (similar to blockchain)

Page 37: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

25/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Adversaries and Attacks

Adversary = coalition of attacker and/orcorrupt entities of cryptographic scheme.

Attacker: outsiderCorrupt entities: insiders.

Definition 1.2Passive Attack: adversary does not interfere with execution of

algorithms/protocols. Passive adversary eavesdrops oncommunication between entities, and records all information,including all private information of corrupt entities.

Active attack: adversary may—in addition—interfere with communicationwithin cryptographic scheme by deleting, injecting, or modifyingmessages; moreover, adversary may have corrupt entities deviatefrom prescribed behavior in arbitrary ways.

Page 38: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

25/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Adversaries and Attacks

Adversary = coalition of attacker and/orcorrupt entities of cryptographic scheme.

Attacker: outsiderCorrupt entities: insiders.

Definition 1.2Passive Attack: adversary does not interfere with execution of

algorithms/protocols. Passive adversary eavesdrops oncommunication between entities, and records all information,including all private information of corrupt entities.

Active attack: adversary may—in addition—interfere with communicationwithin cryptographic scheme by deleting, injecting, or modifyingmessages; moreover, adversary may have corrupt entities deviatefrom prescribed behavior in arbitrary ways.

Page 39: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

26/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

Attacks

Example (Passive Attacks)Eavesdropping on communication (by outsiders).Collecting data within a system (by insiders).Perform cryptanalysis on all acquired data.

Example (Active Attacks)Man-in-the-middle attacks (“grandmaster chess attack”).Injection/deletion/modification of messages.Initiate/terminate protocol executions.Masquerading/spoofing attacks.Replay attacks.Reflection attacks.

Page 40: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

27/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Basic Number Theoretic Notions

For positive integer n:

Zn = Z/nZ = {0, 1, . . . , n − 1} “set of integers modulo n”

Z∗n = {x ∈ Zn : gcd(x , n) = 1} “integers with multiplicative inverse mod n”

φ(n) = |Z∗n | = n∏

p|n(1− 1/p) “Euler’s phi function”

Hence, φ(n) can be computed efficiently given the prime divisors of n.

Useful fact: nφ(n) =

∏p|n

pp − 1 = O(log log n)

Exercise 1.2.1Prove the elementary bound n/φ(n) = O(log n), using that the number of distinctprime factors ω(n) of n is O(log n), and that the ith smallest prime factor of n isat least i + 1 for i = 1, 2, . . . , ω(n).

Page 41: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

28/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

More Advanced: A Generalization of Euler’s Phi Function

The (order-2) Schemmel totient function:

φ2(n) = |{x ∈ Zn : gcd(x , n) = gcd(x + 1, n) = 1}|

For n even, φ2(n) = 0. For n odd, φ2(n) = n∏

p|n(1− 2/p).Useful fact: n

φ2(n) =∏p|n

pp − 2 = O((log log n)2)

Exercise 1.2.2For n odd, prove the elementary bound n/φ2(n) = O(log2 n), using again thatω(n) = O(log n) and that the ith smallest prime factor of n is now at least i + 2for i = 1, 2, . . . , ω(n).

Schemmel totient function shows up in the analysis of a variant of the decisionDiffie-Helmann problem (see Exercise 1.3.5(b)).

Page 42: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

29/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Discrete Log SettingCyclic group of order n with generator g :

Gn = 〈g〉 = {1, g , g2, g3, . . . , gn−1}, gn = 1

x = logg h: discrete log of h ∈ Gn is unique x ∈ Zn such that h = gx .

Example 1.3 (Groups Z∗p , F∗q )

Integers modulo prime p: Gn = Z∗p cyclic group of order n = p − 1.Multiplicative group of order-q finite field: Gn = F∗q cyclic, order n = q − 1.

Example 1.4 (Prime order subgroups of Z∗p , F∗q )

Gn = 〈g〉, with g an element of prime order p′ in Z∗p , or in F∗q .Then Gn is a cyclic group of prime order n = p′.

Example 1.5 (Group E(Fq) of Fq-rational points on an elliptic curve E)E(Fq) isomorphic to Zn1 × Zn2 , hence not necessarily cyclic.Take Gn = E(Fq) if n1 = 1; otherwise, take a cyclic subgroup of E(Fq) for Gn.

Page 43: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

29/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Discrete Log SettingCyclic group of order n with generator g :

Gn = 〈g〉 = {1, g , g2, g3, . . . , gn−1}, gn = 1

x = logg h: discrete log of h ∈ Gn is unique x ∈ Zn such that h = gx .

Example 1.3 (Groups Z∗p , F∗q )

Integers modulo prime p: Gn = Z∗p cyclic group of order n = p − 1.Multiplicative group of order-q finite field: Gn = F∗q cyclic, order n = q − 1.

Example 1.4 (Prime order subgroups of Z∗p , F∗q )

Gn = 〈g〉, with g an element of prime order p′ in Z∗p , or in F∗q .Then Gn is a cyclic group of prime order n = p′.

Example 1.5 (Group E(Fq) of Fq-rational points on an elliptic curve E)E(Fq) isomorphic to Zn1 × Zn2 , hence not necessarily cyclic.Take Gn = E(Fq) if n1 = 1; otherwise, take a cyclic subgroup of E(Fq) for Gn.

Page 44: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

29/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Discrete Log SettingCyclic group of order n with generator g :

Gn = 〈g〉 = {1, g , g2, g3, . . . , gn−1}, gn = 1

x = logg h: discrete log of h ∈ Gn is unique x ∈ Zn such that h = gx .

Example 1.3 (Groups Z∗p , F∗q )

Integers modulo prime p: Gn = Z∗p cyclic group of order n = p − 1.Multiplicative group of order-q finite field: Gn = F∗q cyclic, order n = q − 1.

Example 1.4 (Prime order subgroups of Z∗p , F∗q )

Gn = 〈g〉, with g an element of prime order p′ in Z∗p , or in F∗q .Then Gn is a cyclic group of prime order n = p′.

Example 1.5 (Group E(Fq) of Fq-rational points on an elliptic curve E)E(Fq) isomorphic to Zn1 × Zn2 , hence not necessarily cyclic.Take Gn = E(Fq) if n1 = 1; otherwise, take a cyclic subgroup of E(Fq) for Gn.

Page 45: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

29/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Discrete Log SettingCyclic group of order n with generator g :

Gn = 〈g〉 = {1, g , g2, g3, . . . , gn−1}, gn = 1

x = logg h: discrete log of h ∈ Gn is unique x ∈ Zn such that h = gx .

Example 1.3 (Groups Z∗p , F∗q )

Integers modulo prime p: Gn = Z∗p cyclic group of order n = p − 1.Multiplicative group of order-q finite field: Gn = F∗q cyclic, order n = q − 1.

Example 1.4 (Prime order subgroups of Z∗p , F∗q )

Gn = 〈g〉, with g an element of prime order p′ in Z∗p , or in F∗q .Then Gn is a cyclic group of prime order n = p′.

Example 1.5 (Group E(Fq) of Fq-rational points on an elliptic curve E)E(Fq) isomorphic to Zn1 × Zn2 , hence not necessarily cyclic.Take Gn = E(Fq) if n1 = 1; otherwise, take a cyclic subgroup of E(Fq) for Gn.

Page 46: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

29/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Discrete Log SettingCyclic group of order n with generator g :

Gn = 〈g〉 = {1, g , g2, g3, . . . , gn−1}, gn = 1

x = logg h: discrete log of h ∈ Gn is unique x ∈ Zn such that h = gx .

Example 1.3 (Groups Z∗p , F∗q )

Integers modulo prime p: Gn = Z∗p cyclic group of order n = p − 1.Multiplicative group of order-q finite field: Gn = F∗q cyclic, order n = q − 1.

Example 1.4 (Prime order subgroups of Z∗p , F∗q )

Gn = 〈g〉, with g an element of prime order p′ in Z∗p , or in F∗q .Then Gn is a cyclic group of prime order n = p′.

Example 1.5 (Group E(Fq) of Fq-rational points on an elliptic curve E)E(Fq) isomorphic to Zn1 × Zn2 , hence not necessarily cyclic.Take Gn = E(Fq) if n1 = 1; otherwise, take a cyclic subgroup of E(Fq) for Gn.

Page 47: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

30/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Convenient Notation: 〈g〉∗

Definition (Set of all generators of 〈g〉)〈g〉∗ = {g x : x ∈ Z∗n}

Clearly: |〈g〉∗| = φ(n).

Exercise 1.2.3Show that for any h ∈ 〈g〉, the following conditions are equivalent:

(i) h ∈ 〈g〉∗,(ii) ord(h) = ord(g),(iii) 〈h〉 = 〈g〉,(iv) 〈h〉∗ = 〈g〉∗.

Exercise 1.2.4(a) Show alogh b = blogh a for any a, b ∈ 〈g〉 and h ∈ 〈g〉∗. (b) For a, b ∈ 〈g〉,define a ∗ b = alogg b as the Diffie-Hellman (DH) product of a and b. Show that(〈g〉∗, ∗) is an abelian group.

Page 48: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

31/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

NotationDiscrete random variables X ,Y ,Z , . . . with a finite range V .

Probability distribution of X : (i) 0 ≤ Pr[X = v ] ≤ 1 for all v ∈ V ,(ii)

∑v∈V Pr[X = v ] = 1,

X ∈R V: random variable X distributed uniformly on V , Pr[X = v ] = 1/|V |.

Example (Random bits)X ∈R {0, 1} denotes a uniformly random bit. Let Y = 1− X .

X 6= Y , in fact Pr[X = Y ] = 0,Pr[X = 0] = Pr[Y = 0] = 1/2, andPr[X = 1] = Pr[Y = 1] = 1/2.

Example (Probability distributions)

{u : u ∈R {0, 1}} = {0 7→ 12 , 1 7→

12} = {1− u : u ∈R {0, 1}}

{t + u : t, u ∈R {0, 1}} = {0 7→ 14 , 1 7→

12 , 2 7→

14}

{tu : t, u ∈R {0, 1}} = {0 7→ 34 , 1 7→

14}

Page 49: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

31/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

NotationDiscrete random variables X ,Y ,Z , . . . with a finite range V .

Probability distribution of X : (i) 0 ≤ Pr[X = v ] ≤ 1 for all v ∈ V ,(ii)

∑v∈V Pr[X = v ] = 1,

X ∈R V: random variable X distributed uniformly on V , Pr[X = v ] = 1/|V |.

Example (Random bits)X ∈R {0, 1} denotes a uniformly random bit. Let Y = 1− X .

X 6= Y , in fact Pr[X = Y ] = 0,Pr[X = 0] = Pr[Y = 0] = 1/2, andPr[X = 1] = Pr[Y = 1] = 1/2.

Example (Probability distributions)

{u : u ∈R {0, 1}} = {0 7→ 12 , 1 7→

12} = {1− u : u ∈R {0, 1}}

{t + u : t, u ∈R {0, 1}} = {0 7→ 14 , 1 7→

12 , 2 7→

14}

{tu : t, u ∈R {0, 1}} = {0 7→ 34 , 1 7→

14}

Page 50: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

31/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

NotationDiscrete random variables X ,Y ,Z , . . . with a finite range V .

Probability distribution of X : (i) 0 ≤ Pr[X = v ] ≤ 1 for all v ∈ V ,(ii)

∑v∈V Pr[X = v ] = 1,

X ∈R V: random variable X distributed uniformly on V , Pr[X = v ] = 1/|V |.

Example (Random bits)X ∈R {0, 1} denotes a uniformly random bit. Let Y = 1− X .

X 6= Y , in fact Pr[X = Y ] = 0,Pr[X = 0] = Pr[Y = 0] = 1/2, andPr[X = 1] = Pr[Y = 1] = 1/2.

Example (Probability distributions)

{u : u ∈R {0, 1}} = {0 7→ 12 , 1 7→

12} = {1− u : u ∈R {0, 1}}

{t + u : t, u ∈R {0, 1}} = {0 7→ 14 , 1 7→

12 , 2 7→

14}

{tu : t, u ∈R {0, 1}} = {0 7→ 34 , 1 7→

14}

Page 51: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

32/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Statistical Distance

Definition 1.6The statistical distance ∆(X ; Y ) between random variables X and Y is defined as

∆(X ; Y ) = 12∑v∈V

∣∣Pr[X = v ]− Pr[Y = v ]∣∣,

where V denotes the set of possible values for X and Y .

Statistical distance is a bounded metric in the following sense.

Proposition 1.7For random variables X ,Y ,Z::

(i) 0 ≤ ∆(X ; Y ) ≤ 1, “nonnegativity” and “boundedness”(ii) ∆(X ; Y ) = 0 ⇔ ∀v∈V Pr[X = v ] = Pr[Y = v ], “identical distributions”(iii) ∆(X ; Y ) = 1 ⇔ ∀v∈V Pr[X = v ] Pr[Y = v ] = 0, “disjoint distributions”(iv) ∆(X ; Y ) = ∆(Y ; X), “symmetry”(v) ∆(X ; Z) ≤ ∆(X ; Y ) + ∆(Y ; Z). “triangle inequality”

Page 52: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

32/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Statistical Distance

Definition 1.6The statistical distance ∆(X ; Y ) between random variables X and Y is defined as

∆(X ; Y ) = 12∑v∈V

∣∣Pr[X = v ]− Pr[Y = v ]∣∣,

where V denotes the set of possible values for X and Y .

Statistical distance is a bounded metric in the following sense.

Proposition 1.7For random variables X ,Y ,Z::

(i) 0 ≤ ∆(X ; Y ) ≤ 1, “nonnegativity” and “boundedness”(ii) ∆(X ; Y ) = 0 ⇔ ∀v∈V Pr[X = v ] = Pr[Y = v ], “identical distributions”(iii) ∆(X ; Y ) = 1 ⇔ ∀v∈V Pr[X = v ] Pr[Y = v ] = 0, “disjoint distributions”(iv) ∆(X ; Y ) = ∆(Y ; X), “symmetry”(v) ∆(X ; Z) ≤ ∆(X ; Y ) + ∆(Y ; Z). “triangle inequality”

Page 53: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

33/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

House Edge (Advantage) in French Roulette

0 5 10 15 20 25 30 35

0.005

0.010

0.015

0.020

0.025

∆(X ; Y ) = 137 ≈ 0.027 for

{X ∈R {1, . . . , 36}Y ∈R {0, . . . , 36}

Page 54: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

34/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Statistical Distance: Equivalent Characterizations

Proposition 1.8For random variables X and Y , ∆(X ; Y ) is equal to each of:

(i)∑

v∈V + Pr[X = v ]− Pr[Y = v ] with V + = {v∈V : Pr[X=v ]>Pr[Y =v ]},(ii)

∑v∈V Pr[X = v ] .− Pr[Y = v ] with x .− y = max(x − y , 0),

(iii) 1−∑

v∈V min(Pr[X = v ],Pr[Y = v ]),(iv) maxW⊆V

∣∣Pr[X ∈W ]− Pr[Y ∈W ]∣∣.

Exercise 1.2.5(a) Prove Proposition 1.7. (b) Prove Proposition 1.8.

Exercise 1.2.6Prove that ∆(f (X); f (Y )) ≤ ∆(X ; Y ) for any function f defined on V .

Page 55: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

34/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Statistical Distance: Equivalent Characterizations

Proposition 1.8For random variables X and Y , ∆(X ; Y ) is equal to each of:

(i)∑

v∈V + Pr[X = v ]− Pr[Y = v ] with V + = {v∈V : Pr[X=v ]>Pr[Y =v ]},(ii)

∑v∈V Pr[X = v ] .− Pr[Y = v ] with x .− y = max(x − y , 0),

(iii) 1−∑

v∈V min(Pr[X = v ],Pr[Y = v ]),(iv) maxW⊆V

∣∣Pr[X ∈W ]− Pr[Y ∈W ]∣∣.

Exercise 1.2.5(a) Prove Proposition 1.7. (b) Prove Proposition 1.8.

Exercise 1.2.6Prove that ∆(f (X); f (Y )) ≤ ∆(X ; Y ) for any function f defined on V .

Page 56: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

34/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Statistical Distance: Equivalent Characterizations

Proposition 1.8For random variables X and Y , ∆(X ; Y ) is equal to each of:

(i)∑

v∈V + Pr[X = v ]− Pr[Y = v ] with V + = {v∈V : Pr[X=v ]>Pr[Y =v ]},(ii)

∑v∈V Pr[X = v ] .− Pr[Y = v ] with x .− y = max(x − y , 0),

(iii) 1−∑

v∈V min(Pr[X = v ],Pr[Y = v ]),(iv) maxW⊆V

∣∣Pr[X ∈W ]− Pr[Y ∈W ]∣∣.

Exercise 1.2.5(a) Prove Proposition 1.7. (b) Prove Proposition 1.8.

Exercise 1.2.6Prove that ∆(f (X); f (Y )) ≤ ∆(X ; Y ) for any function f defined on V .

Page 57: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

34/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Statistical Distance: Equivalent Characterizations

Proposition 1.8For random variables X and Y , ∆(X ; Y ) is equal to each of:

(i)∑

v∈V + Pr[X = v ]− Pr[Y = v ] with V + = {v∈V : Pr[X=v ]>Pr[Y =v ]},(ii)

∑v∈V Pr[X = v ] .− Pr[Y = v ] with x .− y = max(x − y , 0),

(iii) 1−∑

v∈V min(Pr[X = v ],Pr[Y = v ]),(iv) maxW⊆V

∣∣Pr[X ∈W ]− Pr[Y ∈W ]∣∣.

Exercise 1.2.5(a) Prove Proposition 1.7. (b) Prove Proposition 1.8.

Exercise 1.2.6Prove that ∆(f (X); f (Y )) ≤ ∆(X ; Y ) for any function f defined on V .

Page 58: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

34/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Statistical Distance: Equivalent Characterizations

Proposition 1.8For random variables X and Y , ∆(X ; Y ) is equal to each of:

(i)∑

v∈V + Pr[X = v ]− Pr[Y = v ] with V + = {v∈V : Pr[X=v ]>Pr[Y =v ]},(ii)

∑v∈V Pr[X = v ] .− Pr[Y = v ] with x .− y = max(x − y , 0),

(iii) 1−∑

v∈V min(Pr[X = v ],Pr[Y = v ]),(iv) maxW⊆V

∣∣Pr[X ∈W ]− Pr[Y ∈W ]∣∣.

Exercise 1.2.5(a) Prove Proposition 1.7. (b) Prove Proposition 1.8.

Exercise 1.2.6Prove that ∆(f (X); f (Y )) ≤ ∆(X ; Y ) for any function f defined on V .

Page 59: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

34/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Statistical Distance: Equivalent Characterizations

Proposition 1.8For random variables X and Y , ∆(X ; Y ) is equal to each of:

(i)∑

v∈V + Pr[X = v ]− Pr[Y = v ] with V + = {v∈V : Pr[X=v ]>Pr[Y =v ]},(ii)

∑v∈V Pr[X = v ] .− Pr[Y = v ] with x .− y = max(x − y , 0),

(iii) 1−∑

v∈V min(Pr[X = v ],Pr[Y = v ]),(iv) maxW⊆V

∣∣Pr[X ∈W ]− Pr[Y ∈W ]∣∣.

Exercise 1.2.5(a) Prove Proposition 1.7. (b) Prove Proposition 1.8.

Exercise 1.2.6Prove that ∆(f (X); f (Y )) ≤ ∆(X ; Y ) for any function f defined on V .

Page 60: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

35/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Statistical Distance: More Exercises

Exercise 1.2.7For n, d ≥ 1, consider distributions X and Y given by

X = {u : u ∈R {0, . . . , n − 1},Y = {u + d : u ∈R {0, . . . , n − 1}}.

Compute ∆(X ; Y ), assuming d ≤ n. Also, what is ∆(X ; Y ) if d > n?

Exercise 1.2.8For n ≥ 1, consider distributions X ,Y ,Z given by

X = {u : u ∈R {0, . . . , n − 1}}Y = {2u : u ∈R {0, . . . , n − 1}}Z = {2u + 1 : u ∈R {0, . . . , n − 1}}.

Show that ∆(Y ; Z) = 1. Show that ∆(X ; Y ) = ∆(X ; Z) = 1/2 for even n, andalso determine ∆(X ; Y ) and ∆(X ; Z) for odd n.

Page 61: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

36/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Statistical Distance: More Exercises

Exercise 1.2.9For n ≥ 1, let X ∈R Zn and Y ∈R Z∗n . (a) Determine ∆(X ; Y ). (b) Show that∆(X + Y ; XY ) = 0, where addition and multiplication are done modulo n.

Exercise 1.2.10For n prime, let h and M0 be arbitrary, fixed elements of Gn = 〈g〉, h 6= 1.Consider distributions X, Y , and Z given by

X = {(A,B) : A ∈R 〈g〉,B ∈R 〈g〉},Y = {(gu, huM) : u ∈R Zn,M ∈R 〈g〉},Z = {(gu, huM0) : u ∈R Zn}.

Show that ∆(X ; Y ) = 0 and that ∆(Y ; Z) = 1− 1/n. Show also that∆(X ; Z) = 1− 1/n, using triangle inequalities.

Exercise 1.2.11For n ≥ d ≥ 1, let random variable X take on values in {0, . . . , d−1}, and letU∈R {0, . . ., n−1}. Show ∆(U; X+U)≤(d−1)/n, and that this bound is tight.

Page 62: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

37/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Complexity Classes P vs NP

P: deterministic Polynomial time “easy to solve”NP: Nondeterministic Polynomial time “easy to check”

Clearly: P ⊆ NP

Long-standing conjecture: P 6= NP

$1,000,000 Millennium Prize Problemof the Clay Mathematics Institute

NP

NP-intermediate 6= ∅(R. Ladner, 1975)

P

NP-complete

Problems in P: easy, e.g., Sorting, Primality, ...NP-intermediate problems: DL, Factoring, Graph Isomorphism (all conjectured!)NP-complete problems: hardest in NP, e.g., 3SAT, Hamiltonian Circuit, ...(NP-hard problems: ≥ NP-complete, e.g., Traveling Salesman, ...)

Page 63: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

37/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Complexity Classes P vs NP

P: deterministic Polynomial time “easy to solve”NP: Nondeterministic Polynomial time “easy to check”

Clearly: P ⊆ NP

Long-standing conjecture: P 6= NP

$1,000,000 Millennium Prize Problemof the Clay Mathematics Institute

NP

NP-intermediate 6= ∅(R. Ladner, 1975)

P

NP-complete

Problems in P: easy, e.g., Sorting, Primality, ...NP-intermediate problems: DL, Factoring, Graph Isomorphism (all conjectured!)NP-complete problems: hardest in NP, e.g., 3SAT, Hamiltonian Circuit, ...(NP-hard problems: ≥ NP-complete, e.g., Traveling Salesman, ...)

Page 64: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

37/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Complexity Classes P vs NP

P: deterministic Polynomial time “easy to solve”NP: Nondeterministic Polynomial time “easy to check”

Clearly: P ⊆ NP

Long-standing conjecture: P 6= NP

$1,000,000 Millennium Prize Problemof the Clay Mathematics Institute

NP

NP-intermediate 6= ∅(R. Ladner, 1975)

P

NP-complete

Problems in P: easy, e.g., Sorting, Primality, ...NP-intermediate problems: DL, Factoring, Graph Isomorphism (all conjectured!)NP-complete problems: hardest in NP, e.g., 3SAT, Hamiltonian Circuit, ...(NP-hard problems: ≥ NP-complete, e.g., Traveling Salesman, ...)

Page 65: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

37/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Complexity Classes P vs NP

P: deterministic Polynomial time “easy to solve”NP: Nondeterministic Polynomial time “easy to check”

Clearly: P ⊆ NP

Long-standing conjecture: P 6= NP

$1,000,000 Millennium Prize Problemof the Clay Mathematics Institute

NP

NP-intermediate 6= ∅(R. Ladner, 1975)

P

NP-complete

Problems in P: easy, e.g., Sorting, Primality, ...NP-intermediate problems: DL, Factoring, Graph Isomorphism (all conjectured!)NP-complete problems: hardest in NP, e.g., 3SAT, Hamiltonian Circuit, ...(NP-hard problems: ≥ NP-complete, e.g., Traveling Salesman, ...)

Page 66: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

38/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Worst-Case vs Average-Case Complexity

NP-complete problems: hard in the worst case.

Over all problem instances of a given size.

But potentially easy in the average case!!

Uniformly random problem instances of a given size may be easy.(Chances of hitting worst-case may be negligible.)

Page 67: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

38/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Worst-Case vs Average-Case Complexity

NP-complete problems: hard in the worst case.

Over all problem instances of a given size.

But potentially easy in the average case!!

Uniformly random problem instances of a given size may be easy.(Chances of hitting worst-case may be negligible.)

Page 68: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

39/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Probabilistic Turing Machines

Church’s thesis: “Turing machines are powerful enoughto describe any kind of algorithm”

Turing machine: finite control part plus an infinite data tape.

Three important types of Turing machines:Deterministic: unique successor configuration.Nondeterministic: one of several possible successor configurations.Probabilistic: one of several possible successor configurations,

chosen uniformly at random.

Probabilistic Turing machines ⇔ probabilistic/randomized algorithms(deterministic Turing machines extended with random tape)

Page 69: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

39/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Probabilistic Turing Machines

Church’s thesis: “Turing machines are powerful enoughto describe any kind of algorithm”

Turing machine: finite control part plus an infinite data tape.

Three important types of Turing machines:Deterministic: unique successor configuration.Nondeterministic: one of several possible successor configurations.Probabilistic: one of several possible successor configurations,

chosen uniformly at random.

Probabilistic Turing machines ⇔ probabilistic/randomized algorithms(deterministic Turing machines extended with random tape)

Page 70: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

39/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Probabilistic Turing Machines

Church’s thesis: “Turing machines are powerful enoughto describe any kind of algorithm”

Turing machine: finite control part plus an infinite data tape.

Three important types of Turing machines:Deterministic: unique successor configuration.Nondeterministic: one of several possible successor configurations.Probabilistic: one of several possible successor configurations,

chosen uniformly at random.

Probabilistic Turing machines ⇔ probabilistic/randomized algorithms(deterministic Turing machines extended with random tape)

Page 71: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

40/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Complexity Class BPP

Complexity class BPP: problems solved with Bounded-errorby Probabilistic Polynomial time (p.p.t.) Turing machines

For every YES-instance: Pr[“accept”] ≥ 2/3For every NO-instance: Pr[“accept”] ≤ 1/3

Probability over all internal random choices (random tapes).

Clearly: P ⊆ BPPConjectured: P = BPP

Thus, BPP class of “easy” (efficiently solvable) problems.

Note: relation of BPP versus NP not known.

Page 72: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

40/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.2.1 Number Theory1.2.2 Group Theory1.2.3 Probability Theory1.2.4 Complexity Theory

Complexity Class BPP

Complexity class BPP: problems solved with Bounded-errorby Probabilistic Polynomial time (p.p.t.) Turing machines

For every YES-instance: Pr[“accept”] ≥ 2/3For every NO-instance: Pr[“accept”] ≤ 1/3

Probability over all internal random choices (random tapes).

Clearly: P ⊆ BPPConjectured: P = BPP

Thus, BPP class of “easy” (efficiently solvable) problems.

Note: relation of BPP versus NP not known.

Page 73: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

41/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Discrete Log and Diffie-Hellman Assumptions

Definition 1.9 (Discrete Logarithm (DL) assumption)For group 〈g〉, hard to compute x given random group element gx .

Definition 1.10 ((Computational) Diffie-Hellman (DH) assumption)For group 〈g〉, hard to compute g xy given random group elements gx , gy .

Definition 1.11 (Decisional Diffie-Hellman (DDH) assumption)For group 〈g〉, hard to distinguish gxy from random group element g z

given random group elements gx , gy .

Evidently: DDH assumption ⇒ DH assumption ⇒ DL assumption.

Page 74: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

41/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Discrete Log and Diffie-Hellman Assumptions

Definition 1.9 (Discrete Logarithm (DL) assumption)For group 〈g〉, hard to compute x given random group element gx .

Definition 1.10 ((Computational) Diffie-Hellman (DH) assumption)For group 〈g〉, hard to compute g xy given random group elements gx , gy .

Definition 1.11 (Decisional Diffie-Hellman (DDH) assumption)For group 〈g〉, hard to distinguish gxy from random group element g z

given random group elements gx , gy .

Evidently: DDH assumption ⇒ DH assumption ⇒ DL assumption.

Page 75: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

41/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Discrete Log and Diffie-Hellman Assumptions

Definition 1.9 (Discrete Logarithm (DL) assumption)For group 〈g〉, hard to compute x given random group element gx .

Definition 1.10 ((Computational) Diffie-Hellman (DH) assumption)For group 〈g〉, hard to compute g xy given random group elements gx , gy .

Definition 1.11 (Decisional Diffie-Hellman (DDH) assumption)For group 〈g〉, hard to distinguish gxy from random group element g z

given random group elements gx , gy .

Evidently: DDH assumption ⇒ DH assumption ⇒ DL assumption.

Page 76: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

41/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Discrete Log and Diffie-Hellman Assumptions

Definition 1.9 (Discrete Logarithm (DL) assumption)For group 〈g〉, hard to compute x given random group element gx .

Definition 1.10 ((Computational) Diffie-Hellman (DH) assumption)For group 〈g〉, hard to compute g xy given random group elements gx , gy .

Definition 1.11 (Decisional Diffie-Hellman (DDH) assumption)For group 〈g〉, hard to distinguish gxy from random group element g z

given random group elements gx , gy .

Evidently: DDH assumption ⇒ DH assumption ⇒ DL assumption.

Page 77: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

42/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Negligible Function

Definition 1.12Nonnegative function f : N→ R is negligible if for every γ ∈ N there exists ak0 ∈ N such that for all k ≥ k0, f (k) ≤ 1/kγ .

ExampleNegligible:

1/2k = 2−k “exponentially fast to 0”

1/2√

k = 2−√

k “sub-exponentially fast to 0”1/k log k = k− log k “quasi-polynomially fast to 0”

Not negligible:1/k = k−1 “linearly fast to 0”1/k2 = k−2 “quadratically fast to 0”1/k100 = k−100 “polynomially fast to 0”

Page 78: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

43/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Indistinguishability

Definition 1.13Let X = {Xi} and Y = {Yi} be two families of random variables.Then X and Y are:

(i) perfectly indistinguishable if ∆(Xi ; Yi ) = 0(ii) statistically indistinguishable if ∆(Xi ; Yi ) is negligible(iii) computationally indistinguishable if ∆(D(Xi ); D(Yi )) is negligible for all

p.p.t. Boolean distinguishers D

Advantage AdvD(Xi ,Yi ) =∣∣Pr[D(Xi ) = 1]− Pr[D(Yi ) = 1]

∣∣Exercise 1.3.1Show AdvD(Xi ,Yi ) = ∆(D(Xi ); D(Yi )) for any Boolean distinguisher D.

Exercise 1.3.2Show that computational indistinguishability is implied by statisticalindistinguishability. Hint: use Proposition 1.8(iv), cf. Exercise 1.2.6.

Page 79: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

43/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Indistinguishability

Definition 1.13Let X = {Xi} and Y = {Yi} be two families of random variables.Then X and Y are:

(i) perfectly indistinguishable if ∆(Xi ; Yi ) = 0(ii) statistically indistinguishable if ∆(Xi ; Yi ) is negligible(iii) computationally indistinguishable if ∆(D(Xi ); D(Yi )) is negligible for all

p.p.t. Boolean distinguishers D

Advantage AdvD(Xi ,Yi ) =∣∣Pr[D(Xi ) = 1]− Pr[D(Yi ) = 1]

∣∣Exercise 1.3.1Show AdvD(Xi ,Yi ) = ∆(D(Xi ); D(Yi )) for any Boolean distinguisher D.

Exercise 1.3.2Show that computational indistinguishability is implied by statisticalindistinguishability. Hint: use Proposition 1.8(iv), cf. Exercise 1.2.6.

Page 80: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

43/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Indistinguishability

Definition 1.13Let X = {Xi} and Y = {Yi} be two families of random variables.Then X and Y are:

(i) perfectly indistinguishable if ∆(Xi ; Yi ) = 0(ii) statistically indistinguishable if ∆(Xi ; Yi ) is negligible(iii) computationally indistinguishable if ∆(D(Xi ); D(Yi )) is negligible for all

p.p.t. Boolean distinguishers D

Advantage AdvD(Xi ,Yi ) =∣∣Pr[D(Xi ) = 1]− Pr[D(Yi ) = 1]

∣∣Exercise 1.3.1Show AdvD(Xi ,Yi ) = ∆(D(Xi ); D(Yi )) for any Boolean distinguisher D.

Exercise 1.3.2Show that computational indistinguishability is implied by statisticalindistinguishability. Hint: use Proposition 1.8(iv), cf. Exercise 1.2.6.

Page 81: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

43/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Indistinguishability

Definition 1.13Let X = {Xi} and Y = {Yi} be two families of random variables.Then X and Y are:

(i) perfectly indistinguishable if ∆(Xi ; Yi ) = 0(ii) statistically indistinguishable if ∆(Xi ; Yi ) is negligible(iii) computationally indistinguishable if ∆(D(Xi ); D(Yi )) is negligible for all

p.p.t. Boolean distinguishers D

Advantage AdvD(Xi ,Yi ) =∣∣Pr[D(Xi ) = 1]− Pr[D(Yi ) = 1]

∣∣Exercise 1.3.1Show AdvD(Xi ,Yi ) = ∆(D(Xi ); D(Yi )) for any Boolean distinguisher D.

Exercise 1.3.2Show that computational indistinguishability is implied by statisticalindistinguishability. Hint: use Proposition 1.8(iv), cf. Exercise 1.2.6.

Page 82: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

43/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Indistinguishability

Definition 1.13Let X = {Xi} and Y = {Yi} be two families of random variables.Then X and Y are:

(i) perfectly indistinguishable if ∆(Xi ; Yi ) = 0(ii) statistically indistinguishable if ∆(Xi ; Yi ) is negligible(iii) computationally indistinguishable if ∆(D(Xi ); D(Yi )) is negligible for all

p.p.t. Boolean distinguishers D

Advantage AdvD(Xi ,Yi ) =∣∣Pr[D(Xi ) = 1]− Pr[D(Yi ) = 1]

∣∣Exercise 1.3.1Show AdvD(Xi ,Yi ) = ∆(D(Xi ); D(Yi )) for any Boolean distinguisher D.

Exercise 1.3.2Show that computational indistinguishability is implied by statisticalindistinguishability. Hint: use Proposition 1.8(iv), cf. Exercise 1.2.6.

Page 83: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

43/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Indistinguishability

Definition 1.13Let X = {Xi} and Y = {Yi} be two families of random variables.Then X and Y are:

(i) perfectly indistinguishable if ∆(Xi ; Yi ) = 0(ii) statistically indistinguishable if ∆(Xi ; Yi ) is negligible(iii) computationally indistinguishable if ∆(D(Xi ); D(Yi )) is negligible for all

p.p.t. Boolean distinguishers D

Advantage AdvD(Xi ,Yi ) =∣∣Pr[D(Xi ) = 1]− Pr[D(Yi ) = 1]

∣∣Exercise 1.3.1Show AdvD(Xi ,Yi ) = ∆(D(Xi ); D(Yi )) for any Boolean distinguisher D.

Exercise 1.3.2Show that computational indistinguishability is implied by statisticalindistinguishability. Hint: use Proposition 1.8(iv), cf. Exercise 1.2.6.

Page 84: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

44/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Boolean Distinguisher D

Xi oYi o

o{

1 “I guess Xi”0 “I guess Yi”

Distinguisher samples from fixed (but unknown) “source”, either Xi or Yi .

For computational indistinguishability, distinguisher should failusing any p.p.t. statistical test.

Page 85: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

45/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

DDH Assumption (Definition 1.11)

X〈g〉 = {(g x , gy , gxy ) : x , y ∈R Zn} “DH triples”Y〈g〉 = {(g x , gy , g z ) : x , y , z ∈R Zn, z 6= xy} “non-DH triples”

DDH assumption: X〈g〉 and Y〈g〉 are computationally indistinguishable.Also possible to take:

Y ′〈g〉 = {(gx , gy , g z ) : x , y , z ∈R Zn} “random triples”

∆(Y ; Y ′) = 12

(∑x,y,z∈Zn

∣∣Pr[Y = (gx , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣)

= 12

(∑x,y,z∈Zn,z 6=xy

∣∣Pr[Y = (g x , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣

+∑

x,y,z∈Zn,z=xy

∣∣Pr[Y = (gx , gy , g z )]− Pr[Y ′ = (g x , g y , g z )]∣∣)

= 12

((n3 − n2)

∣∣ 1n3−n2 − 1

n3

∣∣+ n2∣∣0− 1

n3

∣∣)= 1/n.

Since n is exponentially large in security parameter,statistical distance of 1/n is negligible.

Page 86: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

45/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

DDH Assumption (Definition 1.11)

X〈g〉 = {(g x , gy , gxy ) : x , y ∈R Zn} “DH triples”Y〈g〉 = {(g x , gy , g z ) : x , y , z ∈R Zn, z 6= xy} “non-DH triples”

DDH assumption: X〈g〉 and Y〈g〉 are computationally indistinguishable.Also possible to take:

Y ′〈g〉 = {(gx , gy , g z ) : x , y , z ∈R Zn} “random triples”

∆(Y ; Y ′) = 12

(∑x,y,z∈Zn

∣∣Pr[Y = (gx , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣)

= 12

(∑x,y,z∈Zn,z 6=xy

∣∣Pr[Y = (g x , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣

+∑

x,y,z∈Zn,z=xy

∣∣Pr[Y = (gx , gy , g z )]− Pr[Y ′ = (g x , g y , g z )]∣∣)

= 12

((n3 − n2)

∣∣ 1n3−n2 − 1

n3

∣∣+ n2∣∣0− 1

n3

∣∣)= 1/n.

Since n is exponentially large in security parameter,statistical distance of 1/n is negligible.

Page 87: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

45/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

DDH Assumption (Definition 1.11)

X〈g〉 = {(g x , gy , gxy ) : x , y ∈R Zn} “DH triples”Y〈g〉 = {(g x , gy , g z ) : x , y , z ∈R Zn, z 6= xy} “non-DH triples”

DDH assumption: X〈g〉 and Y〈g〉 are computationally indistinguishable.Also possible to take:

Y ′〈g〉 = {(gx , gy , g z ) : x , y , z ∈R Zn} “random triples”

∆(Y ; Y ′) = 12

(∑x,y,z∈Zn

∣∣Pr[Y = (gx , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣)

= 12

(∑x,y,z∈Zn,z 6=xy

∣∣Pr[Y = (g x , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣

+∑

x,y,z∈Zn,z=xy

∣∣Pr[Y = (gx , gy , g z )]− Pr[Y ′ = (g x , g y , g z )]∣∣)

= 12

((n3 − n2)

∣∣ 1n3−n2 − 1

n3

∣∣+ n2∣∣0− 1

n3

∣∣)= 1/n.

Since n is exponentially large in security parameter,statistical distance of 1/n is negligible.

Page 88: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

45/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

DDH Assumption (Definition 1.11)

X〈g〉 = {(g x , gy , gxy ) : x , y ∈R Zn} “DH triples”Y〈g〉 = {(g x , gy , g z ) : x , y , z ∈R Zn, z 6= xy} “non-DH triples”

DDH assumption: X〈g〉 and Y〈g〉 are computationally indistinguishable.Also possible to take:

Y ′〈g〉 = {(gx , gy , g z ) : x , y , z ∈R Zn} “random triples”

∆(Y ; Y ′) = 12

(∑x,y,z∈Zn

∣∣Pr[Y = (gx , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣)

= 12

(∑x,y,z∈Zn,z 6=xy

∣∣Pr[Y = (g x , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣

+∑

x,y,z∈Zn,z=xy

∣∣Pr[Y = (gx , gy , g z )]− Pr[Y ′ = (g x , g y , g z )]∣∣)

= 12

((n3 − n2)

∣∣ 1n3−n2 − 1

n3

∣∣+ n2∣∣0− 1

n3

∣∣)= 1/n.

Since n is exponentially large in security parameter,statistical distance of 1/n is negligible.

Page 89: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

45/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

DDH Assumption (Definition 1.11)

X〈g〉 = {(g x , gy , gxy ) : x , y ∈R Zn} “DH triples”Y〈g〉 = {(g x , gy , g z ) : x , y , z ∈R Zn, z 6= xy} “non-DH triples”

DDH assumption: X〈g〉 and Y〈g〉 are computationally indistinguishable.Also possible to take:

Y ′〈g〉 = {(gx , gy , g z ) : x , y , z ∈R Zn} “random triples”

∆(Y ; Y ′) = 12

(∑x,y,z∈Zn

∣∣Pr[Y = (gx , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣)

= 12

(∑x,y,z∈Zn,z 6=xy

∣∣Pr[Y = (g x , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣

+∑

x,y,z∈Zn,z=xy

∣∣Pr[Y = (gx , gy , g z )]− Pr[Y ′ = (g x , g y , g z )]∣∣)

= 12

((n3 − n2)

∣∣ 1n3−n2 − 1

n3

∣∣+ n2∣∣0− 1

n3

∣∣)= 1/n.

Since n is exponentially large in security parameter,statistical distance of 1/n is negligible.

Page 90: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

45/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

DDH Assumption (Definition 1.11)

X〈g〉 = {(g x , gy , gxy ) : x , y ∈R Zn} “DH triples”Y〈g〉 = {(g x , gy , g z ) : x , y , z ∈R Zn, z 6= xy} “non-DH triples”

DDH assumption: X〈g〉 and Y〈g〉 are computationally indistinguishable.Also possible to take:

Y ′〈g〉 = {(gx , gy , g z ) : x , y , z ∈R Zn} “random triples”

∆(Y ; Y ′) = 12

(∑x,y,z∈Zn

∣∣Pr[Y = (gx , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣)

= 12

(∑x,y,z∈Zn,z 6=xy

∣∣Pr[Y = (g x , g y , g z )]− Pr[Y ′ = (gx , gy , g z )]∣∣

+∑

x,y,z∈Zn,z=xy

∣∣Pr[Y = (gx , gy , g z )]− Pr[Y ′ = (g x , g y , g z )]∣∣)

= 12

((n3 − n2)

∣∣ 1n3−n2 − 1

n3

∣∣+ n2∣∣0− 1

n3

∣∣)= 1/n.

Since n is exponentially large in security parameter,statistical distance of 1/n is negligible.

Page 91: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

46/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

DDH Assumption

X = {(gx , gy , gxy ) : x , y ∈R Zn}Y = {(gx , gy , g z ) : x , y , z ∈R Zn, z 6= xy}.

∆(X ; Y ) = 12

(∑x,y,z∈Zn

∣∣Pr[X = (g x , g y , g z )]− Pr[Y = (g x , g y , g z )]∣∣)

= 12

(∑x,y,z∈Zn,z=xy

∣∣Pr[X = (g x , g y , g z )]− Pr[Y = (g x , gy , g z )]∣∣

+∑

x,y,z∈Zn,z 6=xy

∣∣Pr[X = (gx , gy , g z )]− Pr[Y = (gx , g y , g z )]∣∣)

= 12

(n2∣∣ 1

n2 − 0∣∣+ (n3 − n2)

∣∣0− 1n3−n2

∣∣)= 1.

∆(X ; Y ) = 1 not surprising, since X and Y are disjoint!Triangle inequality: ∆(X ; Y ′) ≥ ∆(X ; Y )−∆(Y ; Y ′) = 1− 1/n.

Exercise 1.3.3Check that actually ∆(X ; Y ′) = 1− 1/n.

Page 92: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

46/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

DDH Assumption

X = {(gx , gy , gxy ) : x , y ∈R Zn}Y = {(gx , gy , g z ) : x , y , z ∈R Zn, z 6= xy}.

∆(X ; Y ) = 12

(∑x,y,z∈Zn

∣∣Pr[X = (g x , g y , g z )]− Pr[Y = (g x , g y , g z )]∣∣)

= 12

(∑x,y,z∈Zn,z=xy

∣∣Pr[X = (g x , g y , g z )]− Pr[Y = (g x , gy , g z )]∣∣

+∑

x,y,z∈Zn,z 6=xy

∣∣Pr[X = (gx , gy , g z )]− Pr[Y = (gx , g y , g z )]∣∣)

= 12

(n2∣∣ 1

n2 − 0∣∣+ (n3 − n2)

∣∣0− 1n3−n2

∣∣)= 1.

∆(X ; Y ) = 1 not surprising, since X and Y are disjoint!Triangle inequality: ∆(X ; Y ′) ≥ ∆(X ; Y )−∆(Y ; Y ′) = 1− 1/n.

Exercise 1.3.3Check that actually ∆(X ; Y ′) = 1− 1/n.

Page 93: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

46/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

DDH Assumption

X = {(gx , gy , gxy ) : x , y ∈R Zn}Y = {(gx , gy , g z ) : x , y , z ∈R Zn, z 6= xy}.

∆(X ; Y ) = 12

(∑x,y,z∈Zn

∣∣Pr[X = (g x , g y , g z )]− Pr[Y = (g x , g y , g z )]∣∣)

= 12

(∑x,y,z∈Zn,z=xy

∣∣Pr[X = (g x , g y , g z )]− Pr[Y = (g x , gy , g z )]∣∣

+∑

x,y,z∈Zn,z 6=xy

∣∣Pr[X = (gx , gy , g z )]− Pr[Y = (gx , g y , g z )]∣∣)

= 12

(n2∣∣ 1

n2 − 0∣∣+ (n3 − n2)

∣∣0− 1n3−n2

∣∣)= 1.

∆(X ; Y ) = 1 not surprising, since X and Y are disjoint!Triangle inequality: ∆(X ; Y ′) ≥ ∆(X ; Y )−∆(Y ; Y ′) = 1− 1/n.

Exercise 1.3.3Check that actually ∆(X ; Y ′) = 1− 1/n.

Page 94: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

46/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

DDH Assumption

X = {(gx , gy , gxy ) : x , y ∈R Zn}Y = {(gx , gy , g z ) : x , y , z ∈R Zn, z 6= xy}.

∆(X ; Y ) = 12

(∑x,y,z∈Zn

∣∣Pr[X = (g x , g y , g z )]− Pr[Y = (g x , g y , g z )]∣∣)

= 12

(∑x,y,z∈Zn,z=xy

∣∣Pr[X = (g x , g y , g z )]− Pr[Y = (g x , gy , g z )]∣∣

+∑

x,y,z∈Zn,z 6=xy

∣∣Pr[X = (gx , gy , g z )]− Pr[Y = (gx , g y , g z )]∣∣)

= 12

(n2∣∣ 1

n2 − 0∣∣+ (n3 − n2)

∣∣0− 1n3−n2

∣∣)= 1.

∆(X ; Y ) = 1 not surprising, since X and Y are disjoint!Triangle inequality: ∆(X ; Y ′) ≥ ∆(X ; Y )−∆(Y ; Y ′) = 1− 1/n.

Exercise 1.3.3Check that actually ∆(X ; Y ′) = 1− 1/n.

Page 95: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

47/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducibility

Definition 1.14Problem is (perfectly) random self-reducible if any instance I can be solved bythese three steps:

1 Transform instance I into uniformly random instance I ′.2 Solve instance I ′.3 Extract solution for I from solution for I ′.

Only steps 1 and 3 are required to run in polynomial time.

Commonly random self-reducible:DL/DH/DDH problems for fixed DL setting 〈g〉.RSA-based problems for fixed RSA modulus N.

Likely to be not random self-reducible:Factoring integers of fixed bit length.Any NP-complete problem.

Page 96: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

47/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducibility

Definition 1.14Problem is (perfectly) random self-reducible if any instance I can be solved bythese three steps:

1 Transform instance I into uniformly random instance I ′.2 Solve instance I ′.3 Extract solution for I from solution for I ′.

Only steps 1 and 3 are required to run in polynomial time.

Commonly random self-reducible:DL/DH/DDH problems for fixed DL setting 〈g〉.RSA-based problems for fixed RSA modulus N.

Likely to be not random self-reducible:Factoring integers of fixed bit length.Any NP-complete problem.

Page 97: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

47/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducibility

Definition 1.14Problem is (perfectly) random self-reducible if any instance I can be solved bythese three steps:

1 Transform instance I into uniformly random instance I ′.2 Solve instance I ′.3 Extract solution for I from solution for I ′.

Only steps 1 and 3 are required to run in polynomial time.

Commonly random self-reducible:DL/DH/DDH problems for fixed DL setting 〈g〉.RSA-based problems for fixed RSA modulus N.

Likely to be not random self-reducible:Factoring integers of fixed bit length.Any NP-complete problem.

Page 98: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

47/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducibility

Definition 1.14Problem is (perfectly) random self-reducible if any instance I can be solved bythese three steps:

1 Transform instance I into uniformly random instance I ′.2 Solve instance I ′.3 Extract solution for I from solution for I ′.

Only steps 1 and 3 are required to run in polynomial time.

Commonly random self-reducible:DL/DH/DDH problems for fixed DL setting 〈g〉.RSA-based problems for fixed RSA modulus N.

Likely to be not random self-reducible:Factoring integers of fixed bit length.Any NP-complete problem.

Page 99: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

47/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducibility

Definition 1.14Problem is (perfectly) random self-reducible if any instance I can be solved bythese three steps:

1 Transform instance I into uniformly random instance I ′.2 Solve instance I ′.3 Extract solution for I from solution for I ′.

Only steps 1 and 3 are required to run in polynomial time.

Commonly random self-reducible:DL/DH/DDH problems for fixed DL setting 〈g〉.RSA-based problems for fixed RSA modulus N.

Likely to be not random self-reducible:Factoring integers of fixed bit length.Any NP-complete problem.

Page 100: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

47/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducibility

Definition 1.14Problem is (perfectly) random self-reducible if any instance I can be solved bythese three steps:

1 Transform instance I into uniformly random instance I ′.2 Solve instance I ′.3 Extract solution for I from solution for I ′.

Only steps 1 and 3 are required to run in polynomial time.

Commonly random self-reducible:DL/DH/DDH problems for fixed DL setting 〈g〉.RSA-based problems for fixed RSA modulus N.

Likely to be not random self-reducible:Factoring integers of fixed bit length.Any NP-complete problem.

Page 101: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

47/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducibility

Definition 1.14Problem is (perfectly) random self-reducible if any instance I can be solved bythese three steps:

1 Transform instance I into uniformly random instance I ′.2 Solve instance I ′.3 Extract solution for I from solution for I ′.

Only steps 1 and 3 are required to run in polynomial time.

Commonly random self-reducible:DL/DH/DDH problems for fixed DL setting 〈g〉.RSA-based problems for fixed RSA modulus N.

Likely to be not random self-reducible:Factoring integers of fixed bit length.Any NP-complete problem.

Page 102: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

48/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Reduction to Average Case

Proposition 1.15 (Informal)Any random self-reducible problem that is hard in the worst-case is also hard onthe average.

Proof (sketch).Suppose random self-reducible problem is easy on the average.Then any problem instance can be solved easily:

1 Transform given instance into a uniformly random instance.2 Solve it (easy because it’s the average case).3 Extract solution to original problem.

Note that the algorithm in the proof itself is probabilistic.

Page 103: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

48/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Reduction to Average Case

Proposition 1.15 (Informal)Any random self-reducible problem that is hard in the worst-case is also hard onthe average.

Proof (sketch).Suppose random self-reducible problem is easy on the average.Then any problem instance can be solved easily:

1 Transform given instance into a uniformly random instance.2 Solve it (easy because it’s the average case).3 Extract solution to original problem.

Note that the algorithm in the proof itself is probabilistic.

Page 104: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

48/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Reduction to Average Case

Proposition 1.15 (Informal)Any random self-reducible problem that is hard in the worst-case is also hard onthe average.

Proof (sketch).Suppose random self-reducible problem is easy on the average.Then any problem instance can be solved easily:

1 Transform given instance into a uniformly random instance.2 Solve it (easy because it’s the average case).3 Extract solution to original problem.

Note that the algorithm in the proof itself is probabilistic.

Page 105: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

48/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Reduction to Average Case

Proposition 1.15 (Informal)Any random self-reducible problem that is hard in the worst-case is also hard onthe average.

Proof (sketch).Suppose random self-reducible problem is easy on the average.Then any problem instance can be solved easily:

1 Transform given instance into a uniformly random instance.2 Solve it (easy because it’s the average case).3 Extract solution to original problem.

Note that the algorithm in the proof itself is probabilistic.

Page 106: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

48/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Reduction to Average Case

Proposition 1.15 (Informal)Any random self-reducible problem that is hard in the worst-case is also hard onthe average.

Proof (sketch).Suppose random self-reducible problem is easy on the average.Then any problem instance can be solved easily:

1 Transform given instance into a uniformly random instance.2 Solve it (easy because it’s the average case).3 Extract solution to original problem.

Note that the algorithm in the proof itself is probabilistic.

Page 107: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

48/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Reduction to Average Case

Proposition 1.15 (Informal)Any random self-reducible problem that is hard in the worst-case is also hard onthe average.

Proof (sketch).Suppose random self-reducible problem is easy on the average.Then any problem instance can be solved easily:

1 Transform given instance into a uniformly random instance.2 Solve it (easy because it’s the average case).3 Extract solution to original problem.

Note that the algorithm in the proof itself is probabilistic.

Page 108: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

48/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Reduction to Average Case

Proposition 1.15 (Informal)Any random self-reducible problem that is hard in the worst-case is also hard onthe average.

Proof (sketch).Suppose random self-reducible problem is easy on the average.Then any problem instance can be solved easily:

1 Transform given instance into a uniformly random instance.2 Solve it (easy because it’s the average case).3 Extract solution to original problem.

Note that the algorithm in the proof itself is probabilistic.

Page 109: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

49/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducible Discrete Log Problems

We consider a fixed group 〈g〉 of any order n ≥ 1.

Definition (DL, DH, DDH problems)DL Compute x, given g x with x ∈ Zn.DH Compute gxy , given g x , g y with x , y ∈ Zn.

DDH Distinguish g xy from g z , given g x , g y with x , y , z ∈ Zn, z − xy ∈ Z∗n .

For n prime, DDH problem corresponds to distinguishing (disjoint) distributions

X〈g〉 = {(g x , g y , g xy ) : x , y ∈R Zn}Y〈g〉 = {(g x , g y , g z ) : x , y , z ∈R Zn, z 6= xy}

Proposition 1.16DL, DH, and DDH problems are random self-reducible.

Page 110: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

50/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DL, DH problems are random self-reducible).Given any DL problem instance h = gx with x ∈ Zn:

1 Transform h into uniformly random instance h′ = hgu with u ∈R Zn.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Given any DH problem instance I = (gx , g y ) with x , y ∈ Zn:1 Transform I into I ′ = (g x′ , gy′) = (gx g t , g y gu) with t, u ∈R Zn.2 Solve instance I ′ yielding g x′y′ = g (x+t)(y+u) = gxy+xu+ty+tu.3 Extract solution as g xy = g x′y′/((gx )u(g y )tg tu).

Note: I ′ = (g x′ , gy′) is distributed uniformly on 〈g〉 × 〈g〉.

Page 111: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

50/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DL, DH problems are random self-reducible).Given any DL problem instance h = gx with x ∈ Zn:

1 Transform h into uniformly random instance h′ = hgu with u ∈R Zn.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Given any DH problem instance I = (gx , g y ) with x , y ∈ Zn:1 Transform I into I ′ = (g x′ , g y′) = (gx g t , g y gu) with t, u ∈R Zn.2 Solve instance I ′ yielding g x′y′ = g (x+t)(y+u) = gxy+xu+ty+tu.3 Extract solution as g xy = g x′y′/((gx )u(g y )tg tu).

Note: I ′ = (g x′ , gy′) is distributed uniformly on 〈g〉 × 〈g〉.

Page 112: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

50/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DL, DH problems are random self-reducible).Given any DL problem instance h = gx with x ∈ Zn:

1 Transform h into uniformly random instance h′ = hgu with u ∈R Zn.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Given any DH problem instance I = (gx , g y ) with x , y ∈ Zn:1 Transform I into I ′ = (g x′ , g y′) = (gx g t , g y gu) with t, u ∈R Zn.2 Solve instance I ′ yielding g x′y′ = g (x+t)(y+u) = gxy+xu+ty+tu.3 Extract solution as g xy = g x′y′/((gx )u(g y )tg tu).

Note: I ′ = (g x′ , gy′) is distributed uniformly on 〈g〉 × 〈g〉.

Page 113: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

50/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DL, DH problems are random self-reducible).Given any DL problem instance h = gx with x ∈ Zn:

1 Transform h into uniformly random instance h′ = hgu with u ∈R Zn.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Given any DH problem instance I = (gx , g y ) with x , y ∈ Zn:1 Transform I into I ′ = (g x′ , g y′) = (gx g t , g y gu) with t, u ∈R Zn.2 Solve instance I ′ yielding g x′y′ = g (x+t)(y+u) = gxy+xu+ty+tu.3 Extract solution as g xy = g x′y′/((gx )u(g y )tg tu).

Note: I ′ = (g x′ , gy′) is distributed uniformly on 〈g〉 × 〈g〉.

Page 114: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

50/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DL, DH problems are random self-reducible).Given any DL problem instance h = gx with x ∈ Zn:

1 Transform h into uniformly random instance h′ = hgu with u ∈R Zn.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Given any DH problem instance I = (gx , g y ) with x , y ∈ Zn:1 Transform I into I ′ = (g x′ , g y′) = (gx g t , g y gu) with t, u ∈R Zn.2 Solve instance I ′ yielding g x′y′ = g (x+t)(y+u) = gxy+xu+ty+tu.3 Extract solution as g xy = g x′y′/((gx )u(g y )tg tu).

Note: I ′ = (g x′ , gy′) is distributed uniformly on 〈g〉 × 〈g〉.

Page 115: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

50/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DL, DH problems are random self-reducible).Given any DL problem instance h = gx with x ∈ Zn:

1 Transform h into uniformly random instance h′ = hgu with u ∈R Zn.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Given any DH problem instance I = (gx , g y ) with x , y ∈ Zn:1 Transform I into I ′ = (g x′ , g y′) = (gx g t , g y gu) with t, u ∈R Zn.2 Solve instance I ′ yielding g x′y′ = g (x+t)(y+u) = gxy+xu+ty+tu.3 Extract solution as g xy = g x′y′/((gx )u(g y )tg tu).

Note: I ′ = (g x′ , gy′) is distributed uniformly on 〈g〉 × 〈g〉.

Page 116: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

50/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DL, DH problems are random self-reducible).Given any DL problem instance h = gx with x ∈ Zn:

1 Transform h into uniformly random instance h′ = hgu with u ∈R Zn.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Given any DH problem instance I = (gx , g y ) with x , y ∈ Zn:1 Transform I into I ′ = (g x′ , g y′) = (gx g t , g y gu) with t, u ∈R Zn.2 Solve instance I ′ yielding g x′y′ = g (x+t)(y+u) = gxy+xu+ty+tu.3 Extract solution as g xy = g x′y′/((gx )u(g y )tg tu).

Note: I ′ = (g x′ , gy′) is distributed uniformly on 〈g〉 × 〈g〉.

Page 117: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

50/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DL, DH problems are random self-reducible).Given any DL problem instance h = gx with x ∈ Zn:

1 Transform h into uniformly random instance h′ = hgu with u ∈R Zn.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Given any DH problem instance I = (gx , g y ) with x , y ∈ Zn:1 Transform I into I ′ = (g x′ , g y′) = (gx g t , g y gu) with t, u ∈R Zn.2 Solve instance I ′ yielding g x′y′ = g (x+t)(y+u) = gxy+xu+ty+tu.3 Extract solution as g xy = g x′y′/((gx )u(g y )tg tu).

Note: I ′ = (g x′ , gy′) is distributed uniformly on 〈g〉 × 〈g〉.

Page 118: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

50/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DL, DH problems are random self-reducible).Given any DL problem instance h = gx with x ∈ Zn:

1 Transform h into uniformly random instance h′ = hgu with u ∈R Zn.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Given any DH problem instance I = (gx , g y ) with x , y ∈ Zn:1 Transform I into I ′ = (g x′ , g y′) = (gx g t , g y gu) with t, u ∈R Zn.2 Solve instance I ′ yielding g x′y′ = g (x+t)(y+u) = gxy+xu+ty+tu.3 Extract solution as g xy = g x′y′/((gx )u(g y )tg tu).

Note: I ′ = (g x′ , gy′) is distributed uniformly on 〈g〉 × 〈g〉.

Page 119: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

51/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DDH problem is random self-reducible).Given any DDH problem instance I = (g x , gy , g z ) with x , y , z ∈ Zn:

1 Transform I into I ′ = (g xs+t , g y+u, g zs+xsu+yt+tu), with s ∈R Z∗n , t, u ∈R Zn.2 Solve instance I ′ yielding bit b′.3 Output b = b′.

Since s ∈ Z∗n , I ′ = (gx′ , gy′ , g z′) satisfies z ′ = x ′y ′ iff I satisfies z = xy :

z ′ − x ′y ′ = zs + xsu + yt + tu − (xs + t)(y + u) = (z − xy)s.

If z = xy , triple I ′ is uniform among all triples (gx′ , gy′ , gx′y′): for v ,w ∈ Zn

Pr[x ′ = v , y ′ = w , z ′ = vw ] = 1n2 .

If z − xy ∈ Z∗n , s, t, u determined by s = (z ′−x ′y ′)/(z−xy), t = x ′−xs,u = y ′−y , hence I ′ uniform among all (gx′ , gy′ , g z′) with z ′ − x ′y ′ ∈ Z∗n :

Pr[x ′ = v , y ′ = w , z ′ = r ] = Pr[s = r−vwz−xy , t = v−xs, u = w−y ] = 1

φ(n)n2 ,

for any r , v ,w ∈ Zn with r − vw ∈ Z∗n :

Page 120: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

51/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DDH problem is random self-reducible).Given any DDH problem instance I = (g x , gy , g z ) with x , y , z ∈ Zn:

1 Transform I into I ′ = (g xs+t , g y+u, g zs+xsu+yt+tu), with s ∈R Z∗n , t, u ∈R Zn.2 Solve instance I ′ yielding bit b′.3 Output b = b′.

Since s ∈ Z∗n , I ′ = (gx′ , gy′ , g z′) satisfies z ′ = x ′y ′ iff I satisfies z = xy :

z ′ − x ′y ′ = zs + xsu + yt + tu − (xs + t)(y + u) = (z − xy)s.

If z = xy , triple I ′ is uniform among all triples (gx′ , gy′ , gx′y′): for v ,w ∈ Zn

Pr[x ′ = v , y ′ = w , z ′ = vw ] = 1n2 .

If z − xy ∈ Z∗n , s, t, u determined by s = (z ′−x ′y ′)/(z−xy), t = x ′−xs,u = y ′−y , hence I ′ uniform among all (gx′ , gy′ , g z′) with z ′ − x ′y ′ ∈ Z∗n :

Pr[x ′ = v , y ′ = w , z ′ = r ] = Pr[s = r−vwz−xy , t = v−xs, u = w−y ] = 1

φ(n)n2 ,

for any r , v ,w ∈ Zn with r − vw ∈ Z∗n :

Page 121: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

51/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DDH problem is random self-reducible).Given any DDH problem instance I = (g x , gy , g z ) with x , y , z ∈ Zn:

1 Transform I into I ′ = (g xs+t , g y+u, g zs+xsu+yt+tu), with s ∈R Z∗n , t, u ∈R Zn.2 Solve instance I ′ yielding bit b′.3 Output b = b′.

Since s ∈ Z∗n , I ′ = (gx′ , gy′ , g z′) satisfies z ′ = x ′y ′ iff I satisfies z = xy :

z ′ − x ′y ′ = zs + xsu + yt + tu − (xs + t)(y + u) = (z − xy)s.

If z = xy , triple I ′ is uniform among all triples (gx′ , gy′ , gx′y′): for v ,w ∈ Zn

Pr[x ′ = v , y ′ = w , z ′ = vw ] = 1n2 .

If z − xy ∈ Z∗n , s, t, u determined by s = (z ′−x ′y ′)/(z−xy), t = x ′−xs,u = y ′−y , hence I ′ uniform among all (gx′ , gy′ , g z′) with z ′ − x ′y ′ ∈ Z∗n :

Pr[x ′ = v , y ′ = w , z ′ = r ] = Pr[s = r−vwz−xy , t = v−xs, u = w−y ] = 1

φ(n)n2 ,

for any r , v ,w ∈ Zn with r − vw ∈ Z∗n :

Page 122: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

51/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DDH problem is random self-reducible).Given any DDH problem instance I = (g x , gy , g z ) with x , y , z ∈ Zn:

1 Transform I into I ′ = (g xs+t , g y+u, g zs+xsu+yt+tu), with s ∈R Z∗n , t, u ∈R Zn.2 Solve instance I ′ yielding bit b′.3 Output b = b′.

Since s ∈ Z∗n , I ′ = (gx′ , gy′ , g z′) satisfies z ′ = x ′y ′ iff I satisfies z = xy :

z ′ − x ′y ′ = zs + xsu + yt + tu − (xs + t)(y + u) = (z − xy)s.

If z = xy , triple I ′ is uniform among all triples (gx′ , gy′ , gx′y′): for v ,w ∈ Zn

Pr[x ′ = v , y ′ = w , z ′ = vw ] = 1n2 .

If z − xy ∈ Z∗n , s, t, u determined by s = (z ′−x ′y ′)/(z−xy), t = x ′−xs,u = y ′−y , hence I ′ uniform among all (gx′ , gy′ , g z′) with z ′ − x ′y ′ ∈ Z∗n :

Pr[x ′ = v , y ′ = w , z ′ = r ] = Pr[s = r−vwz−xy , t = v−xs, u = w−y ] = 1

φ(n)n2 ,

for any r , v ,w ∈ Zn with r − vw ∈ Z∗n :

Page 123: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

51/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DDH problem is random self-reducible).Given any DDH problem instance I = (g x , gy , g z ) with x , y , z ∈ Zn:

1 Transform I into I ′ = (g xs+t , g y+u, g zs+xsu+yt+tu), with s ∈R Z∗n , t, u ∈R Zn.2 Solve instance I ′ yielding bit b′.3 Output b = b′.

Since s ∈ Z∗n , I ′ = (gx′ , gy′ , g z′) satisfies z ′ = x ′y ′ iff I satisfies z = xy :

z ′ − x ′y ′ = zs + xsu + yt + tu − (xs + t)(y + u) = (z − xy)s.

If z = xy , triple I ′ is uniform among all triples (gx′ , gy′ , gx′y′): for v ,w ∈ Zn

Pr[x ′ = v , y ′ = w , z ′ = vw ] = 1n2 .

If z − xy ∈ Z∗n , s, t, u determined by s = (z ′−x ′y ′)/(z−xy), t = x ′−xs,u = y ′−y , hence I ′ uniform among all (gx′ , gy′ , g z′) with z ′ − x ′y ′ ∈ Z∗n :

Pr[x ′ = v , y ′ = w , z ′ = r ] = Pr[s = r−vwz−xy , t = v−xs, u = w−y ] = 1

φ(n)n2 ,

for any r , v ,w ∈ Zn with r − vw ∈ Z∗n :

Page 124: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

51/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DDH problem is random self-reducible).Given any DDH problem instance I = (g x , gy , g z ) with x , y , z ∈ Zn:

1 Transform I into I ′ = (g xs+t , g y+u, g zs+xsu+yt+tu), with s ∈R Z∗n , t, u ∈R Zn.2 Solve instance I ′ yielding bit b′.3 Output b = b′.

Since s ∈ Z∗n , I ′ = (gx′ , gy′ , g z′) satisfies z ′ = x ′y ′ iff I satisfies z = xy :

z ′ − x ′y ′ = zs + xsu + yt + tu − (xs + t)(y + u) = (z − xy)s.

If z = xy , triple I ′ is uniform among all triples (gx′ , gy′ , gx′y′): for v ,w ∈ Zn

Pr[x ′ = v , y ′ = w , z ′ = vw ] = 1n2 .

If z − xy ∈ Z∗n , s, t, u determined by s = (z ′−x ′y ′)/(z−xy), t = x ′−xs,u = y ′−y , hence I ′ uniform among all (gx′ , gy′ , g z′) with z ′ − x ′y ′ ∈ Z∗n :

Pr[x ′ = v , y ′ = w , z ′ = r ] = Pr[s = r−vwz−xy , t = v−xs, u = w−y ] = 1

φ(n)n2 ,

for any r , v ,w ∈ Zn with r − vw ∈ Z∗n :

Page 125: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

51/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Proof (DDH problem is random self-reducible).Given any DDH problem instance I = (g x , gy , g z ) with x , y , z ∈ Zn:

1 Transform I into I ′ = (g xs+t , g y+u, g zs+xsu+yt+tu), with s ∈R Z∗n , t, u ∈R Zn.2 Solve instance I ′ yielding bit b′.3 Output b = b′.

Since s ∈ Z∗n , I ′ = (gx′ , gy′ , g z′) satisfies z ′ = x ′y ′ iff I satisfies z = xy :

z ′ − x ′y ′ = zs + xsu + yt + tu − (xs + t)(y + u) = (z − xy)s.

If z = xy , triple I ′ is uniform among all triples (gx′ , gy′ , gx′y′): for v ,w ∈ Zn

Pr[x ′ = v , y ′ = w , z ′ = vw ] = 1n2 .

If z − xy ∈ Z∗n , s, t, u determined by s = (z ′−x ′y ′)/(z−xy), t = x ′−xs,u = y ′−y , hence I ′ uniform among all (gx′ , gy′ , g z′) with z ′ − x ′y ′ ∈ Z∗n :

Pr[x ′ = v , y ′ = w , z ′ = r ] = Pr[s = r−vwz−xy , t = v−xs, u = w−y ] = 1

φ(n)n2 ,

for any r , v ,w ∈ Zn with r − vw ∈ Z∗n :

Page 126: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

52/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducible DL Variants

Definition (DL∗, DH∗, DH∗∗, DDH∗, DDH∗∗ problems)DL∗ Compute x, given g x with x ∈ Z∗n .DH∗ Compute gxy , given g x , gy with x ∈ Z∗n and y ∈ Zn.DH∗∗ Compute gxy , given g x , gy with x , y ∈ Z∗n .

DDH∗ Distinguish gxy from g z , given g x , gy with x∈Z∗n , y , z ∈ Zn, z−xy ∈ Z∗n .DDH∗∗ Distinguish gxy from g z , given g x , gy with x , y , z ∈ Z∗n , z − xy ∈ Z∗n .

Example 1.17 (DL∗ problem is random self-reducible)Given any instance h = gx with x ∈ Z∗n :

1 Transform h into a uniformly random instance h′ = hu with u ∈R Z∗n .2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′/u mod n.

Note: h′ is distributed uniformly on 〈g〉∗.

Page 127: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

52/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducible DL Variants

Definition (DL∗, DH∗, DH∗∗, DDH∗, DDH∗∗ problems)DL∗ Compute x, given g x with x ∈ Z∗n .DH∗ Compute gxy , given g x , gy with x ∈ Z∗n and y ∈ Zn.DH∗∗ Compute gxy , given g x , gy with x , y ∈ Z∗n .

DDH∗ Distinguish gxy from g z , given g x , gy with x∈Z∗n , y , z ∈ Zn, z−xy ∈ Z∗n .DDH∗∗ Distinguish gxy from g z , given g x , gy with x , y , z ∈ Z∗n , z − xy ∈ Z∗n .

Example 1.17 (DL∗ problem is random self-reducible)Given any instance h = gx with x ∈ Z∗n :

1 Transform h into a uniformly random instance h′ = hu with u ∈R Z∗n .2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′/u mod n.

Note: h′ is distributed uniformly on 〈g〉∗.

Page 128: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

52/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducible DL Variants

Definition (DL∗, DH∗, DH∗∗, DDH∗, DDH∗∗ problems)DL∗ Compute x, given g x with x ∈ Z∗n .DH∗ Compute gxy , given g x , gy with x ∈ Z∗n and y ∈ Zn.DH∗∗ Compute gxy , given g x , gy with x , y ∈ Z∗n .

DDH∗ Distinguish gxy from g z , given g x , gy with x∈Z∗n , y , z ∈ Zn, z−xy ∈ Z∗n .DDH∗∗ Distinguish gxy from g z , given g x , gy with x , y , z ∈ Z∗n , z − xy ∈ Z∗n .

Example 1.17 (DL∗ problem is random self-reducible)Given any instance h = gx with x ∈ Z∗n :

1 Transform h into a uniformly random instance h′ = hu with u ∈R Z∗n .2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′/u mod n.

Note: h′ is distributed uniformly on 〈g〉∗.

Page 129: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

52/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducible DL Variants

Definition (DL∗, DH∗, DH∗∗, DDH∗, DDH∗∗ problems)DL∗ Compute x, given g x with x ∈ Z∗n .DH∗ Compute gxy , given g x , gy with x ∈ Z∗n and y ∈ Zn.DH∗∗ Compute gxy , given g x , gy with x , y ∈ Z∗n .

DDH∗ Distinguish gxy from g z , given g x , gy with x∈Z∗n , y , z ∈ Zn, z−xy ∈ Z∗n .DDH∗∗ Distinguish gxy from g z , given g x , gy with x , y , z ∈ Z∗n , z − xy ∈ Z∗n .

Example 1.17 (DL∗ problem is random self-reducible)Given any instance h = gx with x ∈ Z∗n :

1 Transform h into a uniformly random instance h′ = hu with u ∈R Z∗n .2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′/u mod n.

Note: h′ is distributed uniformly on 〈g〉∗.

Page 130: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

52/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducible DL Variants

Definition (DL∗, DH∗, DH∗∗, DDH∗, DDH∗∗ problems)DL∗ Compute x, given g x with x ∈ Z∗n .DH∗ Compute gxy , given g x , gy with x ∈ Z∗n and y ∈ Zn.DH∗∗ Compute gxy , given g x , gy with x , y ∈ Z∗n .

DDH∗ Distinguish gxy from g z , given g x , gy with x∈Z∗n , y , z ∈ Zn, z−xy ∈ Z∗n .DDH∗∗ Distinguish gxy from g z , given g x , gy with x , y , z ∈ Z∗n , z − xy ∈ Z∗n .

Example 1.17 (DL∗ problem is random self-reducible)Given any instance h = gx with x ∈ Z∗n :

1 Transform h into a uniformly random instance h′ = hu with u ∈R Z∗n .2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′/u mod n.

Note: h′ is distributed uniformly on 〈g〉∗.

Page 131: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

52/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Self-Reducible DL Variants

Definition (DL∗, DH∗, DH∗∗, DDH∗, DDH∗∗ problems)DL∗ Compute x, given g x with x ∈ Z∗n .DH∗ Compute gxy , given g x , gy with x ∈ Z∗n and y ∈ Zn.DH∗∗ Compute gxy , given g x , gy with x , y ∈ Z∗n .

DDH∗ Distinguish gxy from g z , given g x , gy with x∈Z∗n , y , z ∈ Zn, z−xy ∈ Z∗n .DDH∗∗ Distinguish gxy from g z , given g x , gy with x , y , z ∈ Z∗n , z − xy ∈ Z∗n .

Example 1.17 (DL∗ problem is random self-reducible)Given any instance h = gx with x ∈ Z∗n :

1 Transform h into a uniformly random instance h′ = hu with u ∈R Z∗n .2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′/u mod n.

Note: h′ is distributed uniformly on 〈g〉∗.

Page 132: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

53/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Example (cont.)Alternatively, use transformation for DL problem in proof of Proposition 1.15.

Given any instance h = gx with x ∈ Z∗n :1 Transform h into uniformly random h′ = hgu, u ∈R Zn until ord(h′) = n.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Condition ord(h′) = n ensures h′ ∈ 〈g〉∗ in step 2, cf. Exercise 1.2.3.In fact, h′ is distributed uniformly on 〈g〉∗ as required.

Test ord(h′) = n can be evaluated efficiently, given prime factorization of n.Expected running time of step 1 polynomial in size of n: on averagen/φ(n) = O(log log n) uniformly random h′ ∈ 〈g〉 needed to find one h′ ∈ 〈g〉∗.

Note: if n is prime, ord(h′) = n is equivalent to h′ 6= 1.

Page 133: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

53/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Example (cont.)Alternatively, use transformation for DL problem in proof of Proposition 1.15.

Given any instance h = gx with x ∈ Z∗n :1 Transform h into uniformly random h′ = hgu, u ∈R Zn until ord(h′) = n.2 Solve instance h′ yielding x ′ = logg h′.3 Extract solution as x = logg h = x ′ − u mod n.

Condition ord(h′) = n ensures h′ ∈ 〈g〉∗ in step 2, cf. Exercise 1.2.3.In fact, h′ is distributed uniformly on 〈g〉∗ as required.

Test ord(h′) = n can be evaluated efficiently, given prime factorization of n.Expected running time of step 1 polynomial in size of n: on averagen/φ(n) = O(log log n) uniformly random h′ ∈ 〈g〉 needed to find one h′ ∈ 〈g〉∗.

Note: if n is prime, ord(h′) = n is equivalent to h′ 6= 1.

Page 134: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

54/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Exercises

Exercise 1.3.4Show (a) DH∗ problem, and (b) DH∗∗ problem are both random self-reducible.

Exercise 1.3.5Show (a) DDH∗ problem is random self-reducible, and (b) given primefactorization of n, DDH∗∗ problem is random self-reducible. Hints: for both partsuse three random numbers for transformation in step 1, s, t ∈R Z∗n and u ∈R Zn;for part (b), also test for invalid inputs, cf. end of Example 1.17.

Page 135: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

55/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Exercises

Exercise 1.3.6Show that these problems are random self-reducible for group 〈g〉 of order n:

(a) given g x with x ∈ Zn, compute g x2;

(b) given g x with x ∈ Z∗n , compute g1/x ;(c) given g x , gy with x , y ∈ Z∗n , compute g x/y ;(d) given g x , gy with x ∈ Zn, y ∈ Z∗n , compute g x/y ;(e) given g x with x ∈ Z∗n , compute g x3

;(f) given g x , gx2

with x ∈ Zn, compute g x3;

(g) given g x , gy with x , y ∈ Zn, compute g (x+y)2;

(h) given g x , gy with x , y ∈ Zn, x − y ∈ Z∗n , compute g1/(x−y).

Page 136: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

56/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Exercises

Exercise 1.3.7Let N = pq be an RSA modulus, that is, p and q are large, distinct primes of bitlength k, for some integer k. Let e satisfy gcd(e, φ(N)) = 1, whereφ(N) = (p − 1)(q − 1). The RSA problem is to compute x = y 1/e mod N giveny ∈ Z∗N . Show that the RSA problem is random self-reducible.

Exercise 1.3.8Let N be an RSA modulus, as in the previous exercise. LetJN = {y ∈ Z∗N : (y/N) = 1}, the set of all integers in Z∗N with Jacobi symbol 1.The Quadratic Residuosity (QR) problem is to decide whether a given y ∈ JN is aquadratic residue modulo N or not, that is, whether y ∈ QRN , whereQRN = {y ∈ Z∗N : ∃x∈Z∗N

y = x 2 mod N}. Show that the QR problem is randomself-reducible.

Page 137: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

57/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Cryptographic Hash Functions

Definition 1.18

Function H : {0, 1}∗ → {0, 1}k is a cryptographic hash function, if H(x) is easyto compute for any x , and one or more of the following properties hold:

preimage resistance (one-wayness):given y , hard to find preimage x such that H(x) = y .2nd-preimage resistance (weak collision resistance):given x , hard to find 2nd-preimage x ′ 6= x such that H(x ′) = H(x).collision resistance (strong collision resistance):hard to find collision (x , x ′) with x 6= x ′ such that H(x) = H(x ′).

Well-known examples: MD5, SHA-1, SHA-256.

Collisions for MD5, SHA-0, SHA-1 and some other “old” hash functions:CryptographicHash-Collisions.nb

Page 138: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

57/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Cryptographic Hash Functions

Definition 1.18

Function H : {0, 1}∗ → {0, 1}k is a cryptographic hash function, if H(x) is easyto compute for any x , and one or more of the following properties hold:

preimage resistance (one-wayness):given y , hard to find preimage x such that H(x) = y .2nd-preimage resistance (weak collision resistance):given x , hard to find 2nd-preimage x ′ 6= x such that H(x ′) = H(x).collision resistance (strong collision resistance):hard to find collision (x , x ′) with x 6= x ′ such that H(x) = H(x ′).

Well-known examples: MD5, SHA-1, SHA-256.

Collisions for MD5, SHA-0, SHA-1 and some other “old” hash functions:CryptographicHash-Collisions.nb

Page 139: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

57/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Cryptographic Hash Functions

Definition 1.18

Function H : {0, 1}∗ → {0, 1}k is a cryptographic hash function, if H(x) is easyto compute for any x , and one or more of the following properties hold:

preimage resistance (one-wayness):given y , hard to find preimage x such that H(x) = y .2nd-preimage resistance (weak collision resistance):given x , hard to find 2nd-preimage x ′ 6= x such that H(x ′) = H(x).collision resistance (strong collision resistance):hard to find collision (x , x ′) with x 6= x ′ such that H(x) = H(x ′).

Well-known examples: MD5, SHA-1, SHA-256.

Collisions for MD5, SHA-0, SHA-1 and some other “old” hash functions:CryptographicHash-Collisions.nb

Page 140: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

57/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Cryptographic Hash Functions

Definition 1.18

Function H : {0, 1}∗ → {0, 1}k is a cryptographic hash function, if H(x) is easyto compute for any x , and one or more of the following properties hold:

preimage resistance (one-wayness):given y , hard to find preimage x such that H(x) = y .2nd-preimage resistance (weak collision resistance):given x , hard to find 2nd-preimage x ′ 6= x such that H(x ′) = H(x).collision resistance (strong collision resistance):hard to find collision (x , x ′) with x 6= x ′ such that H(x) = H(x ′).

Well-known examples: MD5, SHA-1, SHA-256.

Collisions for MD5, SHA-0, SHA-1 and some other “old” hash functions:CryptographicHash-Collisions.nb

Page 141: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

57/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Cryptographic Hash Functions

Definition 1.18

Function H : {0, 1}∗ → {0, 1}k is a cryptographic hash function, if H(x) is easyto compute for any x , and one or more of the following properties hold:

preimage resistance (one-wayness):given y , hard to find preimage x such that H(x) = y .2nd-preimage resistance (weak collision resistance):given x , hard to find 2nd-preimage x ′ 6= x such that H(x ′) = H(x).collision resistance (strong collision resistance):hard to find collision (x , x ′) with x 6= x ′ such that H(x) = H(x ′).

Well-known examples: MD5, SHA-1, SHA-256.

Collisions for MD5, SHA-0, SHA-1 and some other “old” hash functions:CryptographicHash-Collisions.nb

Page 142: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

58/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

View cryptographic hash function H : {0, 1}∗ → {0, 1}k as a random oracle.

Random oracle H: random function of type {0, 1}∗ → {0, 1}k .

We only use a finite portion S of H as follows.Initially, S = ∅.Upon a query x :

if x 6∈ S, set H(x) ∈R {0, 1}k and S ← S ∪ {x};return H(x).

Then:(i) H is a function: same input value, same output value;(ii) H is random: for different input values, output values are distributed

uniformly at random (and mutually independent).

Page 143: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

58/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

View cryptographic hash function H : {0, 1}∗ → {0, 1}k as a random oracle.

Random oracle H: random function of type {0, 1}∗ → {0, 1}k .

We only use a finite portion S of H as follows.Initially, S = ∅.Upon a query x :

if x 6∈ S, set H(x) ∈R {0, 1}k and S ← S ∪ {x};return H(x).

Then:(i) H is a function: same input value, same output value;(ii) H is random: for different input values, output values are distributed

uniformly at random (and mutually independent).

Page 144: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

58/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

View cryptographic hash function H : {0, 1}∗ → {0, 1}k as a random oracle.

Random oracle H: random function of type {0, 1}∗ → {0, 1}k .

We only use a finite portion S of H as follows.Initially, S = ∅.Upon a query x :

if x 6∈ S, set H(x) ∈R {0, 1}k and S ← S ∪ {x};return H(x).

Then:(i) H is a function: same input value, same output value;(ii) H is random: for different input values, output values are distributed

uniformly at random (and mutually independent).

Page 145: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

58/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

View cryptographic hash function H : {0, 1}∗ → {0, 1}k as a random oracle.

Random oracle H: random function of type {0, 1}∗ → {0, 1}k .

We only use a finite portion S of H as follows.Initially, S = ∅.Upon a query x :

if x 6∈ S, set H(x) ∈R {0, 1}k and S ← S ∪ {x};return H(x).

Then:(i) H is a function: same input value, same output value;(ii) H is random: for different input values, output values are distributed

uniformly at random (and mutually independent).

Page 146: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

59/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Ultimately, use of random oracle model is heuristic!

Concrete hash function such as SHA-256 is not a random function—not at all!1

Practical upshot: protocol proved secure in random oracle model can only bebroken if the attacker uses specific properties of hash function H.

1Protocols do exist that can be proved secure in the random oracle model, but are insecure whenused with some concrete hash function. Yet, these “counterexamples” are not realistic. See alsoExercise 5.4.1.

Page 147: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.

Proof. W.l.o.g. assume that all hash queries are distinct.

Page 148: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(i) On input y ∈ {0, 1}k , let E output x. Then Pr[H(x) = y ] ≤ t/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

Page 149: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(i) On input y ∈ {0, 1}k , let E output x. Then Pr[H(x) = y ] ≤ t/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

(i) For each hash query x , the probability that H(x) = y is exactly 2−k .

Page 150: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(ii) On input x∈{0, 1}∗, let E output x ′. Then Pr[x ′ 6=x ,H(x ′)= H(x)] ≤ t/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

Page 151: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(ii) On input x∈{0, 1}∗, let E output x ′. Then Pr[x ′ 6=x ,H(x ′)= H(x)] ≤ t/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.(ii) Let y = H(x). For each hash query x ′ 6= x , the probability that H(x ′) = y isexactly 2−k .

Page 152: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(iii) Let E output (x , x ′). Then Pr[x 6= x ′,H(x) = H(x ′)] ≤ t2/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

Page 153: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(iii) Let E output (x , x ′). Then Pr[x 6= x ′,H(x) = H(x ′)] ≤ t2/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

(iii) Write m = 2k and assume t <√

m. For hash queries x1, . . . , xt , probability ofat least one collision is:

1−m(m − 1)(m − 2) · · · (m − t + 1)/mt

= 1− (1− 1/m)(1− 2/m) · · · (1− (t − 1)/m)≤ 1− e−2/me−4/m · · · e−2(t−1)/m 1−x≥e−2x for 0≤x≤3/4

= 1− e−t(t−1)/m

≤ 1− (1− t(t − 1)/m) ex≥1+x for x∈R

= t(t − 1)/m≤ t2/m.

Page 154: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(iii) Let E output (x , x ′). Then Pr[x 6= x ′,H(x) = H(x ′)] ≤ t2/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

(iii) Write m = 2k and assume t <√

m. For hash queries x1, . . . , xt , probability ofat least one collision is:

1−m(m − 1)(m − 2) · · · (m − t + 1)/mt

= 1− (1− 1/m)(1− 2/m) · · · (1− (t − 1)/m)≤ 1− e−2/me−4/m · · · e−2(t−1)/m 1−x≥e−2x for 0≤x≤3/4

= 1− e−t(t−1)/m

≤ 1− (1− t(t − 1)/m) ex≥1+x for x∈R

= t(t − 1)/m≤ t2/m.

Page 155: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(iii) Let E output (x , x ′). Then Pr[x 6= x ′,H(x) = H(x ′)] ≤ t2/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

(iii) Write m = 2k and assume t <√

m. For hash queries x1, . . . , xt , probability ofat least one collision is:

1−m(m − 1)(m − 2) · · · (m − t + 1)/mt

= 1− (1− 1/m)(1− 2/m) · · · (1− (t − 1)/m)≤ 1− e−2/me−4/m · · · e−2(t−1)/m 1−x≥e−2x for 0≤x≤3/4

= 1− e−t(t−1)/m

≤ 1− (1− t(t − 1)/m) ex≥1+x for x∈R

= t(t − 1)/m≤ t2/m.

Page 156: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(iii) Let E output (x , x ′). Then Pr[x 6= x ′,H(x) = H(x ′)] ≤ t2/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

(iii) Write m = 2k and assume t <√

m. For hash queries x1, . . . , xt , probability ofat least one collision is:

1−m(m − 1)(m − 2) · · · (m − t + 1)/mt

= 1− (1− 1/m)(1− 2/m) · · · (1− (t − 1)/m)≤ 1− e−2/me−4/m · · · e−2(t−1)/m 1−x≥e−2x for 0≤x≤3/4

= 1− e−t(t−1)/m

≤ 1− (1− t(t − 1)/m) ex≥1+x for x∈R

= t(t − 1)/m≤ t2/m.

Page 157: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(iii) Let E output (x , x ′). Then Pr[x 6= x ′,H(x) = H(x ′)] ≤ t2/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

(iii) Write m = 2k and assume t <√

m. For hash queries x1, . . . , xt , probability ofat least one collision is:

1−m(m − 1)(m − 2) · · · (m − t + 1)/mt

= 1− (1− 1/m)(1− 2/m) · · · (1− (t − 1)/m)≤ 1− e−2/me−4/m · · · e−2(t−1)/m 1−x≥e−2x for 0≤x≤3/4

= 1− e−t(t−1)/m

≤ 1− (1− t(t − 1)/m) ex≥1+x for x∈R

= t(t − 1)/m≤ t2/m.

Page 158: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(iii) Let E output (x , x ′). Then Pr[x 6= x ′,H(x) = H(x ′)] ≤ t2/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

(iii) Write m = 2k and assume t <√

m. For hash queries x1, . . . , xt , probability ofat least one collision is:

1−m(m − 1)(m − 2) · · · (m − t + 1)/mt

= 1− (1− 1/m)(1− 2/m) · · · (1− (t − 1)/m)≤ 1− e−2/me−4/m · · · e−2(t−1)/m 1−x≥e−2x for 0≤x≤3/4

= 1− e−t(t−1)/m

≤ 1− (1− t(t − 1)/m) ex≥1+x for x∈R

= t(t − 1)/m≤ t2/m.

Page 159: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(iii) Let E output (x , x ′). Then Pr[x 6= x ′,H(x) = H(x ′)] ≤ t2/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

(iii) Write m = 2k and assume t <√

m. For hash queries x1, . . . , xt , probability ofat least one collision is:

1−m(m − 1)(m − 2) · · · (m − t + 1)/mt

= 1− (1− 1/m)(1− 2/m) · · · (1− (t − 1)/m)≤ 1− e−2/me−4/m · · · e−2(t−1)/m 1−x≥e−2x for 0≤x≤3/4

= 1− e−t(t−1)/m

≤ 1− (1− t(t − 1)/m) ex≥1+x for x∈R

= t(t − 1)/m≤ t2/m.

Page 160: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

60/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Random Oracle Model

Proposition 1.19

Let H be a cryptographic hash function, viewed as a random oracle.Let (unlimitedly powerful) adversary E make at most t hash queries.(iii) Let E output (x , x ′). Then Pr[x 6= x ′,H(x) = H(x ′)] ≤ t2/2k .

Proof. W.l.o.g. assume that all hash queries are distinct.

(iii) Write m = 2k and assume t <√

m. For hash queries x1, . . . , xt , probability ofat least one collision is:

1−m(m − 1)(m − 2) · · · (m − t + 1)/mt

= 1− (1− 1/m)(1− 2/m) · · · (1− (t − 1)/m)≤ 1− e−2/me−4/m · · · e−2(t−1)/m 1−x≥e−2x for 0≤x≤3/4

= 1− e−t(t−1)/m

≤ 1− (1− t(t − 1)/m) ex≥1+x for x∈R

= t(t − 1)/m≤ t2/m.

Page 161: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

61/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Birthday Paradox

Exercise 1.3.9See the proof of Proposition 1.19(iii). Show that the upper bound for theprobability of finding at least one collision is almost tight by showing that thisprobability is bounded below by 1

4 t(t − 1)/m, for t <√

m.

Exact collision probability as function of t:

Among group of 23 people, prob. 50% that two share same birthday!At t = 2

√m = 2

√2k almost surely (prob. ≈ 1) a collision.

Page 162: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

62/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Further Requirements for Cryptographic Hash Functions

Any deviation from what statistically holds for random functions should be:absent,unlikely, orin any case, infeasible to exploit.

Example (Partial preimage resistance (or, local one-wayness))Given y , hard to find (partial) information about any preimage x s.t. H(x) = y .

Exercise 1.3.10Let H be a preimage resistant hash function. Show that partial preimageresistance is strictly stronger than preimage resistance, by constructing a preimageresistant hash function H ′ (from H) which is not partial preimage resistant.

Page 163: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

62/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Further Requirements for Cryptographic Hash Functions

Any deviation from what statistically holds for random functions should be:absent,unlikely, orin any case, infeasible to exploit.

Example (Partial preimage resistance (or, local one-wayness))Given y , hard to find (partial) information about any preimage x s.t. H(x) = y .

Exercise 1.3.10Let H be a preimage resistant hash function. Show that partial preimageresistance is strictly stronger than preimage resistance, by constructing a preimageresistant hash function H ′ (from H) which is not partial preimage resistant.

Page 164: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

62/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Further Requirements for Cryptographic Hash Functions

Any deviation from what statistically holds for random functions should be:absent,unlikely, orin any case, infeasible to exploit.

Example (Partial preimage resistance (or, local one-wayness))Given y , hard to find (partial) information about any preimage x s.t. H(x) = y .

Exercise 1.3.10Let H be a preimage resistant hash function. Show that partial preimageresistance is strictly stronger than preimage resistance, by constructing a preimageresistant hash function H ′ (from H) which is not partial preimage resistant.

Page 165: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

63/205

1 Introduction

1.1 Terminology1.2 Preliminaries1.3 Assumptions

1.3.1 Discrete Log and Diffie-Hellman Assumptions1.3.2 Indistinguishability1.3.3 Random Self-Reducibility1.3.4 Random Oracle Model

Exercises

Exercise 1.3.11Suppose one demands of a hash function H that it is hard to find a pair of bitstrings (x , x ′) satisfying H(x)=H(x ′), where s denotes the bitwise complement ofbit string s. Analyze the probability that an adversary E making at most t hashqueries finds such a pair, where H is viewed as a random oracle.

Exercise 1.3.12Let y = H2(x), where x ∈ {0, 1}∗. Let E be an adversary that, given y only,makes t hash queries on distinct inputs x1, . . . , xt ∈ {0, 1}k . ViewH : {0, 1}∗ → {0, 1}k as a random oracle to show that E finds a preimage of ywith probability exactly equal to ε(2− ε), with ε = t/2k . Also, argue why there isno contradiction with Proposition 1.19(i) even though ε(2− ε) ≥ ε.

Page 166: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

64/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Diffie-Hellman Key Exchange (1976)

Discrete Log setting: finite cyclic group 〈g〉 of order n.

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← g xA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← hxAB KBA ← hxB

A

Key K = KAB = KBA is a shared key for A and B, meaning that:(i) K is the same for A and B(ii) K is private, only known to A and B(iii) K is actually equal to gxAxB (with contributions from both parties)

Often, key K is subsequently used as a session key.How “secure” is this protocol?

Page 167: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

64/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Diffie-Hellman Key Exchange (1976)

Discrete Log setting: finite cyclic group 〈g〉 of order n.

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← g xA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← hxAB KBA ← hxB

A

Key K = KAB = KBA is a shared key for A and B, meaning that:(i) K is the same for A and B(ii) K is private, only known to A and B(iii) K is actually equal to gxAxB (with contributions from both parties)

Often, key K is subsequently used as a session key.How “secure” is this protocol?

Page 168: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

64/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Diffie-Hellman Key Exchange (1976)

Discrete Log setting: finite cyclic group 〈g〉 of order n.

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← g xA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← hxAB KBA ← hxB

A

Key K = KAB = KBA is a shared key for A and B, meaning that:(i) K is the same for A and B(ii) K is private, only known to A and B(iii) K is actually equal to gxAxB (with contributions from both parties)

Often, key K is subsequently used as a session key.How “secure” is this protocol?

Page 169: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

64/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Diffie-Hellman Key Exchange (1976)

Discrete Log setting: finite cyclic group 〈g〉 of order n.

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← g xA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← hxAB KBA ← hxB

A

Key K = KAB = KBA is a shared key for A and B, meaning that:(i) K is the same for A and B(ii) K is private, only known to A and B(iii) K is actually equal to gxAxB (with contributions from both parties)

Often, key K is subsequently used as a session key.How “secure” is this protocol?

Page 170: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

64/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Diffie-Hellman Key Exchange (1976)

Discrete Log setting: finite cyclic group 〈g〉 of order n.

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← g xA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← hxAB KBA ← hxB

A

Key K = KAB = KBA is a shared key for A and B, meaning that:(i) K is the same for A and B(ii) K is private, only known to A and B(iii) K is actually equal to gxAxB (with contributions from both parties)

Often, key K is subsequently used as a session key.How “secure” is this protocol?

Page 171: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

64/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Diffie-Hellman Key Exchange (1976)

Discrete Log setting: finite cyclic group 〈g〉 of order n.

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← g xA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← hxAB KBA ← hxB

A

Key K = KAB = KBA is a shared key for A and B, meaning that:(i) K is the same for A and B(ii) K is private, only known to A and B(iii) K is actually equal to gxAxB (with contributions from both parties)

Often, key K is subsequently used as a session key.How “secure” is this protocol?

Page 172: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

64/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Diffie-Hellman Key Exchange (1976)

Discrete Log setting: finite cyclic group 〈g〉 of order n.

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← g xA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← hxAB KBA ← hxB

A

Key K = KAB = KBA is a shared key for A and B, meaning that:(i) K is the same for A and B(ii) K is private, only known to A and B(iii) K is actually equal to gxAxB (with contributions from both parties)

Often, key K is subsequently used as a session key.How “secure” is this protocol?

Page 173: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

64/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Diffie-Hellman Key Exchange (1976)

Discrete Log setting: finite cyclic group 〈g〉 of order n.

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← g xA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← hxAB KBA ← hxB

A

Key K = KAB = KBA is a shared key for A and B, meaning that:(i) K is the same for A and B(ii) K is private, only known to A and B(iii) K is actually equal to gxAxB (with contributions from both parties)

Often, key K is subsequently used as a session key.How “secure” is this protocol?

Page 174: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

65/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Exercise 2.1.1Explain what happens if the secret exponents xA and xB are chosen from Zninstead of Z∗n . Confirm your findings by computing the statistical distance∆(K ; K ′), where K = gxAxB with xA, xB ∈R Z∗n and K ′ = g x′Ax′B withx ′A, x ′B ∈R Zn.

Page 175: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

66/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security against Passive Attacks

Passive attacker E eavesdrops on communication,gets hA = gxA and hB = gxB .E knows the DL setting in use.Thus, E may try to compute xA = logg hA.

But, success would contradict the DL assumption (Definition 1.9).

Similarly, computation of xB = logg hB cannot be successful.

Can we make this line of reasoning rigorous?

Page 176: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

66/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security against Passive Attacks

Passive attacker E eavesdrops on communication,gets hA = gxA and hB = gxB .E knows the DL setting in use.Thus, E may try to compute xA = logg hA.

But, success would contradict the DL assumption (Definition 1.9).

Similarly, computation of xB = logg hB cannot be successful.

Can we make this line of reasoning rigorous?

Page 177: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

66/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security against Passive Attacks

Passive attacker E eavesdrops on communication,gets hA = gxA and hB = gxB .E knows the DL setting in use.Thus, E may try to compute xA = logg hA.

But, success would contradict the DL assumption (Definition 1.9).

Similarly, computation of xB = logg hB cannot be successful.

Can we make this line of reasoning rigorous?

Page 178: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 179: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 180: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 181: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 182: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 183: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 184: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 185: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 186: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 187: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 188: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 189: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

67/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof by Reduction

Reduction:If attacker E can find K from hA and hB,then we can use E to solve the DL problem.

Given an instance of the DL problem: h = gx .How to use E to find x = logg h?

Attempt at reduction:1 put hA = h2 put hB = g x′ with x ′ ∈R Z∗n3 let E perform its attack4 upon success, E outputs g xx′ .5 ... ?

How to find x from gxx′? Even knowing x ′.

Way out: introduce DH assumption (Definition 1.10).

Page 190: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

68/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Enough Security?Under DH assumption, attacker E cannot find key K given hA and hB. But,suppose K is used to encrypt 1-bit message M ∈ {0, 1}: ciphertext C = gMK .

Example 2.1

Let 〈g〉 = Z∗p , with p′ = (p − 1)/2 prime. Then Z∗p = QRp ∪ QRp with

QRp = {1, g2, . . . , g2p′−2} quadratic residues mod pQRp = {g , g3, . . . , g2p′−1} quadratic nonresidues mod p

hA hB KQRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%

Assume M ∈R {0, 1}.Given C = gMK .

Guess: M̂ ={

0, if C ∈ QRp ,

1, if C ∈ QRp .

Pr[M̂ = M] = 3/4 (check this!)Even worse: M can be recovered deterministically from the quadratic residuosityof hA, hB, and C . See Exercise 2.1.5.

Page 191: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

68/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Enough Security?Under DH assumption, attacker E cannot find key K given hA and hB. But,suppose K is used to encrypt 1-bit message M ∈ {0, 1}: ciphertext C = gMK .

Example 2.1

Let 〈g〉 = Z∗p , with p′ = (p − 1)/2 prime. Then Z∗p = QRp ∪ QRp with

QRp = {1, g2, . . . , g2p′−2} quadratic residues mod pQRp = {g , g3, . . . , g2p′−1} quadratic nonresidues mod p

hA hB KQRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%

Assume M ∈R {0, 1}.Given C = gMK .

Guess: M̂ ={

0, if C ∈ QRp ,

1, if C ∈ QRp .

Pr[M̂ = M] = 3/4 (check this!)Even worse: M can be recovered deterministically from the quadratic residuosityof hA, hB, and C . See Exercise 2.1.5.

Page 192: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

68/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Enough Security?Under DH assumption, attacker E cannot find key K given hA and hB. But,suppose K is used to encrypt 1-bit message M ∈ {0, 1}: ciphertext C = gMK .

Example 2.1

Let 〈g〉 = Z∗p , with p′ = (p − 1)/2 prime. Then Z∗p = QRp ∪ QRp with

QRp = {1, g2, . . . , g2p′−2} quadratic residues mod pQRp = {g , g3, . . . , g2p′−1} quadratic nonresidues mod p

hA hB KQRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%

Assume M ∈R {0, 1}.Given C = gMK .

Guess: M̂ ={

0, if C ∈ QRp ,

1, if C ∈ QRp .

Pr[M̂ = M] = 3/4 (check this!)Even worse: M can be recovered deterministically from the quadratic residuosityof hA, hB, and C . See Exercise 2.1.5.

Page 193: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

68/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Enough Security?Under DH assumption, attacker E cannot find key K given hA and hB. But,suppose K is used to encrypt 1-bit message M ∈ {0, 1}: ciphertext C = gMK .

Example 2.1

Let 〈g〉 = Z∗p , with p′ = (p − 1)/2 prime. Then Z∗p = QRp ∪ QRp with

QRp = {1, g2, . . . , g2p′−2} quadratic residues mod pQRp = {g , g3, . . . , g2p′−1} quadratic nonresidues mod p

hA hB KQRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%

Assume M ∈R {0, 1}.Given C = gMK .

Guess: M̂ ={

0, if C ∈ QRp ,

1, if C ∈ QRp .

Pr[M̂ = M] = 3/4 (check this!)Even worse: M can be recovered deterministically from the quadratic residuosityof hA, hB, and C . See Exercise 2.1.5.

Page 194: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

68/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Enough Security?Under DH assumption, attacker E cannot find key K given hA and hB. But,suppose K is used to encrypt 1-bit message M ∈ {0, 1}: ciphertext C = gMK .

Example 2.1

Let 〈g〉 = Z∗p , with p′ = (p − 1)/2 prime. Then Z∗p = QRp ∪ QRp with

QRp = {1, g2, . . . , g2p′−2} quadratic residues mod pQRp = {g , g3, . . . , g2p′−1} quadratic nonresidues mod p

hA hB KQRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%

Assume M ∈R {0, 1}.Given C = gMK .

Guess: M̂ ={

0, if C ∈ QRp ,

1, if C ∈ QRp .

Pr[M̂ = M] = 3/4 (check this!)Even worse: M can be recovered deterministically from the quadratic residuosityof hA, hB, and C . See Exercise 2.1.5.

Page 195: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

68/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Enough Security?Under DH assumption, attacker E cannot find key K given hA and hB. But,suppose K is used to encrypt 1-bit message M ∈ {0, 1}: ciphertext C = gMK .

Example 2.1

Let 〈g〉 = Z∗p , with p′ = (p − 1)/2 prime. Then Z∗p = QRp ∪ QRp with

QRp = {1, g2, . . . , g2p′−2} quadratic residues mod pQRp = {g , g3, . . . , g2p′−1} quadratic nonresidues mod p

hA hB KQRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%

Assume M ∈R {0, 1}.Given C = gMK .

Guess: M̂ ={

0, if C ∈ QRp ,

1, if C ∈ QRp .

Pr[M̂ = M] = 3/4 (check this!)Even worse: M can be recovered deterministically from the quadratic residuosityof hA, hB, and C . See Exercise 2.1.5.

Page 196: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

68/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Enough Security?Under DH assumption, attacker E cannot find key K given hA and hB. But,suppose K is used to encrypt 1-bit message M ∈ {0, 1}: ciphertext C = gMK .

Example 2.1

Let 〈g〉 = Z∗p , with p′ = (p − 1)/2 prime. Then Z∗p = QRp ∪ QRp with

QRp = {1, g2, . . . , g2p′−2} quadratic residues mod pQRp = {g , g3, . . . , g2p′−1} quadratic nonresidues mod p

hA hB KQRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%QRp QRp QRp 25%

Assume M ∈R {0, 1}.Given C = gMK .

Guess: M̂ ={

0, if C ∈ QRp ,

1, if C ∈ QRp .

Pr[M̂ = M] = 3/4 (check this!)Even worse: M can be recovered deterministically from the quadratic residuosityof hA, hB, and C . See Exercise 2.1.5.

Page 197: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

69/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Choice for Prime Order Groups

DDH assumption (Definition 1.11) to exclude any leakage of partial information.

Exercise 2.1.2Argue that the DDH assumption is false when n contains a small prime factor.

Simple way to exclude small prime factors: let n be sufficiently large prime.

Additional benefit: Zn is a field!

Page 198: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

70/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security under DDH Assumption

Balanced function f : 〈g〉 → {0, 1}, if a priori Pr[f (u) = 0] = Pr[f (u) = 1] = 1/2for u ∈R 〈g〉.Suppose E predicts f (K) better than guessing at random:

Pr[E(hA, hB) = f (K)] > 1/2 + ε, for nonnegligible ε

Given E , define distinguisher D for DDH:

D(gx , gy , g z ) :={

1, if E(gx , gy ) = f (g z ),0, if E(gx , gy ) 6= f (g z ).

On DH-triples:

Pr[D(hA, hB,K) = 1]= Pr[E(hA, hB) = f (K)]> 1/2 + ε

On random triples:

Pr[D(hA, hB, g z ) = 1]= Pr[E(hA, hB) = f (g z )]

“f is balanced”= 1/2

Advantage of D exceeds ε. Contradicts DDH assumption.

Page 199: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

70/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security under DDH Assumption

Balanced function f : 〈g〉 → {0, 1}, if a priori Pr[f (u) = 0] = Pr[f (u) = 1] = 1/2for u ∈R 〈g〉.Suppose E predicts f (K) better than guessing at random:

Pr[E(hA, hB) = f (K)] > 1/2 + ε, for nonnegligible ε

Given E , define distinguisher D for DDH:

D(gx , gy , g z ) :={

1, if E(gx , gy ) = f (g z ),0, if E(gx , gy ) 6= f (g z ).

On DH-triples:

Pr[D(hA, hB,K) = 1]= Pr[E(hA, hB) = f (K)]> 1/2 + ε

On random triples:

Pr[D(hA, hB, g z ) = 1]= Pr[E(hA, hB) = f (g z )]

“f is balanced”= 1/2

Advantage of D exceeds ε. Contradicts DDH assumption.

Page 200: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

70/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security under DDH Assumption

Balanced function f : 〈g〉 → {0, 1}, if a priori Pr[f (u) = 0] = Pr[f (u) = 1] = 1/2for u ∈R 〈g〉.Suppose E predicts f (K) better than guessing at random:

Pr[E(hA, hB) = f (K)] > 1/2 + ε, for nonnegligible ε

Given E , define distinguisher D for DDH:

D(gx , gy , g z ) :={

1, if E(gx , gy ) = f (g z ),0, if E(gx , gy ) 6= f (g z ).

On DH-triples:

Pr[D(hA, hB,K) = 1]= Pr[E(hA, hB) = f (K)]> 1/2 + ε

On random triples:

Pr[D(hA, hB, g z ) = 1]= Pr[E(hA, hB) = f (g z )]

“f is balanced”= 1/2

Advantage of D exceeds ε. Contradicts DDH assumption.

Page 201: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

70/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security under DDH Assumption

Balanced function f : 〈g〉 → {0, 1}, if a priori Pr[f (u) = 0] = Pr[f (u) = 1] = 1/2for u ∈R 〈g〉.Suppose E predicts f (K) better than guessing at random:

Pr[E(hA, hB) = f (K)] > 1/2 + ε, for nonnegligible ε

Given E , define distinguisher D for DDH:

D(gx , gy , g z ) :={

1, if E(gx , gy ) = f (g z ),0, if E(gx , gy ) 6= f (g z ).

On DH-triples:

Pr[D(hA, hB,K) = 1]= Pr[E(hA, hB) = f (K)]> 1/2 + ε

On random triples:

Pr[D(hA, hB, g z ) = 1]= Pr[E(hA, hB) = f (g z )]

“f is balanced”= 1/2

Advantage of D exceeds ε. Contradicts DDH assumption.

Page 202: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

70/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security under DDH Assumption

Balanced function f : 〈g〉 → {0, 1}, if a priori Pr[f (u) = 0] = Pr[f (u) = 1] = 1/2for u ∈R 〈g〉.Suppose E predicts f (K) better than guessing at random:

Pr[E(hA, hB) = f (K)] > 1/2 + ε, for nonnegligible ε

Given E , define distinguisher D for DDH:

D(gx , gy , g z ) :={

1, if E(gx , gy ) = f (g z ),0, if E(gx , gy ) 6= f (g z ).

On DH-triples:

Pr[D(hA, hB,K) = 1]= Pr[E(hA, hB) = f (K)]> 1/2 + ε

On random triples:

Pr[D(hA, hB, g z ) = 1]= Pr[E(hA, hB) = f (g z )]

“f is balanced”= 1/2

Advantage of D exceeds ε. Contradicts DDH assumption.

Page 203: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

70/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security under DDH Assumption

Balanced function f : 〈g〉 → {0, 1}, if a priori Pr[f (u) = 0] = Pr[f (u) = 1] = 1/2for u ∈R 〈g〉.Suppose E predicts f (K) better than guessing at random:

Pr[E(hA, hB) = f (K)] > 1/2 + ε, for nonnegligible ε

Given E , define distinguisher D for DDH:

D(gx , gy , g z ) :={

1, if E(gx , gy ) = f (g z ),0, if E(gx , gy ) 6= f (g z ).

On DH-triples:

Pr[D(hA, hB,K) = 1]= Pr[E(hA, hB) = f (K)]> 1/2 + ε

On random triples:

Pr[D(hA, hB, g z ) = 1]= Pr[E(hA, hB) = f (g z )]

“f is balanced”= 1/2

Advantage of D exceeds ε. Contradicts DDH assumption.

Page 204: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

71/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Exercise

Exercise 2.1.3Extend the above analysis to the case that the a priori probabilities are given byPr[f (u) = 0] = p0 and Pr[f (u) = 1] = p1 = 1− p0.

Page 205: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

72/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Hashed DH Key Exchange

Cryptographic hash function H : 〈g〉 → {0, 1}k .

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← gxA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← H(hxAB ) KBA ← H(hxB

A )

K = H(gxAxB ) is a k-bit approximately uniformly random key.Assuming n� 2k (e.g., n ≈ 2256 and k = 128).

Page 206: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

72/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Hashed DH Key Exchange

Cryptographic hash function H : 〈g〉 → {0, 1}k .

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← gxA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← H(hxAB ) KBA ← H(hxB

A )

K = H(gxAxB ) is a k-bit approximately uniformly random key.Assuming n� 2k (e.g., n ≈ 2256 and k = 128).

Page 207: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

72/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Hashed DH Key Exchange

Cryptographic hash function H : 〈g〉 → {0, 1}k .

Party A Party B

xA ∈R Z∗n xB ∈R Z∗nhA ← gxA hB ← g xB

−−−−−hA−−−−−−−→

←−−−−−hB−−−−−−−

KAB ← H(hxAB ) KBA ← H(hxB

A )

K = H(gxAxB ) is a k-bit approximately uniformly random key.Assuming n� 2k (e.g., n ≈ 2256 and k = 128).

Page 208: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

73/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof

Balanced function f : {0, 1}k → {0, 1}, if a prioriPr[f (u) = 0] = Pr[f (u) = 1] = 1/2 for u ∈R {0, 1}k .Intuition is to consider “lucky” event L: “E queries H on input gxAxB”If ¬L, then E has no advantage over guessing at random:

Pr[E(hA, hB) = f (K) | ¬L] = 1/2

If L, then E might be successful, so use trivial upper bound:

Pr[E(hA, hB) = f (K) | L] ≤ 1

Hence:

Pr[E(hA, hB) = f (K)]= Pr[E(hA, hB) = f (K) | L] Pr[L] + Pr[E(hA, hB) = f (K) | ¬L] Pr[¬L]≤ Pr[L] + Pr[E(hA, hB) = f (K) | ¬L] Pr[¬L]= Pr[L] + 1

2 (1− Pr[L])= 1

2 + 12 Pr[L].

Page 209: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

73/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof

Balanced function f : {0, 1}k → {0, 1}, if a prioriPr[f (u) = 0] = Pr[f (u) = 1] = 1/2 for u ∈R {0, 1}k .Intuition is to consider “lucky” event L: “E queries H on input gxAxB”If ¬L, then E has no advantage over guessing at random:

Pr[E(hA, hB) = f (K) | ¬L] = 1/2

If L, then E might be successful, so use trivial upper bound:

Pr[E(hA, hB) = f (K) | L] ≤ 1

Hence:

Pr[E(hA, hB) = f (K)]= Pr[E(hA, hB) = f (K) | L] Pr[L] + Pr[E(hA, hB) = f (K) | ¬L] Pr[¬L]≤ Pr[L] + Pr[E(hA, hB) = f (K) | ¬L] Pr[¬L]= Pr[L] + 1

2 (1− Pr[L])= 1

2 + 12 Pr[L].

Page 210: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

73/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof

Balanced function f : {0, 1}k → {0, 1}, if a prioriPr[f (u) = 0] = Pr[f (u) = 1] = 1/2 for u ∈R {0, 1}k .Intuition is to consider “lucky” event L: “E queries H on input gxAxB”If ¬L, then E has no advantage over guessing at random:

Pr[E(hA, hB) = f (K) | ¬L] = 1/2

If L, then E might be successful, so use trivial upper bound:

Pr[E(hA, hB) = f (K) | L] ≤ 1

Hence:

Pr[E(hA, hB) = f (K)]= Pr[E(hA, hB) = f (K) | L] Pr[L] + Pr[E(hA, hB) = f (K) | ¬L] Pr[¬L]≤ Pr[L] + Pr[E(hA, hB) = f (K) | ¬L] Pr[¬L]= Pr[L] + 1

2 (1− Pr[L])= 1

2 + 12 Pr[L].

Page 211: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

73/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof

Balanced function f : {0, 1}k → {0, 1}, if a prioriPr[f (u) = 0] = Pr[f (u) = 1] = 1/2 for u ∈R {0, 1}k .Intuition is to consider “lucky” event L: “E queries H on input gxAxB”If ¬L, then E has no advantage over guessing at random:

Pr[E(hA, hB) = f (K) | ¬L] = 1/2

If L, then E might be successful, so use trivial upper bound:

Pr[E(hA, hB) = f (K) | L] ≤ 1

Hence:

Pr[E(hA, hB) = f (K)]= Pr[E(hA, hB) = f (K) | L] Pr[L] + Pr[E(hA, hB) = f (K) | ¬L] Pr[¬L]≤ Pr[L] + Pr[E(hA, hB) = f (K) | ¬L] Pr[¬L]= Pr[L] + 1

2 (1− Pr[L])= 1

2 + 12 Pr[L].

Page 212: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

73/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof

Balanced function f : {0, 1}k → {0, 1}, if a prioriPr[f (u) = 0] = Pr[f (u) = 1] = 1/2 for u ∈R {0, 1}k .Intuition is to consider “lucky” event L: “E queries H on input gxAxB”If ¬L, then E has no advantage over guessing at random:

Pr[E(hA, hB) = f (K) | ¬L] = 1/2

If L, then E might be successful, so use trivial upper bound:

Pr[E(hA, hB) = f (K) | L] ≤ 1

Hence:

Pr[E(hA, hB) = f (K)]= Pr[E(hA, hB) = f (K) | L] Pr[L] + Pr[E(hA, hB) = f (K) | ¬L] Pr[¬L]≤ Pr[L] + Pr[E(hA, hB) = f (K) | ¬L] Pr[¬L]= Pr[L] + 1

2 (1− Pr[L])= 1

2 + 12 Pr[L].

Page 213: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

74/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof: Bounding Pr[L]

Event L: during attack, E queries H on input gxAxB .

We show that Pr[L] is negligible under the DH assumption.

Define p.p.t. algorithm E ′, using p.p.t. E as a subroutine:1 take hA and hB as inputs;2 run E on these inputs, while recording all H queries made by E ;3 return an H query (made by E) at random.

Let t denote total number of H queries. Then:

Pr[E ′(hA, hB) = g xAxB ] = Pr[L]/t⇔ Pr[L] = t Pr[E ′(hA, hB) = gxAxB ].

E is p.p.t. ⇒ t is polynomialDH assumption ⇒ Pr[E ′(hA, hB) = gxAxB ] is negligible

Hence, Pr[L] is negligible.

Page 214: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

74/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof: Bounding Pr[L]

Event L: during attack, E queries H on input gxAxB .

We show that Pr[L] is negligible under the DH assumption.

Define p.p.t. algorithm E ′, using p.p.t. E as a subroutine:1 take hA and hB as inputs;2 run E on these inputs, while recording all H queries made by E ;3 return an H query (made by E) at random.

Let t denote total number of H queries. Then:

Pr[E ′(hA, hB) = g xAxB ] = Pr[L]/t⇔ Pr[L] = t Pr[E ′(hA, hB) = gxAxB ].

E is p.p.t. ⇒ t is polynomialDH assumption ⇒ Pr[E ′(hA, hB) = gxAxB ] is negligible

Hence, Pr[L] is negligible.

Page 215: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

74/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof: Bounding Pr[L]

Event L: during attack, E queries H on input gxAxB .

We show that Pr[L] is negligible under the DH assumption.

Define p.p.t. algorithm E ′, using p.p.t. E as a subroutine:1 take hA and hB as inputs;2 run E on these inputs, while recording all H queries made by E ;3 return an H query (made by E) at random.

Let t denote total number of H queries. Then:

Pr[E ′(hA, hB) = g xAxB ] = Pr[L]/t⇔ Pr[L] = t Pr[E ′(hA, hB) = gxAxB ].

E is p.p.t. ⇒ t is polynomialDH assumption ⇒ Pr[E ′(hA, hB) = gxAxB ] is negligible

Hence, Pr[L] is negligible.

Page 216: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

74/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof: Bounding Pr[L]

Event L: during attack, E queries H on input gxAxB .

We show that Pr[L] is negligible under the DH assumption.

Define p.p.t. algorithm E ′, using p.p.t. E as a subroutine:1 take hA and hB as inputs;2 run E on these inputs, while recording all H queries made by E ;3 return an H query (made by E) at random.

Let t denote total number of H queries. Then:

Pr[E ′(hA, hB) = g xAxB ] = Pr[L]/t⇔ Pr[L] = t Pr[E ′(hA, hB) = gxAxB ].

E is p.p.t. ⇒ t is polynomialDH assumption ⇒ Pr[E ′(hA, hB) = gxAxB ] is negligible

Hence, Pr[L] is negligible.

Page 217: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

74/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof: Bounding Pr[L]

Event L: during attack, E queries H on input gxAxB .

We show that Pr[L] is negligible under the DH assumption.

Define p.p.t. algorithm E ′, using p.p.t. E as a subroutine:1 take hA and hB as inputs;2 run E on these inputs, while recording all H queries made by E ;3 return an H query (made by E) at random.

Let t denote total number of H queries. Then:

Pr[E ′(hA, hB) = g xAxB ] = Pr[L]/t⇔ Pr[L] = t Pr[E ′(hA, hB) = gxAxB ].

E is p.p.t. ⇒ t is polynomialDH assumption ⇒ Pr[E ′(hA, hB) = gxAxB ] is negligible

Hence, Pr[L] is negligible.

Page 218: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

74/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof: Bounding Pr[L]

Event L: during attack, E queries H on input gxAxB .

We show that Pr[L] is negligible under the DH assumption.

Define p.p.t. algorithm E ′, using p.p.t. E as a subroutine:1 take hA and hB as inputs;2 run E on these inputs, while recording all H queries made by E ;3 return an H query (made by E) at random.

Let t denote total number of H queries. Then:

Pr[E ′(hA, hB) = g xAxB ] = Pr[L]/t⇔ Pr[L] = t Pr[E ′(hA, hB) = gxAxB ].

E is p.p.t. ⇒ t is polynomialDH assumption ⇒ Pr[E ′(hA, hB) = gxAxB ] is negligible

Hence, Pr[L] is negligible.

Page 219: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

74/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Security Proof: Bounding Pr[L]

Event L: during attack, E queries H on input gxAxB .

We show that Pr[L] is negligible under the DH assumption.

Define p.p.t. algorithm E ′, using p.p.t. E as a subroutine:1 take hA and hB as inputs;2 run E on these inputs, while recording all H queries made by E ;3 return an H query (made by E) at random.

Let t denote total number of H queries. Then:

Pr[E ′(hA, hB) = g xAxB ] = Pr[L]/t⇔ Pr[L] = t Pr[E ′(hA, hB) = gxAxB ].

E is p.p.t. ⇒ t is polynomialDH assumption ⇒ Pr[E ′(hA, hB) = gxAxB ] is negligible

Hence, Pr[L] is negligible.

Page 220: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

75/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Exercise

Exercise 2.1.4Extend the above analysis to the case that the a priori probabilities are given byPr[f (u) = 0] = p0 and Pr[f (u) = 1] = p1 = 1− p0.

Page 221: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

76/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

ElGamal Encryption

ElGamal cryptosystem, for security parameter kKey generation. Pick group 〈g〉 of order n at random among “size” k groups.

Pick private key x ∈R Z∗n . Set public key as h = g x .Encryption. Given plaintext M ∈ 〈g〉 and public key h. The ciphertext is the

pair (gu, huM), where u ∈R Zn.Decryption. Given ciphertext (A,B), the plaintext is recovered as M = B/Ax ,

using private key x .

Semantically secure under DDH assumption: ciphertext leaks no information.

ElGamal encryption ' Diffie-Hellman Key Exchange plus transfer of M

Party A Party BxA ∈R Z∗n xB ∈R Zn

hA ← g xA−−−−−

hA−−−−−−−→ KBA ← hxB

A

KAB ← hxAB ←−−−−−

hB−−−−−−− hB ← gxB

M ← cB/KAB ←−−−−−cB−−−−−− cB ← KBAM

Page 222: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

76/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

ElGamal Encryption

ElGamal cryptosystem, for security parameter kKey generation. Pick group 〈g〉 of order n at random among “size” k groups.

Pick private key x ∈R Z∗n . Set public key as h = g x .Encryption. Given plaintext M ∈ 〈g〉 and public key h. The ciphertext is the

pair (gu, huM), where u ∈R Zn.Decryption. Given ciphertext (A,B), the plaintext is recovered as M = B/Ax ,

using private key x .

Semantically secure under DDH assumption: ciphertext leaks no information.

ElGamal encryption ' Diffie-Hellman Key Exchange plus transfer of M

Party A Party BxA ∈R Z∗n xB ∈R Zn

hA ← g xA−−−−−

hA−−−−−−−→ KBA ← hxB

A

KAB ← hxAB ←−−−−−

hB−−−−−−− hB ← gxB

M ← cB/KAB ←−−−−−cB−−−−−− cB ← KBAM

Page 223: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

76/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

ElGamal Encryption

ElGamal cryptosystem, for security parameter kKey generation. Pick group 〈g〉 of order n at random among “size” k groups.

Pick private key x ∈R Z∗n . Set public key as h = g x .Encryption. Given plaintext M ∈ 〈g〉 and public key h. The ciphertext is the

pair (gu, huM), where u ∈R Zn.Decryption. Given ciphertext (A,B), the plaintext is recovered as M = B/Ax ,

using private key x .

Semantically secure under DDH assumption: ciphertext leaks no information.

ElGamal encryption ' Diffie-Hellman Key Exchange plus transfer of M

Party A Party BxA ∈R Z∗n xB ∈R Zn

hA ← g xA−−−−−

hA−−−−−−−→ KBA ← hxB

A

KAB ← hxAB ←−−−−−

hB−−−−−−− hB ← gxB

M ← cB/KAB ←−−−−−cB−−−−−− cB ← KBAM

Page 224: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

77/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Exercise

Exercise 2.1.5Show how to break the ElGamal cryptosystem for 〈g〉 = Z∗p , with p = 2p′ + 1,p, p′ both prime. Focus on the case that M ∈ {1, g}, and show how to recover M.

Page 225: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

78/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Practical ElGamal EncryptionCryptographic hash function H : 〈g〉 → {0, 1}k .

Practical ElGamal cryptosystem, using HKey generation. As above.

Encryption. Given plaintext M ∈ {0, 1}k and public key h. The ciphertext isthe pair (gu,H(hu)⊕M), where u ∈R Zn.

Decryption. Given ciphertext (A,B), the plaintext is recovered asM = H(Ax )⊕ B, using private key x .

Semantically secure under DH assumption, in Random Oracle model.

Connection with Hashed DH Key Exchange

Party A Party BxA ∈R Z∗n xB ∈R Zn

hA ← gxA−−−−−

hA−−−−−−−→ KBA ← hxB

A

KAB ← hxAB ←−−−−−

hB−−−−−−− hB ← gxB

M ← H(KAB)⊕ cB ←−−−−−cB−−−−−− cB ← H(KBA)⊕M

Page 226: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

78/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Practical ElGamal EncryptionCryptographic hash function H : 〈g〉 → {0, 1}k .

Practical ElGamal cryptosystem, using HKey generation. As above.

Encryption. Given plaintext M ∈ {0, 1}k and public key h. The ciphertext isthe pair (gu,H(hu)⊕M), where u ∈R Zn.

Decryption. Given ciphertext (A,B), the plaintext is recovered asM = H(Ax )⊕ B, using private key x .

Semantically secure under DH assumption, in Random Oracle model.

Connection with Hashed DH Key Exchange

Party A Party BxA ∈R Z∗n xB ∈R Zn

hA ← gxA−−−−−

hA−−−−−−−→ KBA ← hxB

A

KAB ← hxAB ←−−−−−

hB−−−−−−− hB ← gxB

M ← H(KAB)⊕ cB ←−−−−−cB−−−−−− cB ← H(KBA)⊕M

Page 227: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

78/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.1.1 Basic Protocol2.1.2 Passive Attacks2.1.3 A Practical Variant2.1.4 Aside: ElGamal Encryption

Practical ElGamal EncryptionCryptographic hash function H : 〈g〉 → {0, 1}k .

Practical ElGamal cryptosystem, using HKey generation. As above.

Encryption. Given plaintext M ∈ {0, 1}k and public key h. The ciphertext isthe pair (gu,H(hu)⊕M), where u ∈R Zn.

Decryption. Given ciphertext (A,B), the plaintext is recovered asM = H(Ax )⊕ B, using private key x .

Semantically secure under DH assumption, in Random Oracle model.

Connection with Hashed DH Key Exchange

Party A Party BxA ∈R Z∗n xB ∈R Zn

hA ← gxA−−−−−

hA−−−−−−−→ KBA ← hxB

A

KAB ← hxAB ←−−−−−

hB−−−−−−− hB ← gxB

M ← H(KAB)⊕ cB ←−−−−−cB−−−−−− cB ← H(KBA)⊕M

Page 228: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

79/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Man-in-the-Middle Attacks

Active attacker may impersonate your protocol partner.

Classic man-in-the-middle attack

Party A Attacker E Party BxA ∈R Z∗n x ′A, x ′B ∈R Z∗n xB ∈R Z∗nhA ← g xA h′A, h′B ← g x′A , gx′B hB ← gxB

−−−hA−−−−−→ −−−

h′A−−−−−→

←−−−h′B−−−−− ←−−−

hB−−−−−

KAE ← h′BxA KAE ,KEB ← hx′B

A , hx′AB KEB ← h′A

xB

Man-in-the-middle E :session key KAE with Asession key KEB with Baccess to all traffic in clear between A and B; can also modify things.

Page 229: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

80/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Man-in-the-Middle Attacks

Arbitrary man-in-the-middle attacks

Party A Attacker E Party BxA ∈R Z∗n xB ∈R Z∗nhA ← g xA h′A, h′B ← . . . , . . . hB ← gxB

−−−hA−−−−−→ −−−

h′A−−−−−→

←−−−h′B−−−−− ←−−−

hB−−−−−

KAE ← h′BxA KEB ← h′A

xB

h′A h′B KAE KEBAttack 0 1 1 1 1Attack 1 g g g xA g xB

Attack 2 gx′A gx′B gxAx′B gx′AxB

Attack 3 hAgu hB gxAxB g (xA+u)xB

Attack 4 1/hA 1/hB g−xAxB g−xAxB

Page 230: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

81/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Signature-Based Authenticated Key Exchange

(pkA, skA) key pair of party A(pkB, skB) key pair of party BS signature generation algorithmV signature verification algorithm

Party A Party BxA ∈R Z∗n xB ∈R Z∗nhA ← gxA hB ← g xB

sA ← SskA(hA,B) −−hA, sA−−−−−−→

←−−hB, sB−−−−−− sB ← SskB (hA, hB,A)

VpkB (sB, (hA, hB,A))? VpkA(sA, (hA,B))?KAB ← hxA

B KBA ← hxBA

Secure under DDH assumption, assuming digital signature scheme is secure(against adaptive chosen-message attack).Use of digital signatures is somewhat costly.

Page 231: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

81/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Signature-Based Authenticated Key Exchange

(pkA, skA) key pair of party A(pkB, skB) key pair of party BS signature generation algorithmV signature verification algorithm

Party A Party BxA ∈R Z∗n xB ∈R Z∗nhA ← gxA hB ← g xB

sA ← SskA(hA,B) −−hA, sA−−−−−−→

←−−hB, sB−−−−−− sB ← SskB (hA, hB,A)

VpkB (sB, (hA, hB,A))? VpkA(sA, (hA,B))?KAB ← hxA

B KBA ← hxBA

Secure under DDH assumption, assuming digital signature scheme is secure(against adaptive chosen-message attack).Use of digital signatures is somewhat costly.

Page 232: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

81/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Signature-Based Authenticated Key Exchange

(pkA, skA) key pair of party A(pkB, skB) key pair of party BS signature generation algorithmV signature verification algorithm

Party A Party BxA ∈R Z∗n xB ∈R Z∗nhA ← gxA hB ← g xB

sA ← SskA(hA,B) −−hA, sA−−−−−−→

←−−hB, sB−−−−−− sB ← SskB (hA, hB,A)

VpkB (sB, (hA, hB,A))? VpkA(sA, (hA,B))?KAB ← hxA

B KBA ← hxBA

Secure under DDH assumption, assuming digital signature scheme is secure(against adaptive chosen-message attack).Use of digital signatures is somewhat costly.

Page 233: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

82/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Password-Based Authenticated Key Exchangew ∈ {0, 1}∗ password known to A and B onlyE ,D : {0, 1}∗ × 〈g〉 → 〈g〉 symmetric encryption/decryption algorithms

Party A Party BxA ∈R Z∗n xB ∈R Z∗nhA ← gxA hB ← g xB

cA ← Ew (hA) cB ← Ew (hB)

−−−−cA−−−−−−→

←−−−−cB−−−−−

KAB ← (Dw (cB))xA KBA ← (Dw (cA))xB

Then KAB = KBA = g xAxB .Passive attacker sees Ew (hA) and Ew (hB). No information on w , since hA andhB are random and unknown to the attacker. But, use of K in ensuing sessionmay reveal information on K , hence on w .Active attacker may try w ′ by sending Ew′(hA) on behalf of A. When sessionsucceeds, w ′ is correct. Best attacker can do is trying passwords one at a time.No off-line dictionary attack.

Page 234: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

82/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Password-Based Authenticated Key Exchangew ∈ {0, 1}∗ password known to A and B onlyE ,D : {0, 1}∗ × 〈g〉 → 〈g〉 symmetric encryption/decryption algorithms

Party A Party BxA ∈R Z∗n xB ∈R Z∗nhA ← gxA hB ← g xB

cA ← Ew (hA) cB ← Ew (hB)

−−−−cA−−−−−−→

←−−−−cB−−−−−

KAB ← (Dw (cB))xA KBA ← (Dw (cA))xB

Then KAB = KBA = g xAxB .Passive attacker sees Ew (hA) and Ew (hB). No information on w , since hA andhB are random and unknown to the attacker. But, use of K in ensuing sessionmay reveal information on K , hence on w .Active attacker may try w ′ by sending Ew′(hA) on behalf of A. When sessionsucceeds, w ′ is correct. Best attacker can do is trying passwords one at a time.No off-line dictionary attack.

Page 235: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

82/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Password-Based Authenticated Key Exchangew ∈ {0, 1}∗ password known to A and B onlyE ,D : {0, 1}∗ × 〈g〉 → 〈g〉 symmetric encryption/decryption algorithms

Party A Party BxA ∈R Z∗n xB ∈R Z∗nhA ← gxA hB ← g xB

cA ← Ew (hA) cB ← Ew (hB)

−−−−cA−−−−−−→

←−−−−cB−−−−−

KAB ← (Dw (cB))xA KBA ← (Dw (cA))xB

Then KAB = KBA = g xAxB .Passive attacker sees Ew (hA) and Ew (hB). No information on w , since hA andhB are random and unknown to the attacker. But, use of K in ensuing sessionmay reveal information on K , hence on w .Active attacker may try w ′ by sending Ew′(hA) on behalf of A. When sessionsucceeds, w ′ is correct. Best attacker can do is trying passwords one at a time.No off-line dictionary attack.

Page 236: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

82/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Password-Based Authenticated Key Exchangew ∈ {0, 1}∗ password known to A and B onlyE ,D : {0, 1}∗ × 〈g〉 → 〈g〉 symmetric encryption/decryption algorithms

Party A Party BxA ∈R Z∗n xB ∈R Z∗nhA ← gxA hB ← g xB

cA ← Ew (hA) cB ← Ew (hB)

−−−−cA−−−−−−→

←−−−−cB−−−−−

KAB ← (Dw (cB))xA KBA ← (Dw (cA))xB

Then KAB = KBA = g xAxB .Passive attacker sees Ew (hA) and Ew (hB). No information on w , since hA andhB are random and unknown to the attacker. But, use of K in ensuing sessionmay reveal information on K , hence on w .Active attacker may try w ′ by sending Ew′(hA) on behalf of A. When sessionsucceeds, w ′ is correct. Best attacker can do is trying passwords one at a time.No off-line dictionary attack.

Page 237: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

83/205

2 Key Exchange Protocols

2.1 Diffie-Hellman Key Exchange2.2 Authenticated Key Exchange

2.2.1 Man-in-the-Middle Attacks2.2.2 A Protocol Using Digital Signatures2.2.3 A Protocol Using Password-Based Encryption

Party A Protocol I Party BxA ∈R Z∗n

hA ← MxA−−−

hA−−−−−→ xB ∈R Z∗n

←−−−hAB−−−−−− hAB ← hxB

A

hB ← h1/xAAB −−−

hB−−−−−→M′ ← h1/xB

B

Party A Protocol II Party BbA ∈R {0, 1}cA ← b ⊕ bA −−−

cA−−−−−→ bB ∈R {0, 1}

←−−−cAB−−−−−− cAB ← cA ⊕ bB

cB ← cAB ⊕ bA −−−−cB−−−−−→ b′ ← cB ⊕ bB

Exercise 2.2.1Consider Protocols I and II for sending a plaintext securely from A to B over aninsecure channel. In Protocol I plaintext M ∈ 〈g〉, M 6= 1; in Protocol II plaintextb ∈ {0, 1}. The object of both protocols is that the plaintext remains completelyhidden from other parties than A and B, and that the plaintext cannot bemodified by other parties than A or B.First, verify that M′ = M and b′ = b if A and B follow protocols I and II,respectively. Next, determine for protocol I whether it is secure against passiveattacks, and whether it is secure against active attacks. If secure, describe therelevant computational assumption (if any); if insecure, show an attack. Do thesame for protocol II.

Page 238: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

84/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

Commitments

Party A Party B

Commit phase :

Put message incommitment.Keep key.

−−−−−−−−−−−−−→Commitmentstored for later.

Reveal phase :

−−−−−−−−−−−−→Check messagein commitment.

Page 239: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

85/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

Coin Flipping by Telephone

Mutually random bit?

Party A Party BbA ∈R {0, 1} −−−−−

bA−−−−−−−→

←−−−−−bB−−−−−−− bB ∈R {0, 1}

b ← bA ⊕ bB b ← bA ⊕ bB

Protocol flaw:

Party B can set bB = bA ⊕ b∗ for bit value b∗ of its liking.

Insider attack! By your protocol partner.

Page 240: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

85/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

Coin Flipping by Telephone

Mutually random bit?

Party A Party BbA ∈R {0, 1} −−−−−

bA−−−−−−−→

←−−−−−bB−−−−−−− bB ∈R {0, 1}

b ← bA ⊕ bB b ← bA ⊕ bB

Protocol flaw:

Party B can set bB = bA ⊕ b∗ for bit value b∗ of its liking.

Insider attack! By your protocol partner.

Page 241: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

86/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

Coin Flipping by Telephone

Use commitments.

Mutually random bit!

Party A Party BbA ∈R {0, 1} −

“commit to bA”−−−−−−−−−−−−−→

←−−−−−−bB−−−−−−−− bB ∈R {0, 1}

−−“reveal bA”−−−−−−−−−−→

b ← bA ⊕ bB b ← bA ⊕ bB

If A or B is honest, bit b is distributed uniformly at random, provided:commitment hides bA from party Bcommitment binds party A to bA (no change possible).

Page 242: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

87/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

Asymmetric functionality.

Definition 3.1 (Commitment schemes)

Let commit : {0, 1}k × {0, 1}∗ → {0, 1}∗ be a deterministic polynomial timealgorithm. Noninteractive commitment scheme between sender and receiver:Commit Phase. Protocol in which sender commits to x ∈ {0, 1}∗ by computing

C = commit(u, x) with u ∈R {0, 1}k , and sending C to receiver.Receiver stores C for later use.

Reveal Phase. Protocol in which sender opens commitment C = commit(u, x) bysending u and x to receiver. Receiver computes commit(u, x) andverifies equality to C .

Security for sender: commit(u, x) should not leak information on x .Let X = {commit(u, 0) : u ∈R {0, 1}k}, Y = {commit(u, 1) : u ∈R {0, 1}k}.Computationally hiding. X and Y computationally indistinguishable.Information-theoretically hiding. X and Y statistically indistinguishable.Security for receiver: commit(u, x) can be opened in one way only.Computationally binding. Adversary restricted to p.p.t. algorithm.Information-theoretically binding. Adversary unlimitedly powerful.

Page 243: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

87/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

Asymmetric functionality.

Definition 3.1 (Commitment schemes)

Let commit : {0, 1}k × {0, 1}∗ → {0, 1}∗ be a deterministic polynomial timealgorithm. Noninteractive commitment scheme between sender and receiver:Commit Phase. Protocol in which sender commits to x ∈ {0, 1}∗ by computing

C = commit(u, x) with u ∈R {0, 1}k , and sending C to receiver.Receiver stores C for later use.

Reveal Phase. Protocol in which sender opens commitment C = commit(u, x) bysending u and x to receiver. Receiver computes commit(u, x) andverifies equality to C .

Security for sender: commit(u, x) should not leak information on x .Let X = {commit(u, 0) : u ∈R {0, 1}k}, Y = {commit(u, 1) : u ∈R {0, 1}k}.Computationally hiding. X and Y computationally indistinguishable.Information-theoretically hiding. X and Y statistically indistinguishable.Security for receiver: commit(u, x) can be opened in one way only.Computationally binding. Adversary restricted to p.p.t. algorithm.Information-theoretically binding. Adversary unlimitedly powerful.

Page 244: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

87/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

Asymmetric functionality.

Definition 3.1 (Commitment schemes)

Let commit : {0, 1}k × {0, 1}∗ → {0, 1}∗ be a deterministic polynomial timealgorithm. Noninteractive commitment scheme between sender and receiver:Commit Phase. Protocol in which sender commits to x ∈ {0, 1}∗ by computing

C = commit(u, x) with u ∈R {0, 1}k , and sending C to receiver.Receiver stores C for later use.

Reveal Phase. Protocol in which sender opens commitment C = commit(u, x) bysending u and x to receiver. Receiver computes commit(u, x) andverifies equality to C .

Security for sender: commit(u, x) should not leak information on x .Let X = {commit(u, 0) : u ∈R {0, 1}k}, Y = {commit(u, 1) : u ∈R {0, 1}k}.Computationally hiding. X and Y computationally indistinguishable.Information-theoretically hiding. X and Y statistically indistinguishable.Security for receiver: commit(u, x) can be opened in one way only.Computationally binding. Adversary restricted to p.p.t. algorithm.Information-theoretically binding. Adversary unlimitedly powerful.

Page 245: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

88/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Given cryptographic hash function H.

Hash-based bit commitment scheme

commit0(u, x) = H(u, x), u ∈R {0, 1}k

Computationally binding:Implied by collision resistance:H(u, x) = H(u′, 1− x) is a collision.Hence, also binding in the random oracle model.

Computationally hiding:Preimage resistance necessary but not sufficient:H(u, x) might leak partial information on input u, x(See also Exercise 1.3.10 on partial preimage resistance.)Hiding in the random oracle model:H(u, x) is uniformly random and independent of x

Page 246: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

88/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Given cryptographic hash function H.

Hash-based bit commitment scheme

commit0(u, x) = H(u, x), u ∈R {0, 1}k

Computationally binding:Implied by collision resistance:H(u, x) = H(u′, 1− x) is a collision.Hence, also binding in the random oracle model.

Computationally hiding:Preimage resistance necessary but not sufficient:H(u, x) might leak partial information on input u, x(See also Exercise 1.3.10 on partial preimage resistance.)Hiding in the random oracle model:H(u, x) is uniformly random and independent of x

Page 247: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

88/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Given cryptographic hash function H.

Hash-based bit commitment scheme

commit0(u, x) = H(u, x), u ∈R {0, 1}k

Computationally binding:Implied by collision resistance:H(u, x) = H(u′, 1− x) is a collision.Hence, also binding in the random oracle model.

Computationally hiding:Preimage resistance necessary but not sufficient:H(u, x) might leak partial information on input u, x(See also Exercise 1.3.10 on partial preimage resistance.)Hiding in the random oracle model:H(u, x) is uniformly random and independent of x

Page 248: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

89/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Two Complementary SchemesDL setting: generators g , h such that nobody knows logg h.

Pedersen’s bit commitment scheme

commit1(u, x) = guhx , u ∈R Zn

Computationally binding under DL assumption:

commit1(u, x) = commit1(u′, 1− x)⇔ guhx = gu′h1−x ⇔ logg h = u − u′

1− 2xInformation-theoretically hiding: guhx is statistically independent of x .

ElGamal-based bit commitment scheme

commit2(u, x) = (gu, hu+x ), u ∈R Zn

Information-theoretically binding:

commit2(u, x) = commit2(u′, 1− x)⇔ (gu, hu+x ) = (gu′ , hu′+1−x )⇔ false

Computationally hiding under DDH assumption (DL assumption not sufficient).

Page 249: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

89/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Two Complementary SchemesDL setting: generators g , h such that nobody knows logg h.

Pedersen’s bit commitment scheme

commit1(u, x) = guhx , u ∈R Zn

Computationally binding under DL assumption:

commit1(u, x) = commit1(u′, 1− x)⇔ guhx = gu′h1−x ⇔ logg h = u − u′

1− 2xInformation-theoretically hiding: guhx is statistically independent of x .

ElGamal-based bit commitment scheme

commit2(u, x) = (gu, hu+x ), u ∈R Zn

Information-theoretically binding:

commit2(u, x) = commit2(u′, 1− x)⇔ (gu, hu+x ) = (gu′ , hu′+1−x )⇔ false

Computationally hiding under DDH assumption (DL assumption not sufficient).

Page 250: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

89/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Two Complementary SchemesDL setting: generators g , h such that nobody knows logg h.

Pedersen’s bit commitment scheme

commit1(u, x) = guhx , u ∈R Zn

Computationally binding under DL assumption:

commit1(u, x) = commit1(u′, 1− x)⇔ guhx = gu′h1−x ⇔ logg h = u − u′

1− 2xInformation-theoretically hiding: guhx is statistically independent of x .

ElGamal-based bit commitment scheme

commit2(u, x) = (gu, hu+x ), u ∈R Zn

Information-theoretically binding:

commit2(u, x) = commit2(u′, 1− x)⇔ (gu, hu+x ) = (gu′ , hu′+1−x )⇔ false

Computationally hiding under DDH assumption (DL assumption not sufficient).

Page 251: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

89/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Two Complementary SchemesDL setting: generators g , h such that nobody knows logg h.

Pedersen’s bit commitment scheme

commit1(u, x) = guhx , u ∈R Zn

Computationally binding under DL assumption:

commit1(u, x) = commit1(u′, 1− x)⇔ guhx = gu′h1−x ⇔ logg h = u − u′

1− 2xInformation-theoretically hiding: guhx is statistically independent of x .

ElGamal-based bit commitment scheme

commit2(u, x) = (gu, hu+x ), u ∈R Zn

Information-theoretically binding:

commit2(u, x) = commit2(u′, 1− x)⇔ (gu, hu+x ) = (gu′ , hu′+1−x )⇔ false

Computationally hiding under DDH assumption (DL assumption not sufficient).

Page 252: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

89/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Two Complementary SchemesDL setting: generators g , h such that nobody knows logg h.

Pedersen’s bit commitment scheme

commit1(u, x) = guhx , u ∈R Zn

Computationally binding under DL assumption:

commit1(u, x) = commit1(u′, 1− x)⇔ guhx = gu′h1−x ⇔ logg h = u − u′

1− 2xInformation-theoretically hiding: guhx is statistically independent of x .

ElGamal-based bit commitment scheme

commit2(u, x) = (gu, hu+x ), u ∈R Zn

Information-theoretically binding:

commit2(u, x) = commit2(u′, 1− x)⇔ (gu, hu+x ) = (gu′ , hu′+1−x )⇔ false

Computationally hiding under DDH assumption (DL assumption not sufficient).

Page 253: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

89/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Two Complementary SchemesDL setting: generators g , h such that nobody knows logg h.

Pedersen’s bit commitment scheme

commit1(u, x) = guhx , u ∈R Zn

Computationally binding under DL assumption:

commit1(u, x) = commit1(u′, 1− x)⇔ guhx = gu′h1−x ⇔ logg h = u − u′

1− 2xInformation-theoretically hiding: guhx is statistically independent of x .

ElGamal-based bit commitment scheme

commit2(u, x) = (gu, hu+x ), u ∈R Zn

Information-theoretically binding:

commit2(u, x) = commit2(u′, 1− x)⇔ (gu, hu+x ) = (gu′ , hu′+1−x )⇔ false

Computationally hiding under DDH assumption (DL assumption not sufficient).

Page 254: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

89/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Two Complementary SchemesDL setting: generators g , h such that nobody knows logg h.

Pedersen’s bit commitment scheme

commit1(u, x) = guhx , u ∈R Zn

Computationally binding under DL assumption:

commit1(u, x) = commit1(u′, 1− x)⇔ guhx = gu′h1−x ⇔ logg h = u − u′

1− 2xInformation-theoretically hiding: guhx is statistically independent of x .

ElGamal-based bit commitment scheme

commit2(u, x) = (gu, hu+x ), u ∈R Zn

Information-theoretically binding:

commit2(u, x) = commit2(u′, 1− x)⇔ (gu, hu+x ) = (gu′ , hu′+1−x )⇔ false

Computationally hiding under DDH assumption (DL assumption not sufficient).

Page 255: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

90/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

Exercises

Exercise 3.2.1Analyze the security properties of commit1 and commit2 for the case that x ∈ Zn.

Exercise 3.2.2What happens if the receiver knows logg h in scheme commit1? Same question forscheme commit2.

Exercise 3.2.3Discuss the security of the following commitment scheme for values x ∈ 〈g〉:

commit(u, x) = gux ,

where u ∈R Zn. Is it binding? Is it hiding?

Page 256: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

91/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

binding hidingcommit0(u, x) = H(u, x) computational computationalcommit1(u, x) = guhx computational information-theoreticcommit2(u, x) = (gu , hu+x ) information-theoretic computationalcommit3(u, x) = impossible information-theoretic information-theoretic

Consider any bit commitment scheme commit3.

Assume commit3 is information-theoretically binding.

Then no u, u′ exist s.t. commit3(u, 0) = commit3(u′, 1),otherwise an unlimitedly powerful sender would find u, u′(by exhausting the finite set of possibilities).

But, if the sender commits to 0, say, using C = commit3(u, 0) for some u, anunlimitedly powerful receiver notices that no u′ exists s.t. C = commit3(u′, 1)(by exhausting the finite set of possibilities).

Hence the receiver knows that the committed value must be 0.

So, commit3 is not information-theoretically hiding.

Page 257: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

91/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

binding hidingcommit0(u, x) = H(u, x) computational computationalcommit1(u, x) = guhx computational information-theoreticcommit2(u, x) = (gu , hu+x ) information-theoretic computationalcommit3(u, x) = impossible information-theoretic information-theoretic

Consider any bit commitment scheme commit3.

Assume commit3 is information-theoretically binding.

Then no u, u′ exist s.t. commit3(u, 0) = commit3(u′, 1),otherwise an unlimitedly powerful sender would find u, u′(by exhausting the finite set of possibilities).

But, if the sender commits to 0, say, using C = commit3(u, 0) for some u, anunlimitedly powerful receiver notices that no u′ exists s.t. C = commit3(u′, 1)(by exhausting the finite set of possibilities).

Hence the receiver knows that the committed value must be 0.

So, commit3 is not information-theoretically hiding.

Page 258: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

91/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

binding hidingcommit0(u, x) = H(u, x) computational computationalcommit1(u, x) = guhx computational information-theoreticcommit2(u, x) = (gu , hu+x ) information-theoretic computationalcommit3(u, x) = impossible information-theoretic information-theoretic

Consider any bit commitment scheme commit3.

Assume commit3 is information-theoretically binding.

Then no u, u′ exist s.t. commit3(u, 0) = commit3(u′, 1),otherwise an unlimitedly powerful sender would find u, u′(by exhausting the finite set of possibilities).

But, if the sender commits to 0, say, using C = commit3(u, 0) for some u, anunlimitedly powerful receiver notices that no u′ exists s.t. C = commit3(u′, 1)(by exhausting the finite set of possibilities).

Hence the receiver knows that the committed value must be 0.

So, commit3 is not information-theoretically hiding.

Page 259: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

91/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

binding hidingcommit0(u, x) = H(u, x) computational computationalcommit1(u, x) = guhx computational information-theoreticcommit2(u, x) = (gu , hu+x ) information-theoretic computationalcommit3(u, x) = impossible information-theoretic information-theoretic

Consider any bit commitment scheme commit3.

Assume commit3 is information-theoretically binding.

Then no u, u′ exist s.t. commit3(u, 0) = commit3(u′, 1),otherwise an unlimitedly powerful sender would find u, u′(by exhausting the finite set of possibilities).

But, if the sender commits to 0, say, using C = commit3(u, 0) for some u, anunlimitedly powerful receiver notices that no u′ exists s.t. C = commit3(u′, 1)(by exhausting the finite set of possibilities).

Hence the receiver knows that the committed value must be 0.

So, commit3 is not information-theoretically hiding.

Page 260: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

91/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

binding hidingcommit0(u, x) = H(u, x) computational computationalcommit1(u, x) = guhx computational information-theoreticcommit2(u, x) = (gu , hu+x ) information-theoretic computationalcommit3(u, x) = impossible information-theoretic information-theoretic

Consider any bit commitment scheme commit3.

Assume commit3 is information-theoretically binding.

Then no u, u′ exist s.t. commit3(u, 0) = commit3(u′, 1),otherwise an unlimitedly powerful sender would find u, u′(by exhausting the finite set of possibilities).

But, if the sender commits to 0, say, using C = commit3(u, 0) for some u, anunlimitedly powerful receiver notices that no u′ exists s.t. C = commit3(u′, 1)(by exhausting the finite set of possibilities).

Hence the receiver knows that the committed value must be 0.

So, commit3 is not information-theoretically hiding.

Page 261: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

91/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

binding hidingcommit0(u, x) = H(u, x) computational computationalcommit1(u, x) = guhx computational information-theoreticcommit2(u, x) = (gu , hu+x ) information-theoretic computationalcommit3(u, x) = impossible information-theoretic information-theoretic

Consider any bit commitment scheme commit3.

Assume commit3 is information-theoretically binding.

Then no u, u′ exist s.t. commit3(u, 0) = commit3(u′, 1),otherwise an unlimitedly powerful sender would find u, u′(by exhausting the finite set of possibilities).

But, if the sender commits to 0, say, using C = commit3(u, 0) for some u, anunlimitedly powerful receiver notices that no u′ exists s.t. C = commit3(u′, 1)(by exhausting the finite set of possibilities).

Hence the receiver knows that the committed value must be 0.

So, commit3 is not information-theoretically hiding.

Page 262: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

91/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

binding hidingcommit0(u, x) = H(u, x) computational computationalcommit1(u, x) = guhx computational information-theoreticcommit2(u, x) = (gu , hu+x ) information-theoretic computationalcommit3(u, x) = impossible information-theoretic information-theoretic

Consider any bit commitment scheme commit3.

Assume commit3 is information-theoretically binding.

Then no u, u′ exist s.t. commit3(u, 0) = commit3(u′, 1),otherwise an unlimitedly powerful sender would find u, u′(by exhausting the finite set of possibilities).

But, if the sender commits to 0, say, using C = commit3(u, 0) for some u, anunlimitedly powerful receiver notices that no u′ exists s.t. C = commit3(u′, 1)(by exhausting the finite set of possibilities).

Hence the receiver knows that the committed value must be 0.

So, commit3 is not information-theoretically hiding.

Page 263: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

91/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

binding hidingcommit0(u, x) = H(u, x) computational computationalcommit1(u, x) = guhx computational information-theoreticcommit2(u, x) = (gu , hu+x ) information-theoretic computationalcommit3(u, x) = impossible information-theoretic information-theoretic

Consider any bit commitment scheme commit3.

Assume commit3 is information-theoretically binding.

Then no u, u′ exist s.t. commit3(u, 0) = commit3(u′, 1),otherwise an unlimitedly powerful sender would find u, u′(by exhausting the finite set of possibilities).

But, if the sender commits to 0, say, using C = commit3(u, 0) for some u, anunlimitedly powerful receiver notices that no u′ exists s.t. C = commit3(u′, 1)(by exhausting the finite set of possibilities).

Hence the receiver knows that the committed value must be 0.

So, commit3 is not information-theoretically hiding.

Page 264: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

91/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

binding hidingcommit0(u, x) = H(u, x) computational computationalcommit1(u, x) = guhx computational information-theoreticcommit2(u, x) = (gu , hu+x ) information-theoretic computationalcommit3(u, x) = impossible information-theoretic information-theoretic

Consider any bit commitment scheme commit3.

Assume commit3 is information-theoretically binding.

Then no u, u′ exist s.t. commit3(u, 0) = commit3(u′, 1),otherwise an unlimitedly powerful sender would find u, u′(by exhausting the finite set of possibilities).

But, if the sender commits to 0, say, using C = commit3(u, 0) for some u, anunlimitedly powerful receiver notices that no u′ exists s.t. C = commit3(u′, 1)(by exhausting the finite set of possibilities).

Hence the receiver knows that the committed value must be 0.

So, commit3 is not information-theoretically hiding.

Page 265: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

91/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

3.2.1 Using a Cryptographic Hash Function3.2.2 Using a Discrete Log Setting3.2.3 Impossibility Result

binding hidingcommit0(u, x) = H(u, x) computational computationalcommit1(u, x) = guhx computational information-theoreticcommit2(u, x) = (gu , hu+x ) information-theoretic computationalcommit3(u, x) = impossible information-theoretic information-theoretic

Consider any bit commitment scheme commit3.

Assume commit3 is information-theoretically binding.

Then no u, u′ exist s.t. commit3(u, 0) = commit3(u′, 1),otherwise an unlimitedly powerful sender would find u, u′(by exhausting the finite set of possibilities).

But, if the sender commits to 0, say, using C = commit3(u, 0) for some u, anunlimitedly powerful receiver notices that no u′ exists s.t. C = commit3(u′, 1)(by exhausting the finite set of possibilities).

Hence the receiver knows that the committed value must be 0.

So, commit3 is not information-theoretically hiding.

Page 266: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

92/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

Homomorphic Commitments

Recall: homomorphic mapping preserves algebraic structure.

Example (Pedersen’s commitment scheme)commit1(u, x) = guhx , u ∈R Zn and x ∈ Zn is additively homomorphic:

commit1(u, x) commit1(u′, x ′) = commit1(u + u′, x + x ′).

Multiplication on the left-hand side is in 〈g〉.Additions on the right-hand side are in Zn; x + x ′ is sum of committed values.

Exercise 3.3.1 (see Exercise 1.3.8)Quadratic Residuosity (QR) assumption states that QR problem is hard.Let y ∈ JN denote a quadratic nonresidue modulo N. Consider the following bitcommitment scheme:

commit(u, x) = y x u2 mod N,

where u ∈R Z∗N and x ∈ {0, 1}. In what sense is the scheme binding? In whatsense is the scheme hiding? In what sense is the scheme homomorphic?

Page 267: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

92/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

Homomorphic Commitments

Recall: homomorphic mapping preserves algebraic structure.

Example (Pedersen’s commitment scheme)commit1(u, x) = guhx , u ∈R Zn and x ∈ Zn is additively homomorphic:

commit1(u, x) commit1(u′, x ′) = commit1(u + u′, x + x ′).

Multiplication on the left-hand side is in 〈g〉.Additions on the right-hand side are in Zn; x + x ′ is sum of committed values.

Exercise 3.3.1 (see Exercise 1.3.8)Quadratic Residuosity (QR) assumption states that QR problem is hard.Let y ∈ JN denote a quadratic nonresidue modulo N. Consider the following bitcommitment scheme:

commit(u, x) = y x u2 mod N,

where u ∈R Z∗N and x ∈ {0, 1}. In what sense is the scheme binding? In whatsense is the scheme hiding? In what sense is the scheme homomorphic?

Page 268: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

92/205

3 Commitment Schemes

3.1 Definitions3.2 Examples

3.3 Homomorphic Commitments

Homomorphic Commitments

Recall: homomorphic mapping preserves algebraic structure.

Example (Pedersen’s commitment scheme)commit1(u, x) = guhx , u ∈R Zn and x ∈ Zn is additively homomorphic:

commit1(u, x) commit1(u′, x ′) = commit1(u + u′, x + x ′).

Multiplication on the left-hand side is in 〈g〉.Additions on the right-hand side are in Zn; x + x ′ is sum of committed values.

Exercise 3.3.1 (see Exercise 1.3.8)Quadratic Residuosity (QR) assumption states that QR problem is hard.Let y ∈ JN denote a quadratic nonresidue modulo N. Consider the following bitcommitment scheme:

commit(u, x) = y x u2 mod N,

where u ∈R Z∗N and x ∈ {0, 1}. In what sense is the scheme binding? In whatsense is the scheme hiding? In what sense is the scheme homomorphic?

Page 269: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

93/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Identification protocol: two-party protocol to let verifier V get convincedthat prover P is as claimed.

Examples: secure login, secured room.

Identification protocols may be based on (combinations of):What you are. Biometrics, such as fingerprints, iris scans, etc.What you have. Smart cards, SIM cards, or similar hardware tokens.What you know. Passwords, PIN codes, secret keys.

Our focus: purely cryptographic identification protocols, using secret keys.

Identification 6= message authenticationIdentification 6= digital signaturesIdentification 6= authenticated key exchange

Page 270: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

93/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Identification protocol: two-party protocol to let verifier V get convincedthat prover P is as claimed.

Examples: secure login, secured room.

Identification protocols may be based on (combinations of):What you are. Biometrics, such as fingerprints, iris scans, etc.What you have. Smart cards, SIM cards, or similar hardware tokens.What you know. Passwords, PIN codes, secret keys.

Our focus: purely cryptographic identification protocols, using secret keys.

Identification 6= message authenticationIdentification 6= digital signaturesIdentification 6= authenticated key exchange

Page 271: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

93/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Identification protocol: two-party protocol to let verifier V get convincedthat prover P is as claimed.

Examples: secure login, secured room.

Identification protocols may be based on (combinations of):What you are. Biometrics, such as fingerprints, iris scans, etc.What you have. Smart cards, SIM cards, or similar hardware tokens.What you know. Passwords, PIN codes, secret keys.

Our focus: purely cryptographic identification protocols, using secret keys.

Identification 6= message authenticationIdentification 6= digital signaturesIdentification 6= authenticated key exchange

Page 272: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

93/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Identification protocol: two-party protocol to let verifier V get convincedthat prover P is as claimed.

Examples: secure login, secured room.

Identification protocols may be based on (combinations of):What you are. Biometrics, such as fingerprints, iris scans, etc.What you have. Smart cards, SIM cards, or similar hardware tokens.What you know. Passwords, PIN codes, secret keys.

Our focus: purely cryptographic identification protocols, using secret keys.

Identification 6= message authenticationIdentification 6= digital signaturesIdentification 6= authenticated key exchange

Page 273: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

94/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Identification Scheme

Registration protocol: once to set up a shared secret key or a public key pair.Identification protocol: many runs, should withstand impersonation attacks

Passive attacks: eavesdropping, key only

Active attacks: guessing, cheating verifier, man-in-the-middle

Cheating verifier impersonation attack1 Attacker runs protocol (many times) as cheating V∗ with honest P;2 attacker runs protocol as cheating P∗ with honest V.

Page 274: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

94/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Identification Scheme

Registration protocol: once to set up a shared secret key or a public key pair.Identification protocol: many runs, should withstand impersonation attacks

Passive attacks: eavesdropping, key only

Active attacks: guessing, cheating verifier, man-in-the-middle

Cheating verifier impersonation attack1 Attacker runs protocol (many times) as cheating V∗ with honest P;2 attacker runs protocol as cheating P∗ with honest V.

Page 275: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

94/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Identification Scheme

Registration protocol: once to set up a shared secret key or a public key pair.Identification protocol: many runs, should withstand impersonation attacks

Passive attacks: eavesdropping, key only

Active attacks: guessing, cheating verifier, man-in-the-middle

Cheating verifier impersonation attack1 Attacker runs protocol (many times) as cheating V∗ with honest P;2 attacker runs protocol as cheating P∗ with honest V.

Page 276: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

94/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Identification Scheme

Registration protocol: once to set up a shared secret key or a public key pair.Identification protocol: many runs, should withstand impersonation attacks

Passive attacks: eavesdropping, key only

Active attacks: guessing, cheating verifier, man-in-the-middle

Cheating verifier impersonation attack1 Attacker runs protocol (many times) as cheating V∗ with honest P;2 attacker runs protocol as cheating P∗ with honest V.

Page 277: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

95/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Password: usually a human-memorable string x .

Registration (over secure channel)

Prover P Verifier V−−−−−

x−−−−−−→ store x

Identification

Prover P Verifier V−−−−−

x−−−−−−→ check x

No security against eavesdropping attacks.

Page 278: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

96/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Lamport’s Identification SchemeHash chain with xi+1 = H(xi ) for cryptographic hash function H:

x0H−→ x1

H−→ x2H−→ . . .

H−→ x`−2H−→ x`−1

H−→ x`

Registration (over secure channel)

Prover P Verifier Vx0 ∈R {0, 1}k

x` ← H`(x0) −−−−−x`−−−−−−→ v ← x`

Identification, ith run (i = 1, . . . , `)

Prover P Verifier Vx`−i ← H`−i (x0) −−−−

x`−i−−−−−−−→ v ?= H(x`−i )

v ← x`−i

Value v stored by verifier is not secret (but should be authentic).Key-only attack: in random oracle model.Eavesdropping attack: infeasible as x`−i does not help attacker insucceeding in subsequent runs of identification protocol.

Page 279: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

96/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Lamport’s Identification SchemeHash chain with xi+1 = H(xi ) for cryptographic hash function H:

x0H−→ x1

H−→ x2H−→ . . .

H−→ x`−2H−→ x`−1

H−→ x`

Registration (over secure channel)

Prover P Verifier Vx0 ∈R {0, 1}k

x` ← H`(x0) −−−−−x`−−−−−−→ v ← x`

Identification, ith run (i = 1, . . . , `)

Prover P Verifier Vx`−i ← H`−i (x0) −−−−

x`−i−−−−−−−→ v ?= H(x`−i )

v ← x`−i

Value v stored by verifier is not secret (but should be authentic).Key-only attack: in random oracle model.Eavesdropping attack: infeasible as x`−i does not help attacker insucceeding in subsequent runs of identification protocol.

Page 280: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

96/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Lamport’s Identification SchemeHash chain with xi+1 = H(xi ) for cryptographic hash function H:

x0H−→ x1

H−→ x2H−→ . . .

H−→ x`−2H−→ x`−1

H−→ x`

Registration (over secure channel)

Prover P Verifier Vx0 ∈R {0, 1}k

x` ← H`(x0) −−−−−x`−−−−−−→ v ← x`

Identification, ith run (i = 1, . . . , `)

Prover P Verifier Vx`−i ← H`−i (x0) −−−−

x`−i−−−−−−−→ v ?= H(x`−i )

v ← x`−i

Value v stored by verifier is not secret (but should be authentic).Key-only attack: in random oracle model.Eavesdropping attack: infeasible as x`−i does not help attacker insucceeding in subsequent runs of identification protocol.

Page 281: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

96/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Lamport’s Identification SchemeHash chain with xi+1 = H(xi ) for cryptographic hash function H:

x0H−→ x1

H−→ x2H−→ . . .

H−→ x`−2H−→ x`−1

H−→ x`

Registration (over secure channel)

Prover P Verifier Vx0 ∈R {0, 1}k

x` ← H`(x0) −−−−−x`−−−−−−→ v ← x`

Identification, ith run (i = 1, . . . , `)

Prover P Verifier Vx`−i ← H`−i (x0) −−−−

x`−i−−−−−−−→ v ?= H(x`−i )

v ← x`−i

Value v stored by verifier is not secret (but should be authentic).Key-only attack: in random oracle model.Eavesdropping attack: infeasible as x`−i does not help attacker insucceeding in subsequent runs of identification protocol.

Page 282: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

96/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Lamport’s Identification SchemeHash chain with xi+1 = H(xi ) for cryptographic hash function H:

x0H−→ x1

H−→ x2H−→ . . .

H−→ x`−2H−→ x`−1

H−→ x`

Registration (over secure channel)

Prover P Verifier Vx0 ∈R {0, 1}k

x` ← H`(x0) −−−−−x`−−−−−−→ v ← x`

Identification, ith run (i = 1, . . . , `)

Prover P Verifier Vx`−i ← H`−i (x0) −−−−

x`−i−−−−−−−→ v ?= H(x`−i )

v ← x`−i

Value v stored by verifier is not secret (but should be authentic).Key-only attack: in random oracle model.Eavesdropping attack: infeasible as x`−i does not help attacker insucceeding in subsequent runs of identification protocol.

Page 283: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

96/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Lamport’s Identification SchemeHash chain with xi+1 = H(xi ) for cryptographic hash function H:

x0H−→ x1

H−→ x2H−→ . . .

H−→ x`−2H−→ x`−1

H−→ x`

Registration (over secure channel)

Prover P Verifier Vx0 ∈R {0, 1}k

x` ← H`(x0) −−−−−x`−−−−−−→ v ← x`

Identification, ith run (i = 1, . . . , `)

Prover P Verifier Vx`−i ← H`−i (x0) −−−−

x`−i−−−−−−−→ v ?= H(x`−i )

v ← x`−i

Value v stored by verifier is not secret (but should be authentic).Key-only attack: in random oracle model.Eavesdropping attack: infeasible as x`−i does not help attacker insucceeding in subsequent runs of identification protocol.

Page 284: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

96/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Lamport’s Identification SchemeHash chain with xi+1 = H(xi ) for cryptographic hash function H:

x0H−→ x1

H−→ x2H−→ . . .

H−→ x`−2H−→ x`−1

H−→ x`

Registration (over secure channel)

Prover P Verifier Vx0 ∈R {0, 1}k

x` ← H`(x0) −−−−−x`−−−−−−→ v ← x`

Identification, ith run (i = 1, . . . , `)

Prover P Verifier Vx`−i ← H`−i (x0) −−−−

x`−i−−−−−−−→ v ?= H(x`−i )

v ← x`−i

Value v stored by verifier is not secret (but should be authentic).Key-only attack: in random oracle model.Eavesdropping attack: infeasible as x`−i does not help attacker insucceeding in subsequent runs of identification protocol.

Page 285: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

96/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Lamport’s Identification SchemeHash chain with xi+1 = H(xi ) for cryptographic hash function H:

x0H−→ x1

H−→ x2H−→ . . .

H−→ x`−2H−→ x`−1

H−→ x`

Registration (over secure channel)

Prover P Verifier Vx0 ∈R {0, 1}k

x` ← H`(x0) −−−−−x`−−−−−−→ v ← x`

Identification, ith run (i = 1, . . . , `)

Prover P Verifier Vx`−i ← H`−i (x0) −−−−

x`−i−−−−−−−→ v ?= H(x`−i )

v ← x`−i

Value v stored by verifier is not secret (but should be authentic).Key-only attack: in random oracle model.Eavesdropping attack: infeasible as x`−i does not help attacker insucceeding in subsequent runs of identification protocol.

Page 286: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

96/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Lamport’s Identification SchemeHash chain with xi+1 = H(xi ) for cryptographic hash function H:

x0H−→ x1

H−→ x2H−→ . . .

H−→ x`−2H−→ x`−1

H−→ x`

Registration (over secure channel)

Prover P Verifier Vx0 ∈R {0, 1}k

x` ← H`(x0) −−−−−x`−−−−−−→ v ← x`

Identification, ith run (i = 1, . . . , `)

Prover P Verifier Vx`−i ← H`−i (x0) −−−−

x`−i−−−−−−−→ v ?= H(x`−i )

v ← x`−i

Value v stored by verifier is not secret (but should be authentic).Key-only attack: in random oracle model.Eavesdropping attack: infeasible as x`−i does not help attacker insucceeding in subsequent runs of identification protocol.

Page 287: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

97/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Ultra Long Hash Chains

Hash chain of length ` allows for ` runs of identification protocol.Suppose smart card must support maximum of ` = 232 runs.Direct computation of H`−i (x0) impedes fast identification.

Remark 4.1 (Pebbling algorithms)

Prover space timestoring only x0 O(1) O(`)storing all of x0, . . . , x`−i O(`) O(1)pebbling O(log `) O(log `)

Each pebble stores one value xi of the hash chain.Initial positions of pebbles •, for ` = 16:• · · · · · · · • · · · • · • • ·

Operations on pebbles:clone to create new pebble at same positionmove one position to the right (using one application of H)

See www.win.tue.nl/˜berry/pebbling/ for optimal pebbling (incl. sample code).

Page 288: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output

1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 289: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x15

2 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 290: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x14

3 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 291: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x13

4 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 292: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x12

5 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 293: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x11

6 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 294: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x10

7 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 295: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x9

8 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 296: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x8

9 • • • ↘• x710 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 297: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 298: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x6

11 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 299: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x5

12 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 300: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x4

13 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 301: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x3

14 • • x215 • ↘• x116 • x0

Page 302: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x2

15 • ↘• x116 • x0

Page 303: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x1

16 • x0

Page 304: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

98/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSimple pebbling at speed 1, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • ↘• • ↘• • ↘• x134 • ↘• • ↘• • x125 • ↘• • • ↘• x116 • ↘• • • x107 • • ↘• • ↘• x98 • • ↘• • x89 • • • ↘• x7

10 • • • x611 • ↘• • ↘• x512 • ↘• • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 305: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output

1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 306: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x15

2 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 307: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x14

3 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 308: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x13

4 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 309: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x12

5 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 310: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x11

6 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 311: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x10

7 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 312: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x9

8 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 313: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x8

9 • • • ↘• x710 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 314: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 315: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x6

11 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 316: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x5

12 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 317: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x4

13 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 318: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x3

14 • • x215 • ↘• x116 • x0

Page 319: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x2

15 • ↘• x116 • x0

Page 320: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x1

16 • x0

Page 321: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

99/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

Pebbling Algorithm VisualizationSpace-efficient pebbling at speed 2, e.g., for ` = 16:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 output1 • • • • • x152 • • • • x143 • • • ↘• x134 • • • • x125 • • • ↘• x116 • • • • x107 • • • ↘• x98 • • • • x89 • • • ↘• x7

10 • • • x611 • • ↘• x512 • • • x413 • • ↘• x314 • • x215 • ↘• x116 • x0

Page 322: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

100/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.4.1 Using Symmetric Encryption4.4.2 Using Symmetric Authentication4.4.3 Using Asymmetric Encryption4.4.4 Using Asymmetric Authentication

Figure 4.1 (Four basic challenge-response protocols)

Prover Verifierc ∈R {0, 1}k

←−−−c−−−

r ← EK (c)−−−

r−−−→

c ?= DK (r)(a)

Prover Verifierc ∈R {0, 1}k

←−−−c−−−

r ← H(K , c)−−−

r−−−→

r ?= H(K , c)(b)

Prover VerifierM ∈R {0, 1}k

←−−−c−−− c ← Epk (M)

r ← Dsk (c)−−−

r−−−→

r ?= M(c)

Prover Verifierc ∈R {0, 1}k

←−−−c−−−

r ← Ssk (c)−−−

r−−−→

Vpk (r , c)?(d)

Page 323: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

101/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.4.1 Using Symmetric Encryption4.4.2 Using Symmetric Authentication4.4.3 Using Asymmetric Encryption4.4.4 Using Asymmetric Authentication

Basic challenge-response protocol (a)

Prover Verifierc ∈R {0, 1}k

←−−c−−

r ← EK (c)−−

r−−→

c ?= DK (r)

Exercise 4.4.1Consider the alternative protocol in which the verifier challenges the prover withc = EK (M), where M ∈R {0, 1}k , and for which the prover is supposed to produceresponse r = M. Discuss eavesdropping attacks and cheating verifier attacks forthis protocol.

Page 324: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

101/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.4.1 Using Symmetric Encryption4.4.2 Using Symmetric Authentication4.4.3 Using Asymmetric Encryption4.4.4 Using Asymmetric Authentication

Basic challenge-response protocol (a)

Prover Verifierc ∈R {0, 1}k

←−−c−−

r ← EK (c)−−

r−−→

c ?= DK (r)

Exercise 4.4.1Consider the alternative protocol in which the verifier challenges the prover withc = EK (M), where M ∈R {0, 1}k , and for which the prover is supposed to produceresponse r = M. Discuss eavesdropping attacks and cheating verifier attacks forthis protocol.

Page 325: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

102/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.4.1 Using Symmetric Encryption4.4.2 Using Symmetric Authentication4.4.3 Using Asymmetric Encryption4.4.4 Using Asymmetric Authentication

Basic challenge-response protocol (b)

Prover Verifierc ∈R {0, 1}k

←−−c−−

r ← H(K , c)−−

r−−→

r ?= H(K , c)

Page 326: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

103/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.4.1 Using Symmetric Encryption4.4.2 Using Symmetric Authentication4.4.3 Using Asymmetric Encryption4.4.4 Using Asymmetric Authentication

Basic challenge-response protocol (c)

Prover VerifierM ∈R {0, 1}k

c ← Epk (M)←−−

c−−

r ← Dsk (c)−−

r−−→

r ?= M

Page 327: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

104/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.4.1 Using Symmetric Encryption4.4.2 Using Symmetric Authentication4.4.3 Using Asymmetric Encryption4.4.4 Using Asymmetric Authentication

Basic challenge-response protocol (d)

Prover Verifier

c ∈R {0, 1}k

←−−c−−

r ← Ssk (c)−−

r−−→

Vpk (r , c)?

Page 328: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

105/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Where’s Waldo?

Find in

Click this PowerPoint slide show.

Page 329: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

106/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Zero-knowledge Identification SchemeRegistration. P generates public key pair, keeps private key to itself, and gives

public key to V.Identification. P engages in zero-knowledge proof to convince V of knowledge of

private key.

Soundness property (security for V): cheating P∗ not knowing private key doesnot succeed in convincing V.

Zero-knowledge property (security for P): cheating V∗ does not learn anythinguseful about private key from interacting with P.

Page 330: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

107/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Discrete log setting 〈g〉.Prover registered public key h, and knows private key x satisfying y = g x .

Figure 4.2 (Schnorr’s zero-knowledge protocol)

Prover Verifier(x = logg h)

u ∈R Zn

a← gu−−−−−−

a−−−−−−→

c ∈R {0, 1}←−−−−−−

c−−−−−−

r ←n

{u, if c = 0u + x , if c = 1 −−−−−−

r−−−−−−→

g r ?={

a, if c = 0ah, if c = 1

Page 331: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

107/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Discrete log setting 〈g〉.Prover registered public key h, and knows private key x satisfying y = g x .

Figure 4.2 (Schnorr’s zero-knowledge protocol)

Prover Verifier(x = logg h)

u ∈R Zn

a← gu−−−−−−

a−−−−−−→

c ∈R {0, 1}←−−−−−−

c−−−−−−

r ←n

{u, if c = 0u + x , if c = 1 −−−−−−

r−−−−−−→

g r ?={

a, if c = 0ah, if c = 1

Page 332: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

107/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Discrete log setting 〈g〉.Prover registered public key h, and knows private key x satisfying y = g x .

Figure 4.2 (Schnorr’s zero-knowledge protocol)

Prover Verifier(x = logg h)

u ∈R Zn

a← gu−−−−−−

a−−−−−−→

c ∈R {0, 1}←−−−−−−

c−−−−−−

r ←n

{u, if c = 0u + x , if c = 1 −−−−−−

r−−−−−−→

g r ?={

a, if c = 0ah, if c = 1

Page 333: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

107/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Discrete log setting 〈g〉.Prover registered public key h, and knows private key x satisfying y = g x .

Figure 4.2 (Schnorr’s zero-knowledge protocol)

Prover Verifier(x = logg h)

u ∈R Zn

a← gu−−−−−−

a−−−−−−→

c ∈R {0, 1}←−−−−−−

c−−−−−−

r ←n

{u, if c = 0u + x , if c = 1 −−−−−−

r−−−−−−→

g r ?={

a, if c = 0ah, if c = 1

Page 334: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

107/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Discrete log setting 〈g〉.Prover registered public key h, and knows private key x satisfying y = g x .

Figure 4.2 (Schnorr’s zero-knowledge protocol)

Prover Verifier(x = logg h)

u ∈R Zn

a← gu−−−−−−

a−−−−−−→

c ∈R {0, 1}←−−−−−−

c−−−−−−

r ←n

{u, if c = 0u + x , if c = 1 −−−−−−

r−−−−−−→

g r ?={

a, if c = 0ah, if c = 1

Page 335: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

108/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Soundness

SoundnessOnly prover P knowing private key x = logg h succeeds.

Cheating prover P∗ can do one of the following:Either, prepare for c = 0 by setting a = gu and using response r = u.Or, prepare for c = 1 by setting a = gu/h and using response r = u.

Verification g r = ahc holds in both cases.

50% success probability for P∗

But P∗ cannot do better than 50%!

Page 336: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

109/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Soundness

Suppose P∗ can answer both challenges c = 0 and c = 1 correctly,after sending announcement a to V.

Hence P∗ can compute responses r0 and r1 such that:

g r0 = a, g r1 = ah.

This impliesh = g r1−r0 .

But then P∗ actually knows x , since x = r1 − r0 mod n holds!

Page 337: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

110/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Zero-Knowledge

Cheating verifier V∗ may run protocol (polynomially) many times with P,to obtain conversations (a; c; r).

Simulation paradigmV∗ can efficiently generate (simulate) these conversations on its own,given only public key h—and no access to prover P who knows x = logg h.

Identification protocol is zero-knowledge if simulator S exists which, given publickey h, generates conversations indistinguishable from conversations of realprotocol runs between P and V∗.

Usually, simulator S is using V∗ only as a rewindable black-box.(I.e., usually, no need for S to know how V∗ operates internally.)

Page 338: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

111/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation Paradigm

P V∗

x

h

Real protocol runs between prover P and cheating verifier V∗,P using private key x

Page 339: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

111/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation Paradigm

Real protocol runs between prover P and cheating verifier V∗,P using private key x

Page 340: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

111/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation Paradigm

SV∗ V∗

h

h

Simulated protocol runs between simulator SV∗

and cheating verifier V∗,SV∗

using only public key h

Page 341: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

111/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation Paradigm

P V∗

x

h

SV∗ V∗

h

h

V∗ cannot distinguish between protocol with P and protocol with SV∗

⇒ protocol is zero-knowledge w.r.t. private key x

Page 342: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 343: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 344: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 345: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 346: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 347: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 348: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 349: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 350: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 351: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 352: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

112/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 c ∈R {0, 1}4 r ←n u + cx5 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 output (a; c; r)

All real and simulated conversations (a; c; r) are accepting, as g r = ahc holds.

Page 353: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .

Page 354: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .

Page 355: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For real conversations:

Pr[(a; c; r) = (A; C ; R)]

= Pr[a = A, c = C , r = R]= Pr[u = logg A, c = C , u + cx = logg A + C logg h]= Pr[u = logg A, c = C ]= Pr[u = logg A] Pr[c = C ]= 1

n12 = 1

2n

Page 356: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For real conversations:

Pr[(a; c; r) = (A; C ; R)] = Pr[a = A, c = C , r = R]

= Pr[u = logg A, c = C , u + cx = logg A + C logg h]= Pr[u = logg A, c = C ]= Pr[u = logg A] Pr[c = C ]= 1

n12 = 1

2n

Page 357: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For real conversations:

Pr[(a; c; r) = (A; C ; R)] = Pr[a = A, c = C , r = R]= Pr[u = logg A, c = C , u + cx = logg A + C logg h]

= Pr[u = logg A, c = C ]= Pr[u = logg A] Pr[c = C ]= 1

n12 = 1

2n

Page 358: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For real conversations:

Pr[(a; c; r) = (A; C ; R)] = Pr[a = A, c = C , r = R]= Pr[u = logg A, c = C , u + cx = logg A + C logg h]= Pr[u = logg A, c = C ]

= Pr[u = logg A] Pr[c = C ]= 1

n12 = 1

2n

Page 359: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For real conversations:

Pr[(a; c; r) = (A; C ; R)] = Pr[a = A, c = C , r = R]= Pr[u = logg A, c = C , u + cx = logg A + C logg h]= Pr[u = logg A, c = C ]= Pr[u = logg A] Pr[c = C ]

= 1n

12 = 1

2n

Page 360: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For real conversations:

Pr[(a; c; r) = (A; C ; R)] = Pr[a = A, c = C , r = R]= Pr[u = logg A, c = C , u + cx = logg A + C logg h]= Pr[u = logg A, c = C ]= Pr[u = logg A] Pr[c = C ]= 1

n12 = 1

2n

Page 361: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For simulated conversations:

Pr[(a; c; r) = (A; C ; R)]

= Pr[a = A, c = C , r = R]

= Pr[g r h−c = gR h−C , c = C , r = R]= Pr[c = C , r = R]= Pr[c = C ] Pr[r = R]= 1

21n = 1

2n

Page 362: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For simulated conversations:

Pr[(a; c; r) = (A; C ; R)] = Pr[a = A, c = C , r = R]

= Pr[g r h−c = gR h−C , c = C , r = R]= Pr[c = C , r = R]= Pr[c = C ] Pr[r = R]= 1

21n = 1

2n

Page 363: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For simulated conversations:

Pr[(a; c; r) = (A; C ; R)] = Pr[a = A, c = C , r = R]

= Pr[g r h−c = gR h−C , c = C , r = R]

= Pr[c = C , r = R]= Pr[c = C ] Pr[r = R]= 1

21n = 1

2n

Page 364: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For simulated conversations:

Pr[(a; c; r) = (A; C ; R)] = Pr[a = A, c = C , r = R]

= Pr[g r h−c = gR h−C , c = C , r = R]= Pr[c = C , r = R]

= Pr[c = C ] Pr[r = R]= 1

21n = 1

2n

Page 365: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For simulated conversations:

Pr[(a; c; r) = (A; C ; R)] = Pr[a = A, c = C , r = R]

= Pr[g r h−c = gR h−C , c = C , r = R]= Pr[c = C , r = R]= Pr[c = C ] Pr[r = R]

= 12

1n = 1

2n

Page 366: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

113/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Why Are These Distributions Identical?

Consider fixed key pair (h; x).

For fixed c, 1-to-1 correspondence between u = logg a in real conversations and rin simulated conversations, as r = u + cx holds in both cases.

Each accepting conversation (a; c; r) occurs with probability 12n in both cases.

More precisely, let (A; C ; R) be any accepting conversation, hence gR = AhC .For simulated conversations:

Pr[(a; c; r) = (A; C ; R)] = Pr[a = A, c = C , r = R]

= Pr[g r h−c = gR h−C , c = C , r = R]= Pr[c = C , r = R]= Pr[c = C ] Pr[r = R]= 1

21n = 1

2n

Page 367: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

114/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Passive Impersonation Attacks

Security against passive impersonation attacks extends to any eavesdropper.

Remark 4.2Honest-verifier zero-knowledge reduces any passive impersonation attack to akey-only attack: eavesdropping conversations does not yield anything aboutprover’s private key beyond what can be deduced from corresponding public key.

Eavesdropped conversations (a; c; r) for honest runs of Schnorr’s protocol can besimulated as well given public key h only.

But, eavesdropper may learn something new!From a single conversation (a; c; r) with c 6= 0,eavesdropper may recover prover’s public key as h = (g r/a)1/c

(thus, potentially establishing prover’s identity).

Page 368: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

114/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Passive Impersonation Attacks

Security against passive impersonation attacks extends to any eavesdropper.

Remark 4.2Honest-verifier zero-knowledge reduces any passive impersonation attack to akey-only attack: eavesdropping conversations does not yield anything aboutprover’s private key beyond what can be deduced from corresponding public key.

Eavesdropped conversations (a; c; r) for honest runs of Schnorr’s protocol can besimulated as well given public key h only.

But, eavesdropper may learn something new!From a single conversation (a; c; r) with c 6= 0,eavesdropper may recover prover’s public key as h = (g r/a)1/c

(thus, potentially establishing prover’s identity).

Page 369: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 370: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 371: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 372: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 373: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 374: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 375: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 376: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 377: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 378: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 379: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 380: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 381: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 382: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 383: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

115/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Simulation of Schnorr’s Protocol

Recall V∗ is p.p.t. algorithm (Turing machine).Rewinding V∗: going back to a previous configuration(configuration = state + tape contents + position of read/write heads).

Real conversationsInput: private key xOutput: conversation (a; c; r)

1 u ∈R Zn

2 a← gu

3 send a to V∗

4 receive c ∈ {0, 1} from V∗

5 r ←n u + cx6 output (a; c; r)

Simulated conversationsInput: public key hOutput: conversation (a; c; r)

1 c ∈R {0, 1}2 r ∈R Zn

3 a← g r h−c

4 send a to V∗

5 receive c ′ ∈ {0, 1} from V∗

6 if c 6= c ′ rewind V∗ to point prior toreceiving a and go to step 1

7 output (a; c; r)Sequential iterations can be simulated as well.Cheating probability 1/2k for k iterations.

Page 384: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

116/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Figure 4.3 (Schnorr’s identification protocol)

Prover Verifier(x = logg h)

u ∈R Zn

a← gu−−−−−−

a−−−−−−→

←−−−−−−c−−−−−− c ∈R Zn

r ←n u + cx −−−−−−r−−−−−−→ g r ?= ahc

Soundness: cheating probability down to 1/n.Zero-knowledge: only for honest verifier V.Identical distributions of real/simulated conversations:

{(a; c; r) : u, c ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : c, r ∈R Zn; a← g r h−c}.

Page 385: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

116/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Figure 4.3 (Schnorr’s identification protocol)

Prover Verifier(x = logg h)

u ∈R Zn

a← gu−−−−−−

a−−−−−−→

←−−−−−−c−−−−−− c ∈R Zn

r ←n u + cx −−−−−−r−−−−−−→ g r ?= ahc

Soundness: cheating probability down to 1/n.Zero-knowledge: only for honest verifier V.Identical distributions of real/simulated conversations:

{(a; c; r) : u, c ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : c, r ∈R Zn; a← g r h−c}.

Page 386: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

116/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Figure 4.3 (Schnorr’s identification protocol)

Prover Verifier(x = logg h)

u ∈R Zn

a← gu−−−−−−

a−−−−−−→

←−−−−−−c−−−−−− c ∈R Zn

r ←n u + cx −−−−−−r−−−−−−→ g r ?= ahc

Soundness: cheating probability down to 1/n.Zero-knowledge: only for honest verifier V.Identical distributions of real/simulated conversations:

{(a; c; r) : u, c ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : c, r ∈R Zn; a← g r h−c}.

Page 387: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

117/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

RSA setting: RSA modulus N, public exponent large prime e.Prover registered public key y , and knows private key x s.t. y = x e mod N.

Figure 4.4 (Guillou-Quisquater’s identification protocol)

Prover Verifier(x = y 1/e mod N)

u ∈R Z∗Na←N ue

−−−−−−a−−−−−−→

←−−−−−−c−−−−−− c ∈R Ze

r ←N ux c−−−−−−

r−−−−−−→ r e ?=N ay c

Soundness: cheating probability 1/e.Zero-knowledge: only for honest verifier V.Identical distributions of real/simulated conversations:

{(a; c; r) : u ∈R Z∗N ; c ∈R Ze ; a←N ue ; r ←N ux c},{(a; c; r) : c ∈R Ze ; r ∈R Z∗N ; a←N r ey−c}.

Page 388: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

117/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

RSA setting: RSA modulus N, public exponent large prime e.Prover registered public key y , and knows private key x s.t. y = x e mod N.

Figure 4.4 (Guillou-Quisquater’s identification protocol)

Prover Verifier(x = y 1/e mod N)

u ∈R Z∗Na←N ue

−−−−−−a−−−−−−→

←−−−−−−c−−−−−− c ∈R Ze

r ←N ux c−−−−−−

r−−−−−−→ r e ?=N ay c

Soundness: cheating probability 1/e.Zero-knowledge: only for honest verifier V.Identical distributions of real/simulated conversations:

{(a; c; r) : u ∈R Z∗N ; c ∈R Ze ; a←N ue ; r ←N ux c},{(a; c; r) : c ∈R Ze ; r ∈R Z∗N ; a←N r ey−c}.

Page 389: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

117/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

RSA setting: RSA modulus N, public exponent large prime e.Prover registered public key y , and knows private key x s.t. y = x e mod N.

Figure 4.4 (Guillou-Quisquater’s identification protocol)

Prover Verifier(x = y 1/e mod N)

u ∈R Z∗Na←N ue

−−−−−−a−−−−−−→

←−−−−−−c−−−−−− c ∈R Ze

r ←N ux c−−−−−−

r−−−−−−→ r e ?=N ay c

Soundness: cheating probability 1/e.Zero-knowledge: only for honest verifier V.Identical distributions of real/simulated conversations:

{(a; c; r) : u ∈R Z∗N ; c ∈R Ze ; a←N ue ; r ←N ux c},{(a; c; r) : c ∈R Ze ; r ∈R Z∗N ; a←N r ey−c}.

Page 390: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

118/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Soundness of Guillou-Quisquater’s Protocol

Assume prover able to produce accepting (a; c; r), (a; c ′; r ′), with c 6= c ′.Then (modulo N):

r e = ay c , r ′e = ay c′

⇒ (r/r ′)e = y c−c′

1st attempt: rewrite as y = (r/r ′)e/(c−c′).But inversion of c − c ′ modulo φ(N) cannot be computed efficiently, as φ(N) isnot known.

2nd attempt: gcd(e, c − c ′) = 1, since e is prime and c, c ′ ∈ Ze , c 6= c ′.Extended Euclidean algorithm yields s, t ∈ Z satisfying se + t(c − c ′) = 1.Raise both sides to power t:

(r/r ′)te = y t(c−c′) = y 1−se

⇒ y = (y s(r/r ′)t)e

Private key x ←N y s(r/r ′)t thus known to prover.

Page 391: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

118/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Soundness of Guillou-Quisquater’s Protocol

Assume prover able to produce accepting (a; c; r), (a; c ′; r ′), with c 6= c ′.Then (modulo N):

r e = ay c , r ′e = ay c′

⇒ (r/r ′)e = y c−c′

1st attempt: rewrite as y = (r/r ′)e/(c−c′).But inversion of c − c ′ modulo φ(N) cannot be computed efficiently, as φ(N) isnot known.

2nd attempt: gcd(e, c − c ′) = 1, since e is prime and c, c ′ ∈ Ze , c 6= c ′.Extended Euclidean algorithm yields s, t ∈ Z satisfying se + t(c − c ′) = 1.Raise both sides to power t:

(r/r ′)te = y t(c−c′) = y 1−se

⇒ y = (y s(r/r ′)t)e

Private key x ←N y s(r/r ′)t thus known to prover.

Page 392: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

118/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Soundness of Guillou-Quisquater’s Protocol

Assume prover able to produce accepting (a; c; r), (a; c ′; r ′), with c 6= c ′.Then (modulo N):

r e = ay c , r ′e = ay c′

⇒ (r/r ′)e = y c−c′

1st attempt: rewrite as y = (r/r ′)e/(c−c′).But inversion of c − c ′ modulo φ(N) cannot be computed efficiently, as φ(N) isnot known.

2nd attempt: gcd(e, c − c ′) = 1, since e is prime and c, c ′ ∈ Ze , c 6= c ′.Extended Euclidean algorithm yields s, t ∈ Z satisfying se + t(c − c ′) = 1.Raise both sides to power t:

(r/r ′)te = y t(c−c′) = y 1−se

⇒ y = (y s(r/r ′)t)e

Private key x ←N y s(r/r ′)t thus known to prover.

Page 393: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

118/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Soundness of Guillou-Quisquater’s Protocol

Assume prover able to produce accepting (a; c; r), (a; c ′; r ′), with c 6= c ′.Then (modulo N):

r e = ay c , r ′e = ay c′

⇒ (r/r ′)e = y c−c′

1st attempt: rewrite as y = (r/r ′)e/(c−c′).But inversion of c − c ′ modulo φ(N) cannot be computed efficiently, as φ(N) isnot known.

2nd attempt: gcd(e, c − c ′) = 1, since e is prime and c, c ′ ∈ Ze , c 6= c ′.Extended Euclidean algorithm yields s, t ∈ Z satisfying se + t(c − c ′) = 1.Raise both sides to power t:

(r/r ′)te = y t(c−c′) = y 1−se

⇒ y = (y s(r/r ′)t)e

Private key x ←N y s(r/r ′)t thus known to prover.

Page 394: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

118/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Soundness of Guillou-Quisquater’s Protocol

Assume prover able to produce accepting (a; c; r), (a; c ′; r ′), with c 6= c ′.Then (modulo N):

r e = ay c , r ′e = ay c′

⇒ (r/r ′)e = y c−c′

1st attempt: rewrite as y = (r/r ′)e/(c−c′).But inversion of c − c ′ modulo φ(N) cannot be computed efficiently, as φ(N) isnot known.

2nd attempt: gcd(e, c − c ′) = 1, since e is prime and c, c ′ ∈ Ze , c 6= c ′.Extended Euclidean algorithm yields s, t ∈ Z satisfying se + t(c − c ′) = 1.Raise both sides to power t:

(r/r ′)te = y t(c−c′) = y 1−se

⇒ y = (y s(r/r ′)t)e

Private key x ←N y s(r/r ′)t thus known to prover.

Page 395: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

118/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Soundness of Guillou-Quisquater’s Protocol

Assume prover able to produce accepting (a; c; r), (a; c ′; r ′), with c 6= c ′.Then (modulo N):

r e = ay c , r ′e = ay c′

⇒ (r/r ′)e = y c−c′

1st attempt: rewrite as y = (r/r ′)e/(c−c′).But inversion of c − c ′ modulo φ(N) cannot be computed efficiently, as φ(N) isnot known.

2nd attempt: gcd(e, c − c ′) = 1, since e is prime and c, c ′ ∈ Ze , c 6= c ′.Extended Euclidean algorithm yields s, t ∈ Z satisfying se + t(c − c ′) = 1.Raise both sides to power t:

(r/r ′)te = y t(c−c′) = y 1−se

⇒ y = (y s(r/r ′)t)e

Private key x ←N y s(r/r ′)t thus known to prover.

Page 396: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

118/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Soundness of Guillou-Quisquater’s Protocol

Assume prover able to produce accepting (a; c; r), (a; c ′; r ′), with c 6= c ′.Then (modulo N):

r e = ay c , r ′e = ay c′

⇒ (r/r ′)e = y c−c′

1st attempt: rewrite as y = (r/r ′)e/(c−c′).But inversion of c − c ′ modulo φ(N) cannot be computed efficiently, as φ(N) isnot known.

2nd attempt: gcd(e, c − c ′) = 1, since e is prime and c, c ′ ∈ Ze , c 6= c ′.Extended Euclidean algorithm yields s, t ∈ Z satisfying se + t(c − c ′) = 1.Raise both sides to power t:

(r/r ′)te = y t(c−c′) = y 1−se

⇒ y = (y s(r/r ′)t)e

Private key x ←N y s(r/r ′)t thus known to prover.

Page 397: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

118/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Soundness of Guillou-Quisquater’s Protocol

Assume prover able to produce accepting (a; c; r), (a; c ′; r ′), with c 6= c ′.Then (modulo N):

r e = ay c , r ′e = ay c′

⇒ (r/r ′)e = y c−c′

1st attempt: rewrite as y = (r/r ′)e/(c−c′).But inversion of c − c ′ modulo φ(N) cannot be computed efficiently, as φ(N) isnot known.

2nd attempt: gcd(e, c − c ′) = 1, since e is prime and c, c ′ ∈ Ze , c 6= c ′.Extended Euclidean algorithm yields s, t ∈ Z satisfying se + t(c − c ′) = 1.Raise both sides to power t:

(r/r ′)te = y t(c−c′) = y 1−se

⇒ y = (y s(r/r ′)t)e

Private key x ←N y s(r/r ′)t thus known to prover.

Page 398: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

119/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.5.1 Schnorr Zero-Knowledge Protocol4.5.2 Schnorr Protocol4.5.3 Guillou-Quisquater Protocol

Identity-Based Identification Scheme

Remark 4.3Prover does not need to know factorization of N.Therefore, users may share same modulus N.

Identity-based identification scheme: public keys determined by users’ identities.

Set user A’s public key as yA = H(IDA), where IDA may consist of user’s nameand/or email address.

Trusted third party T required to compute private key of each user.Only T needs to know factorization of N: to compute user A’s private key asxA = H(IDA)1/e mod N.

Advantage: public keys need not be certified by a digital signature from T .Disadvantage: T knows private key of every user; problem may be alleviated bydistributing role of T between many parties, using threshold cryptography.

Page 399: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

120/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Hiding vs Zero-Knowledge

Schnorr’s identification protocol:1 iteration with c ∈R Zn: efficient, but only honest-verifier zero-knowledgek iterations with c ∈R {0, 1}: zero-knowledge, but not efficient

Witness hiding protocols: strike a balance between security and efficiency.

Identification protocol is witness hiding if cheating verifier is not able to obtainthe complete prover’s private key.

Witness hiding protocol is not necessarily zero-knowledge:cheating verifier may be able to extract some partial information on private key,but not sufficient for successful impersonation of the prover.

Page 400: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

121/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Private key (x1, x2) satisfies h = gx11 g x2

2 for public key h.

Figure 4.5 (Okamoto’s identification protocol)

Prover Verifier(h = g x1

1 gx22 )

u1, u2 ∈R Zn

a← gu11 gu2

2 −−−−−−a−−−−−−→

c ∈R Zn

←−−−−−−c−−−−−−

r1 ←n u1 + cx1

r2 ←n u2 + cx2 −−−−r1, r2−−−−−−−→

g r11 g r2

2?= ahc

Assume logg1 g2 not known to anybody (cf. Pedersen commitments).Okamoto’s protocol is witness hiding:

cheating verifier V∗ cannot find “witness” (x1, x2).

Note: not excluded that V∗ can find partial information on (x1, x2) !

Page 401: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

121/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Private key (x1, x2) satisfies h = gx11 g x2

2 for public key h.

Figure 4.5 (Okamoto’s identification protocol)

Prover Verifier(h = g x1

1 gx22 )

u1, u2 ∈R Zn

a← gu11 gu2

2 −−−−−−a−−−−−−→

c ∈R Zn

←−−−−−−c−−−−−−

r1 ←n u1 + cx1

r2 ←n u2 + cx2 −−−−r1, r2−−−−−−−→

g r11 g r2

2?= ahc

Assume logg1 g2 not known to anybody (cf. Pedersen commitments).Okamoto’s protocol is witness hiding:

cheating verifier V∗ cannot find “witness” (x1, x2).

Note: not excluded that V∗ can find partial information on (x1, x2) !

Page 402: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

121/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Private key (x1, x2) satisfies h = gx11 g x2

2 for public key h.

Figure 4.5 (Okamoto’s identification protocol)

Prover Verifier(h = g x1

1 gx22 )

u1, u2 ∈R Zn

a← gu11 gu2

2 −−−−−−a−−−−−−→

c ∈R Zn

←−−−−−−c−−−−−−

r1 ←n u1 + cx1

r2 ←n u2 + cx2 −−−−r1, r2−−−−−−−→

g r11 g r2

2?= ahc

Assume logg1 g2 not known to anybody (cf. Pedersen commitments).Okamoto’s protocol is witness hiding:

cheating verifier V∗ cannot find “witness” (x1, x2).

Note: not excluded that V∗ can find partial information on (x1, x2) !

Page 403: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

122/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Indistinguishability

Px1,x2 V∗

x

h

Px′1,x′2 V∗

x ′

h

V∗ cannot distinguish between protocol with Px1,x2 and protocol with Px′1,x′2

⇒ protocol is witness indistinguishable

Page 404: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

123/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Indistinguishability of Okamoto’s ProtocolConsider conversation (a; c; r1, r2) between Px1,x2 and V∗, where a = gu1

1 gu22 .

Let (x ′1, x ′2) be any witness satisfying h = gx′11 g x′2

2 .Then unique u′1, u′2 exist that yield same conversation (a; c; r1, r2) for Px′1,x

′2:

u′1, u′2 ←n u1 + c(x1 − x ′1), u2 + c(x2 − x ′2)

Indeed:

a′ = gu′11 gu′2

2 = gu11 gu2

2 (gx11 g x2

2 )c/(gx′11 gx′2

2 )c = ar ′1 = u′1 + cx ′1 = u1 + c(x1 − x ′1) + cx ′1 = r1

r ′2 = u′2 + cx ′2 = u2 + c(x2 − x ′2) + cx ′2 = r2

Perfect witness indistinguishability as conversations with Px1,x2 and conversationswith Px′1,x

′2

are distributed identically:

{(a; c; r1, r2) : u1, u2 ∈R Zn; a← gu11 gu2

2 ; c ← V∗(a); r1, r2 ←n u1 + cx1, u2 + cx2}

{(a; c; r1, r2) : u′1, u′2 ∈R Zn; a← gu′11 gu′2

2 ; c ← V∗(a); r1, r2 ←n u′1 + cx ′1, u′2 + cx ′2}

Page 405: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

123/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Indistinguishability of Okamoto’s ProtocolConsider conversation (a; c; r1, r2) between Px1,x2 and V∗, where a = gu1

1 gu22 .

Let (x ′1, x ′2) be any witness satisfying h = gx′11 g x′2

2 .Then unique u′1, u′2 exist that yield same conversation (a; c; r1, r2) for Px′1,x

′2:

u′1, u′2 ←n u1 + c(x1 − x ′1), u2 + c(x2 − x ′2)

Indeed:

a′ = gu′11 gu′2

2 = gu11 gu2

2 (gx11 g x2

2 )c/(gx′11 gx′2

2 )c = ar ′1 = u′1 + cx ′1 = u1 + c(x1 − x ′1) + cx ′1 = r1

r ′2 = u′2 + cx ′2 = u2 + c(x2 − x ′2) + cx ′2 = r2

Perfect witness indistinguishability as conversations with Px1,x2 and conversationswith Px′1,x

′2

are distributed identically:

{(a; c; r1, r2) : u1, u2 ∈R Zn; a← gu11 gu2

2 ; c ← V∗(a); r1, r2 ←n u1 + cx1, u2 + cx2}

{(a; c; r1, r2) : u′1, u′2 ∈R Zn; a← gu′11 gu′2

2 ; c ← V∗(a); r1, r2 ←n u′1 + cx ′1, u′2 + cx ′2}

Page 406: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

123/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Indistinguishability of Okamoto’s ProtocolConsider conversation (a; c; r1, r2) between Px1,x2 and V∗, where a = gu1

1 gu22 .

Let (x ′1, x ′2) be any witness satisfying h = gx′11 g x′2

2 .Then unique u′1, u′2 exist that yield same conversation (a; c; r1, r2) for Px′1,x

′2:

u′1, u′2 ←n u1 + c(x1 − x ′1), u2 + c(x2 − x ′2)

Indeed:

a′ = gu′11 gu′2

2 = gu11 gu2

2 (gx11 g x2

2 )c/(gx′11 gx′2

2 )c = ar ′1 = u′1 + cx ′1 = u1 + c(x1 − x ′1) + cx ′1 = r1

r ′2 = u′2 + cx ′2 = u2 + c(x2 − x ′2) + cx ′2 = r2

Perfect witness indistinguishability as conversations with Px1,x2 and conversationswith Px′1,x

′2

are distributed identically:

{(a; c; r1, r2) : u1, u2 ∈R Zn; a← gu11 gu2

2 ; c ← V∗(a); r1, r2 ←n u1 + cx1, u2 + cx2}

{(a; c; r1, r2) : u′1, u′2 ∈R Zn; a← gu′11 gu′2

2 ; c ← V∗(a); r1, r2 ←n u′1 + cx ′1, u′2 + cx ′2}

Page 407: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

123/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Indistinguishability of Okamoto’s ProtocolConsider conversation (a; c; r1, r2) between Px1,x2 and V∗, where a = gu1

1 gu22 .

Let (x ′1, x ′2) be any witness satisfying h = gx′11 g x′2

2 .Then unique u′1, u′2 exist that yield same conversation (a; c; r1, r2) for Px′1,x

′2:

u′1, u′2 ←n u1 + c(x1 − x ′1), u2 + c(x2 − x ′2)

Indeed:

a′ = gu′11 gu′2

2 = gu11 gu2

2 (gx11 g x2

2 )c/(gx′11 gx′2

2 )c = ar ′1 = u′1 + cx ′1 = u1 + c(x1 − x ′1) + cx ′1 = r1

r ′2 = u′2 + cx ′2 = u2 + c(x2 − x ′2) + cx ′2 = r2

Perfect witness indistinguishability as conversations with Px1,x2 and conversationswith Px′1,x

′2

are distributed identically:

{(a; c; r1, r2) : u1, u2 ∈R Zn; a← gu11 gu2

2 ; c ← V∗(a); r1, r2 ←n u1 + cx1, u2 + cx2}

{(a; c; r1, r2) : u′1, u′2 ∈R Zn; a← gu′11 gu′2

2 ; c ← V∗(a); r1, r2 ←n u′1 + cx ′1, u′2 + cx ′2}

Page 408: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

123/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Indistinguishability of Okamoto’s ProtocolConsider conversation (a; c; r1, r2) between Px1,x2 and V∗, where a = gu1

1 gu22 .

Let (x ′1, x ′2) be any witness satisfying h = gx′11 g x′2

2 .Then unique u′1, u′2 exist that yield same conversation (a; c; r1, r2) for Px′1,x

′2:

u′1, u′2 ←n u1 + c(x1 − x ′1), u2 + c(x2 − x ′2)

Indeed:

a′ = gu′11 gu′2

2 = gu11 gu2

2 (gx11 g x2

2 )c/(gx′11 gx′2

2 )c = ar ′1 = u′1 + cx ′1 = u1 + c(x1 − x ′1) + cx ′1 = r1

r ′2 = u′2 + cx ′2 = u2 + c(x2 − x ′2) + cx ′2 = r2

Perfect witness indistinguishability as conversations with Px1,x2 and conversationswith Px′1,x

′2

are distributed identically:

{(a; c; r1, r2) : u1, u2 ∈R Zn; a← gu11 gu2

2 ; c ← V∗(a); r1, r2 ←n u1 + cx1, u2 + cx2}

{(a; c; r1, r2) : u′1, u′2 ∈R Zn; a← gu′11 gu′2

2 ; c ← V∗(a); r1, r2 ←n u′1 + cx ′1, u′2 + cx ′2}

Page 409: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

124/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Hidingness of Okamoto’s Protocol

Proposition (Okamoto’s protocol is witness hiding)Under DL assumption, no p.p.t. verifier is able to extract a prover’s private key.

Proof.Suppose V∗ finds (x ′1, x ′2) by running protocol with Px1,x2 .Witness indistinguishability implies Pr[(x ′1, x ′2) = (x1, x2)] = 1/n.

Define p.p.t. algorithm E as Px1,x2 and V∗ combined: Px1,x2 V∗x

h

Then E computes with probability 1− 1n two pairs (x1, x2) 6= (x ′1, x ′2) satisfying

h = g x11 gx2

2 , h = gx′11 gx′2

2 .

But this implies: g2 = g (x′1−x1)/(x′2−x2)1 , hence E computes logg1 g2, in

contradiction with DL assumption.

Page 410: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

124/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Hidingness of Okamoto’s Protocol

Proposition (Okamoto’s protocol is witness hiding)Under DL assumption, no p.p.t. verifier is able to extract a prover’s private key.

Proof.Suppose V∗ finds (x ′1, x ′2) by running protocol with Px1,x2 .Witness indistinguishability implies Pr[(x ′1, x ′2) = (x1, x2)] = 1/n.

Define p.p.t. algorithm E as Px1,x2 and V∗ combined: Px1,x2 V∗x

h

Then E computes with probability 1− 1n two pairs (x1, x2) 6= (x ′1, x ′2) satisfying

h = g x11 gx2

2 , h = gx′11 gx′2

2 .

But this implies: g2 = g (x′1−x1)/(x′2−x2)1 , hence E computes logg1 g2, in

contradiction with DL assumption.

Page 411: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

124/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Hidingness of Okamoto’s Protocol

Proposition (Okamoto’s protocol is witness hiding)Under DL assumption, no p.p.t. verifier is able to extract a prover’s private key.

Proof.Suppose V∗ finds (x ′1, x ′2) by running protocol with Px1,x2 .Witness indistinguishability implies Pr[(x ′1, x ′2) = (x1, x2)] = 1/n.

Define p.p.t. algorithm E as Px1,x2 and V∗ combined: Px1,x2 V∗x

h

Then E computes with probability 1− 1n two pairs (x1, x2) 6= (x ′1, x ′2) satisfying

h = g x11 gx2

2 , h = gx′11 gx′2

2 .

But this implies: g2 = g (x′1−x1)/(x′2−x2)1 , hence E computes logg1 g2, in

contradiction with DL assumption.

Page 412: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

124/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Hidingness of Okamoto’s Protocol

Proposition (Okamoto’s protocol is witness hiding)Under DL assumption, no p.p.t. verifier is able to extract a prover’s private key.

Proof.Suppose V∗ finds (x ′1, x ′2) by running protocol with Px1,x2 .Witness indistinguishability implies Pr[(x ′1, x ′2) = (x1, x2)] = 1/n.

Define p.p.t. algorithm E as Px1,x2 and V∗ combined: Px1,x2 V∗x

h

Then E computes with probability 1− 1n two pairs (x1, x2) 6= (x ′1, x ′2) satisfying

h = g x11 gx2

2 , h = gx′11 gx′2

2 .

But this implies: g2 = g (x′1−x1)/(x′2−x2)1 , hence E computes logg1 g2, in

contradiction with DL assumption.

Page 413: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

124/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Hidingness of Okamoto’s Protocol

Proposition (Okamoto’s protocol is witness hiding)Under DL assumption, no p.p.t. verifier is able to extract a prover’s private key.

Proof.Suppose V∗ finds (x ′1, x ′2) by running protocol with Px1,x2 .Witness indistinguishability implies Pr[(x ′1, x ′2) = (x1, x2)] = 1/n.

Define p.p.t. algorithm E as Px1,x2 and V∗ combined: Px1,x2 V∗x

h

Then E computes with probability 1− 1n two pairs (x1, x2) 6= (x ′1, x ′2) satisfying

h = g x11 gx2

2 , h = gx′11 gx′2

2 .

But this implies: g2 = g (x′1−x1)/(x′2−x2)1 , hence E computes logg1 g2, in

contradiction with DL assumption.

Page 414: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

124/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Hidingness of Okamoto’s Protocol

Proposition (Okamoto’s protocol is witness hiding)Under DL assumption, no p.p.t. verifier is able to extract a prover’s private key.

Proof.Suppose V∗ finds (x ′1, x ′2) by running protocol with Px1,x2 .Witness indistinguishability implies Pr[(x ′1, x ′2) = (x1, x2)] = 1/n.

Define p.p.t. algorithm E as Px1,x2 and V∗ combined: Px1,x2 V∗x

h

Then E computes with probability 1− 1n two pairs (x1, x2) 6= (x ′1, x ′2) satisfying

h = g x11 gx2

2 , h = gx′11 gx′2

2 .

But this implies: g2 = g (x′1−x1)/(x′2−x2)1 , hence E computes logg1 g2, in

contradiction with DL assumption.

Page 415: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

125/205

4 Identification Protocols4.1 Definitions

4.2 Password-Based Schemes4.3 One-Way Hash Chains

4.4 Basic Challenge-Response Protocols4.5 Zero-Knowledge Identification Protocols4.6 Witness Hiding Identification Protocols

4.6.1 Okamoto Protocol

Witness Hidingness of Okamoto’s Protocol

Px1,0 V∗x1

hP0,x2 V∗

x2

h

V∗ cannot distinguish between protocol with Px1,0 and protocol with P0,x2

⇒ protocol is witness indistinguishable

Remark 4.4There are n possible witnesses (x1, x2) for a given public key h = gx1

1 g x22 in

Okamoto’s protocol. Interestingly, the protocol remains witness hiding even if thenumber of possible witnesses used by P is limited to just two. E.g., if either x1 = 0or x2 = 0 (hence either h = gx1

1 or h = gx22 ), the same analysis applies, except that

the probability for two different witnesses is now bounded below by 1/2.

Page 416: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

126/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Zero-Knowledge Proofs for NP-Statements

Schnorr identification protocol is zero-knowledge proof for statement

“I know private key x for public key h = gx ”

Corresponding relation: R = {(h; x) : h = gx} ⊆ 〈g〉 × Zn

NP-statement: “I know witness w satisfying (v ; w) ∈ R”

R = {(v ; w)} ⊆ V ×W : easy to check binary relationv ∈ V : common input to prover and verifierw ∈W s.t. (v ; w) ∈ R: witness, private input to prover

LR = {v ∈ V : ∃w∈W (v ; w) ∈ R}: NP-language corresponding to relation R

Page 417: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

126/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Zero-Knowledge Proofs for NP-Statements

Schnorr identification protocol is zero-knowledge proof for statement

“I know private key x for public key h = gx ”

Corresponding relation: R = {(h; x) : h = gx} ⊆ 〈g〉 × Zn

NP-statement: “I know witness w satisfying (v ; w) ∈ R”

R = {(v ; w)} ⊆ V ×W : easy to check binary relationv ∈ V : common input to prover and verifierw ∈W s.t. (v ; w) ∈ R: witness, private input to prover

LR = {v ∈ V : ∃w∈W (v ; w) ∈ R}: NP-language corresponding to relation R

Page 418: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

126/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Zero-Knowledge Proofs for NP-Statements

Schnorr identification protocol is zero-knowledge proof for statement

“I know private key x for public key h = gx ”

Corresponding relation: R = {(h; x) : h = gx} ⊆ 〈g〉 × Zn

NP-statement: “I know witness w satisfying (v ; w) ∈ R”

R = {(v ; w)} ⊆ V ×W : easy to check binary relationv ∈ V : common input to prover and verifierw ∈W s.t. (v ; w) ∈ R: witness, private input to prover

LR = {v ∈ V : ∃w∈W (v ; w) ∈ R}: NP-language corresponding to relation R

Page 419: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

127/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Σ-Protocols

Σ-protocol well-chosen abstraction of many protocols incl. identificationprotocols by Schnorr, Guillou-Quisquater, Okamoto.

Many variations of Σ-protocols exists in today’s literature.

Not to mention this one:

Page 420: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

127/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Σ-Protocols

Σ-protocol well-chosen abstraction of many protocols incl. identificationprotocols by Schnorr, Guillou-Quisquater, Okamoto.

Many variations of Σ-protocols exists in today’s literature.

Not to mention this one:

Page 421: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

128/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Figure 5.1 (Σ-protocol for relation R (p.p.t. algorithms α, ρ, p.t. predicate ϕ))

Prover P Verifier V((v ; w) ∈ R, random tape uP) (v ∈ V )

a← α(v ; w ; uP) −announcement a−−−−−−−−−−−−−→

←−−−challenge c−−−−−−−−−−− c ∈R C

r ← ρ(v ; w ; c; uP) −−−response r−−−−−−−−−−→ ϕ(v ; a; c; r)?

Definition 5.1Σ-protocol for relation R is a protocol of the above form satisfying:Completeness. If P and V follow the protocol, then V always accepts.Special soundness. Efficient extractor E : given v ∈ V and acceptingconversations (a; c; r) and (a; c ′; r ′), c 6= c ′, output witness w with (v ; w) ∈ R.Special honest-verifier zero-knowledge. Efficient simulator S: given v ∈ LR andchallenge c, output conversations (a; c; r) with same probability distribution asconversations between honest P and V on common input v and challenge c,where P uses any witness w with (v ; w) ∈ R.For v ∈ V \LR , S outputs arbitrary accepting conversations with challenge c.

Page 422: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

128/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Figure 5.1 (Σ-protocol for relation R (p.p.t. algorithms α, ρ, p.t. predicate ϕ))

Prover P Verifier V((v ; w) ∈ R, random tape uP) (v ∈ V )

a← α(v ; w ; uP) −announcement a−−−−−−−−−−−−−→

←−−−challenge c−−−−−−−−−−− c ∈R C

r ← ρ(v ; w ; c; uP) −−−response r−−−−−−−−−−→ ϕ(v ; a; c; r)?

Definition 5.1Σ-protocol for relation R is a protocol of the above form satisfying:Completeness. If P and V follow the protocol, then V always accepts.Special soundness. Efficient extractor E : given v ∈ V and acceptingconversations (a; c; r) and (a; c ′; r ′), c 6= c ′, output witness w with (v ; w) ∈ R.Special honest-verifier zero-knowledge. Efficient simulator S: given v ∈ LR andchallenge c, output conversations (a; c; r) with same probability distribution asconversations between honest P and V on common input v and challenge c,where P uses any witness w with (v ; w) ∈ R.For v ∈ V \LR , S outputs arbitrary accepting conversations with challenge c.

Page 423: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

128/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Figure 5.1 (Σ-protocol for relation R (p.p.t. algorithms α, ρ, p.t. predicate ϕ))

Prover P Verifier V((v ; w) ∈ R, random tape uP) (v ∈ V )

a← α(v ; w ; uP) −announcement a−−−−−−−−−−−−−→

←−−−challenge c−−−−−−−−−−− c ∈R C

r ← ρ(v ; w ; c; uP) −−−response r−−−−−−−−−−→ ϕ(v ; a; c; r)?

Definition 5.1Σ-protocol for relation R is a protocol of the above form satisfying:Completeness. If P and V follow the protocol, then V always accepts.Special soundness. Efficient extractor E : given v ∈ V and acceptingconversations (a; c; r) and (a; c ′; r ′), c 6= c ′, output witness w with (v ; w) ∈ R.Special honest-verifier zero-knowledge. Efficient simulator S: given v ∈ LR andchallenge c, output conversations (a; c; r) with same probability distribution asconversations between honest P and V on common input v and challenge c,where P uses any witness w with (v ; w) ∈ R.For v ∈ V \LR , S outputs arbitrary accepting conversations with challenge c.

Page 424: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

128/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Figure 5.1 (Σ-protocol for relation R (p.p.t. algorithms α, ρ, p.t. predicate ϕ))

Prover P Verifier V((v ; w) ∈ R, random tape uP) (v ∈ V )

a← α(v ; w ; uP) −announcement a−−−−−−−−−−−−−→

←−−−challenge c−−−−−−−−−−− c ∈R C

r ← ρ(v ; w ; c; uP) −−−response r−−−−−−−−−−→ ϕ(v ; a; c; r)?

Definition 5.1Σ-protocol for relation R is a protocol of the above form satisfying:Completeness. If P and V follow the protocol, then V always accepts.Special soundness. Efficient extractor E : given v ∈ V and acceptingconversations (a; c; r) and (a; c ′; r ′), c 6= c ′, output witness w with (v ; w) ∈ R.Special honest-verifier zero-knowledge. Efficient simulator S: given v ∈ LR andchallenge c, output conversations (a; c; r) with same probability distribution asconversations between honest P and V on common input v and challenge c,where P uses any witness w with (v ; w) ∈ R.For v ∈ V \LR , S outputs arbitrary accepting conversations with challenge c.

Page 425: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

128/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Figure 5.1 (Σ-protocol for relation R (p.p.t. algorithms α, ρ, p.t. predicate ϕ))

Prover P Verifier V((v ; w) ∈ R, random tape uP) (v ∈ V )

a← α(v ; w ; uP) −announcement a−−−−−−−−−−−−−→

←−−−challenge c−−−−−−−−−−− c ∈R C

r ← ρ(v ; w ; c; uP) −−−response r−−−−−−−−−−→ ϕ(v ; a; c; r)?

Definition 5.1Σ-protocol for relation R is a protocol of the above form satisfying:Completeness. If P and V follow the protocol, then V always accepts.Special soundness. Efficient extractor E : given v ∈ V and acceptingconversations (a; c; r) and (a; c ′; r ′), c 6= c ′, output witness w with (v ; w) ∈ R.Special honest-verifier zero-knowledge. Efficient simulator S: given v ∈ LR andchallenge c, output conversations (a; c; r) with same probability distribution asconversations between honest P and V on common input v and challenge c,where P uses any witness w with (v ; w) ∈ R.For v ∈ V \LR , S outputs arbitrary accepting conversations with challenge c.

Page 426: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

128/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Figure 5.1 (Σ-protocol for relation R (p.p.t. algorithms α, ρ, p.t. predicate ϕ))

Prover P Verifier V((v ; w) ∈ R, random tape uP) (v ∈ V )

a← α(v ; w ; uP) −announcement a−−−−−−−−−−−−−→

←−−−challenge c−−−−−−−−−−− c ∈R C

r ← ρ(v ; w ; c; uP) −−−response r−−−−−−−−−−→ ϕ(v ; a; c; r)?

Definition 5.1Σ-protocol for relation R is a protocol of the above form satisfying:Completeness. If P and V follow the protocol, then V always accepts.Special soundness. Efficient extractor E : given v ∈ V and acceptingconversations (a; c; r) and (a; c ′; r ′), c 6= c ′, output witness w with (v ; w) ∈ R.Special honest-verifier zero-knowledge. Efficient simulator S: given v ∈ LR andchallenge c, output conversations (a; c; r) with same probability distribution asconversations between honest P and V on common input v and challenge c,where P uses any witness w with (v ; w) ∈ R.For v ∈ V \LR , S outputs arbitrary accepting conversations with challenge c.

Page 427: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

129/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Plain vs Special Honest Verifier Zero-Knowledge

plain honest-verifier zero-knowledge:no input c for simulator Ssimulator is free to output conversation with any challenge c

special honest-verifier zero-knowledge:input c for simulator Ssimulator must output conversation for challenge c

special honest-verifier zero-knowledge ⇒ plain honest-verifier zero-knowledge

But special honest-verifier zero-knowledge is not much stronger.

Page 428: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

129/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Plain vs Special Honest Verifier Zero-Knowledge

plain honest-verifier zero-knowledge:no input c for simulator Ssimulator is free to output conversation with any challenge c

special honest-verifier zero-knowledge:input c for simulator Ssimulator must output conversation for challenge c

special honest-verifier zero-knowledge ⇒ plain honest-verifier zero-knowledge

But special honest-verifier zero-knowledge is not much stronger.

Page 429: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

129/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Plain vs Special Honest Verifier Zero-Knowledge

plain honest-verifier zero-knowledge:no input c for simulator Ssimulator is free to output conversation with any challenge c

special honest-verifier zero-knowledge:input c for simulator Ssimulator must output conversation for challenge c

special honest-verifier zero-knowledge ⇒ plain honest-verifier zero-knowledge

But special honest-verifier zero-knowledge is not much stronger.

Page 430: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

129/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Plain vs Special Honest Verifier Zero-Knowledge

plain honest-verifier zero-knowledge:no input c for simulator Ssimulator is free to output conversation with any challenge c

special honest-verifier zero-knowledge:input c for simulator Ssimulator must output conversation for challenge c

special honest-verifier zero-knowledge ⇒ plain honest-verifier zero-knowledge

But special honest-verifier zero-knowledge is not much stronger.

Page 431: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

130/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

From Plain to Special Honest Verifier Zero-Knowledge

Without loss of generality, let (C ,+) be an additive finite group.

Figure 5.2 (Transformed Σ-protocol for relation R)

Prover P Verifier V((v ; w) ∈ R, random tape uP) (v ∈ V )

a← α(v ; w ; uP)cP ∈R C −−−−

a, cP−−−−−−−→

←−−−−−cV−−−−−− cV ∈R C

r ← ρ(v ; w ; cP + cV ; uP) −−−−−−r−−−−−−→ ϕ(v ; a; cP + cV ; r)?

Proposition 5.2The transformed protocol in Figure 5.2 is a Σ-protocol for relation R, providedthat the original protocol as given in Figure 5.1 satisfies completeness, specialsoundness, and plain honest-verifier zero-knowledgeness.

Page 432: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

130/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

From Plain to Special Honest Verifier Zero-Knowledge

Without loss of generality, let (C ,+) be an additive finite group.

Figure 5.2 (Transformed Σ-protocol for relation R)

Prover P Verifier V((v ; w) ∈ R, random tape uP) (v ∈ V )

a← α(v ; w ; uP)cP ∈R C −−−−

a, cP−−−−−−−→

←−−−−−cV−−−−−− cV ∈R C

r ← ρ(v ; w ; cP + cV ; uP) −−−−−−r−−−−−−→ ϕ(v ; a; cP + cV ; r)?

Proposition 5.2The transformed protocol in Figure 5.2 is a Σ-protocol for relation R, providedthat the original protocol as given in Figure 5.1 satisfies completeness, specialsoundness, and plain honest-verifier zero-knowledgeness.

Page 433: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

130/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

From Plain to Special Honest Verifier Zero-Knowledge

Without loss of generality, let (C ,+) be an additive finite group.

Figure 5.2 (Transformed Σ-protocol for relation R)

Prover P Verifier V((v ; w) ∈ R, random tape uP) (v ∈ V )

a← α(v ; w ; uP)cP ∈R C −−−−

a, cP−−−−−−−→

←−−−−−cV−−−−−− cV ∈R C

r ← ρ(v ; w ; cP + cV ; uP) −−−−−−r−−−−−−→ ϕ(v ; a; cP + cV ; r)?

Proposition 5.2The transformed protocol in Figure 5.2 is a Σ-protocol for relation R, providedthat the original protocol as given in Figure 5.1 satisfies completeness, specialsoundness, and plain honest-verifier zero-knowledgeness.

Page 434: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 435: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 436: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 437: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 438: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 439: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 440: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 441: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 442: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 443: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 444: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

131/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Proposition 5.3 (Schnorr’s protocol)The protocol in Figure 4.3 is a Σ-protocol for relation {(h; x) : h = gx}.

Proof.Completeness. g r = gu+cx = gu(gx )c = ahc .Special soundness. For accepting (a; c; r), (a; c ′; r ′), c 6= c ′:

g r = ahc , g r′ = ahc′ ⇒ g r−r′ = hc−c′ ⇔ h = gr−r′c−c′ .

Witness extracted as x ←n (r − r ′)/(c − c ′).Special honest-verifier zero-knowledgeness. For challenge c, distributions forconversations with honest verifier and simulated conversations are resp.:

{(a; c; r) : u ∈R Zn; a← gu; r ←n u + cx},{(a; c; r) : r ∈R Zn; a← g r h−c}.

Identical distributions: each conversation occurs with probability 1/n.

Page 445: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

132/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Figure 5.3 (Insecure variant of Schnorr’s protocol)

Prover Verifier(x = logg h)

u ∈R Z∗na← gu

−−−−−−a−−−−−−→

c ∈R Zn

←−−−−−−c−−−−−−

r ←n cu + x−−−−−−

r−−−−−−→

g r ?= ac h

Exercise 5.1.1To see that honest-verifier zero-knowledge does not imply zero-knowledge againstarbitrarily cheating verifiers, consider the protocol in Figure 5.3. Show that theprotocol is complete, special sound, and honest-verifier zero-knowledge. Also,show that the protocol is completely insecure against a cheating verifier.

Page 446: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

133/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Exercise 5.1.2The protocol in Figure 5.3 avoids the value u = 0, but this is not essential. Showthat the protocol remains complete, special sound, and honest-verifierzero-knowledge (and insecure against a cheating verifier) if one uses u ∈R Zninstead of u ∈R Z∗n , by exhibiting a slightly more involved simulation.

Remark 5.4By applying the transformation of Proposition 5.2 to the protocol in Figure 5.3,we obtain a Σ-protocol which is completely insecure against a cheating verifier.

Page 447: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

134/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Five Forms of Composition

Parallel composition maintains Σ-protocol propertiesAND-composition prove knowledge of two witnessesEQ-composition prove equality of witnessesOR-composition prove knowledge of 1-out-of-2 witnesses, not revealing whichNEQ-composition prove inequality of witnesses

All illustrated for Schnorr’s Σ-protocol.

Page 448: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

135/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Figure 5.4 (Parallel composition of Schnorr’s protocol)

Prover Verifier(x = logg h)u1, u2 ∈R Zn

a1 ← gu1

a2 ← gu2−−−−

a1, a2−−−−−−−→

c1, c2 ∈R Zn

←−−−−c1, c2−−−−−−−

r1 ←n u1 + c1xr2 ←n u2 + c2x −−−−

r1, r2−−−−−−−→

g r1 ?= a1hc1

g r2 ?= a2hc2

Page 449: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

136/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.5 (Parallel composition)The protocol in Figure 5.4 is a Σ-protocol for relation

{(h; x) : h = gx}

Proof.Completeness.

g r1 = gu1+c1x = gu1 (gx )c1 = a1hc1

g r2 = gu2+c2x = gu2 (gx )c2 = a2hc2

Page 450: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

136/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.5 (Parallel composition)The protocol in Figure 5.4 is a Σ-protocol for relation

{(h; x) : h = gx}

Proof.Special soundness. Given accepting conversations (a1, a2; c1, c2; r1, r2) and(a1, a2; c ′1, c ′2; r ′1, r ′2) with (c1, c2) 6= (c ′1, c ′2). Then c1 6= c ′1 and/or c2 6= c ′2.If c1 6= c ′1:

g r1 = a1hc1 , g r′1 = a1hc′1 ⇒ g r1−r′1 = hc1−c′1 ⇔ h = gr1−r′1c1−c′1

Witness extracted as x ←n (r1 − r ′1)/(c1 − c ′1).If c2 6= c ′2: same witness extracted as x ←n (r2 − r ′2)/(c2 − c ′2).Hence: witness x satisfying h = gx can be extracted in either case.

Page 451: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

136/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.5 (Parallel composition)The protocol in Figure 5.4 is a Σ-protocol for relation

{(h; x) : h = gx}

Proof.Special honest-verifier zero-knowledgeness. Given challenge (c1, c2), distribu-tions of real conversations and simulated conversations are:

{(a1, a2; c1, c2; r1, r2) : u1, u2 ∈R Zn; a1 ← gu1 ; a2 ← gu2 ;r1 ←n u1 + c1x ; r2 ←n u2 + c2x}

{(a1, a2; c1, c2; r1, r2) : r1, r2 ∈R Zn; a1 ← g r1 h−c1 ; a2 ← g r2 h−c2}

Identical distributions: each conversation occurs with probability 1/n2.

Page 452: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

137/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

AND-CompositionGiven Σ-protocols for relations R1 and R2, construct Σ-protocol for relation:

R1 ∧ R2 := {(v1, v2; w1,w2) : (v1; w1) ∈ R1, (v2; w2) ∈ R2}

So, run Σ-protocols for relations R1 and R2 in parallel?

Fails! See Exercise 5.2.1.

Run Σ-protocols for relations R1 and R2 in parallel, using common challenge c.

Page 453: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

137/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

AND-CompositionGiven Σ-protocols for relations R1 and R2, construct Σ-protocol for relation:

R1 ∧ R2 := {(v1, v2; w1,w2) : (v1; w1) ∈ R1, (v2; w2) ∈ R2}

So, run Σ-protocols for relations R1 and R2 in parallel?

Fails! See Exercise 5.2.1.

Run Σ-protocols for relations R1 and R2 in parallel, using common challenge c.

Page 454: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

137/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

AND-CompositionGiven Σ-protocols for relations R1 and R2, construct Σ-protocol for relation:

R1 ∧ R2 := {(v1, v2; w1,w2) : (v1; w1) ∈ R1, (v2; w2) ∈ R2}

So, run Σ-protocols for relations R1 and R2 in parallel?

Fails! See Exercise 5.2.1.

Run Σ-protocols for relations R1 and R2 in parallel, using common challenge c.

Page 455: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

137/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

AND-CompositionGiven Σ-protocols for relations R1 and R2, construct Σ-protocol for relation:

R1 ∧ R2 := {(v1, v2; w1,w2) : (v1; w1) ∈ R1, (v2; w2) ∈ R2}

So, run Σ-protocols for relations R1 and R2 in parallel?

Fails! See Exercise 5.2.1.

Run Σ-protocols for relations R1 and R2 in parallel, using common challenge c.

Page 456: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

138/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Figure 5.5 (AND-composition of Schnorr’s protocol)

Prover Verifier(x1 = logg h1, x2 = logg h2)

u1, u2 ∈R Zna1 ← gu1

a2 ← gu2−−−−

a1, a2−−−−−−−→

c ∈R Zn

←−−−−−−c−−−−−−

r1 ←n u1 + cx1

r2 ←n u2 + cx2 −−−−r1, r2−−−−−−−→

g r1 ?= a1hc1

g r2 ?= a2hc2

Page 457: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

139/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.6 (AND-composition)The protocol in Figure 5.5 is a Σ-protocol for relation

{(h1, h2; x1, x2) : h1 = g x1 , h2 = g x2}.

Proof.Completeness.

g r1 = gu1+cx1 = gu1 (gx1 )c = a1hc1,

g r2 = gu2+cx2 = gu2 (gx2 )c = a2hc2.

Page 458: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

139/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.6 (AND-composition)The protocol in Figure 5.5 is a Σ-protocol for relation

{(h1, h2; x1, x2) : h1 = g x1 , h2 = g x2}.

Proof.Special soundness. For accepting (a1, a2; c; r1, r2), (a1, a2; c ′; r ′1, r ′2), c 6= c ′:

g r1 = a1hc1, g r′1 = a1hc′

1 ⇒ g r1−r′1 = hc−c′1 ⇔ h1 = g

r1−r′1c−c′ .

By symmetry: h2 = gr2−r′2c−c′ .

Witness (x1, x2) extracted as x1 ←n (r1 − r ′1)/(c − c ′), x2 ←n (r2 − r ′2)/(c − c ′).

Page 459: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

139/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.6 (AND-composition)The protocol in Figure 5.5 is a Σ-protocol for relation

{(h1, h2; x1, x2) : h1 = g x1 , h2 = g x2}.

Proof.Special honest-verifier zero-knowledgeness. Given challenge c, distribution ofreal conversations and simulated conversations are:

{(a1, a2; c; r1, r2) : u1, u2 ∈R Zn; a1 ← gu1 ; a2 ← gu2 ;r1 ←n u1 + cx1; r2 ←n u2 + cx2}

{(a1, a2; c; r1, r2) : r1, r2 ∈R Zn; a1 ← g r1 h−c1 ; a2 ← g r2 h−c

2 }

Identical distributions: each conversation occurs with probability 1/n2.

Page 460: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

140/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Exercise

Exercise 5.2.1By considering the special soundness property, explain why running the SchnorrΣ-protocol (see Figure 4.3) in parallel for h1 and h2 does not yield a Σ-protocol forrelation {(h1, h2; x1, x2) : h1 = g x1 , h2 = gx2}. Hint: consider a prover who knowsx1 = logg h1 but does not know x2 = logg h2.

Page 461: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

141/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Figure 5.6 (Alternative to AND-composition of Schnorr’s protocol?)

Prover Verifier(x1 = logg h1, x2 = logg h2)

u ∈R Zn

a← gu−−−−−−

a−−−−−−→

←−−−−−−c−−−−−− c ∈R Zn

r ←n u + cx1 + c2x2 −−−−−−r−−−−−−→ g r ?= ahc

1hc22

Exercise 5.2.2Consider the protocol in Figure 5.6 for relation{(h1, h2; x1, x2) : h1 = gx1 , h2 = gx2}. (i) Show that the protocol is complete andspecial honest-verifier zero-knowledge. (ii) Why does special soundness not holdfor this protocol? Hint: consider prover who knows x1 = logg h1 but does notknow x2 = logg h2. (iii) Show that soundness holds in this sense: for any(h1, h2) ∈ 〈g〉 × 〈g〉, given three accepting conversations (a; c; r), (a; c ′; r ′),(a; c ′′; r ′′) with c 6= c ′, c 6= c ′′, c ′ 6= c ′′ one can efficiently compute witness(x1, x2) satisfying h1 = g x1 and h2 = gx2 .

Page 462: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

142/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

EQ-CompositionGiven Σ-protocol for relation R, construct Σ-protocol for relation:

{(v1, v2; w) : (v1; w) ∈ R, (v2; w) ∈ R}

Special case of AND-composition, with common witness w for v1 and v2.

Use AND-composition, but prover uses same random tape uP (see Figure 5.1) inboth cases.

Run two instances of Σ-protocol for R in parallel, usingcommon randomness uP , common challenge c and common response r .

Page 463: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

142/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

EQ-CompositionGiven Σ-protocol for relation R, construct Σ-protocol for relation:

{(v1, v2; w) : (v1; w) ∈ R, (v2; w) ∈ R}

Special case of AND-composition, with common witness w for v1 and v2.

Use AND-composition, but prover uses same random tape uP (see Figure 5.1) inboth cases.

Run two instances of Σ-protocol for R in parallel, usingcommon randomness uP , common challenge c and common response r .

Page 464: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

142/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

EQ-CompositionGiven Σ-protocol for relation R, construct Σ-protocol for relation:

{(v1, v2; w) : (v1; w) ∈ R, (v2; w) ∈ R}

Special case of AND-composition, with common witness w for v1 and v2.

Use AND-composition, but prover uses same random tape uP (see Figure 5.1) inboth cases.

Run two instances of Σ-protocol for R in parallel, usingcommon randomness uP , common challenge c and common response r .

Page 465: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

143/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Figure 5.7 (EQ-composition of Schnorr’s protocol)

Prover Verifier(x = logg1 h1 = logg2 h2)

u ∈R Zna1 ← gu

1

a2 ← gu2 −−−−

a1, a2−−−−−−−→

c ∈R Zn

←−−−−−−c−−−−−−

r ←n u + cx−−−−−−

r−−−−−−→

g r1

?= a1hc1

g r2

?= a2hc2

Page 466: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

144/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.7 (EQ-composition)The protocol in Figure 5.7 is a Σ-protocol for relation

{(g1, h1, g2, h2; x) : h1 = gx1 , h2 = gx

2 }.

Proof.Completeness.

g r1 = gu+cx

1 = gu1 (gx

1 )c = a1hc1,

g r2 = gu+cx

2 = gu2 (gx

2 )c = a2hc2.

Page 467: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

144/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.7 (EQ-composition)The protocol in Figure 5.7 is a Σ-protocol for relation

{(g1, h1, g2, h2; x) : h1 = gx1 , h2 = gx

2 }.

Proof.Special soundness. Given accepting (a1, a2; c; r) and (a1, a2; c ′; r ′), c 6= c ′:

g r1 = a1hc

1, g r2 = a2hc

2, g r′1 = a1hc′

1 , g r′2 = a2hc′

2

⇒ g r−r′1 = hc−c′

1 , g r−r′2 = hc−c′

2

⇔ h1 = gr−r′c−c′

1 , h2 = gr−r′c−c′

2 .

Witness extracted as x ←n (r − r ′)/(c − c ′).

Page 468: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

144/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.7 (EQ-composition)The protocol in Figure 5.7 is a Σ-protocol for relation

{(g1, h1, g2, h2; x) : h1 = gx1 , h2 = gx

2 }.

Proof.Special honest-verifier zero-knowledgeness. Given challenge c, distribution ofreal conversations and simulated conversations are:

{(a1, a2; c; r) : u ∈R Zn; a1 ← gu1 ; a2 ← gu

2 ; r ←n u + cx}{(a1, a2; c; r) : r ∈R Zn; a1 ← g r

1 h−c1 ; a2 ← g r

2 h−c2 }

Identical distributions provided logg1 h1 = logg2 h2, cf. Definition 5.1; furthermore,if logg1 h1 6= logg2 h2, simulated conversations are accepting, as required.

Page 469: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

145/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

OR-CompositionGiven Σ-protocols for relations R1 and R2, construct Σ-protocol for relation:

R1 ∨ R2 = {(v1, v2; w1,w2) : (v1; w1) ∈ R1 ∨ (v2; w2) ∈ R2}

Suppose prover knows w1 with (v1; w1) ∈ R1 (but no w2 with (v2; w2) ∈ R2).

Prover can run Σ-protocol for R1 but not for R2.

Verifier lets prover “cheat” by allowing prover to use simulation for R2.

Prover allowed to split challenge c into “challenges” c1, c2 satisfying c1 + c2 = c.

Page 470: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

145/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

OR-CompositionGiven Σ-protocols for relations R1 and R2, construct Σ-protocol for relation:

R1 ∨ R2 = {(v1, v2; w1,w2) : (v1; w1) ∈ R1 ∨ (v2; w2) ∈ R2}

Suppose prover knows w1 with (v1; w1) ∈ R1 (but no w2 with (v2; w2) ∈ R2).

Prover can run Σ-protocol for R1 but not for R2.

Verifier lets prover “cheat” by allowing prover to use simulation for R2.

Prover allowed to split challenge c into “challenges” c1, c2 satisfying c1 + c2 = c.

Page 471: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

145/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

OR-CompositionGiven Σ-protocols for relations R1 and R2, construct Σ-protocol for relation:

R1 ∨ R2 = {(v1, v2; w1,w2) : (v1; w1) ∈ R1 ∨ (v2; w2) ∈ R2}

Suppose prover knows w1 with (v1; w1) ∈ R1 (but no w2 with (v2; w2) ∈ R2).

Prover can run Σ-protocol for R1 but not for R2.

Verifier lets prover “cheat” by allowing prover to use simulation for R2.

Prover allowed to split challenge c into “challenges” c1, c2 satisfying c1 + c2 = c.

Page 472: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

145/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

OR-CompositionGiven Σ-protocols for relations R1 and R2, construct Σ-protocol for relation:

R1 ∨ R2 = {(v1, v2; w1,w2) : (v1; w1) ∈ R1 ∨ (v2; w2) ∈ R2}

Suppose prover knows w1 with (v1; w1) ∈ R1 (but no w2 with (v2; w2) ∈ R2).

Prover can run Σ-protocol for R1 but not for R2.

Verifier lets prover “cheat” by allowing prover to use simulation for R2.

Prover allowed to split challenge c into “challenges” c1, c2 satisfying c1 + c2 = c.

Page 473: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

145/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

OR-CompositionGiven Σ-protocols for relations R1 and R2, construct Σ-protocol for relation:

R1 ∨ R2 = {(v1, v2; w1,w2) : (v1; w1) ∈ R1 ∨ (v2; w2) ∈ R2}

Suppose prover knows w1 with (v1; w1) ∈ R1 (but no w2 with (v2; w2) ∈ R2).

Prover can run Σ-protocol for R1 but not for R2.

Verifier lets prover “cheat” by allowing prover to use simulation for R2.

Prover allowed to split challenge c into “challenges” c1, c2 satisfying c1 + c2 = c.

Page 474: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

146/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Figure 5.8 (OR-composition of Schnorr’s protocol)

Prover Verifier

(using x1 = logg h1) (using x2 = logg h2)c2, r2, u1 ∈R Zn c1, r1, u2 ∈R Zn

a1 ← gu1 a1 ← g r1 h−c11

a2 ← g r2 h−c22 a2 ← gu2

−−−a1, a2−−−−−−→

c ∈R Zn

←−−−−c−−−−

c1 ←n c−c2 c2 ←n c−c1

r1 ←n u1 + c1x1 r2 ←n u2 + c2x2 −c1, c2, r1, r2−−−−−−−−−→ c1 + c2

?=n cg r1 ?= a1hc1

1

g r2 ?= a2hc22

Page 475: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

147/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.8 (OR-composition)The protocol in Figure 5.8 is a Σ-protocol for relation

{(h1, h2; x1, x2) : h1 = gx1 ∨ h2 = g x2}.

Proof.Completeness. Case prover uses x1. Then:

c1 + c2 = c − c2 + c2 = c

g r1 = gu1+c1x1 = gu1 (gx1 )c1 = a1hc11 ,

g r2 = a2hc22 .

Case prover uses x2 is similar.

Page 476: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

147/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.8 (OR-composition)The protocol in Figure 5.8 is a Σ-protocol for relation

{(h1, h2; x1, x2) : h1 = gx1 ∨ h2 = g x2}.

Proof.Special soundness. Given accepting conversations (a1, a2; c; c1, c2, r1, r2) and(a1, a2; c ′; c ′1, c ′2, r ′1, r ′2), c 6= c ′. Then c = c1 + c2 6= c ′1 + c ′2 = c ′ implies c1 6= c ′1and/or c2 6= c ′2.

g r1 = a1hc11 , g r2 = a2hc2

2 , g r′1 = a1hc′11 , g r′2 = a2hc′2

2

⇒ g r1−r′1 = hc1−c′11 , g r2−r′2 = hc2−c′2

2

If c1 6= c ′1, set x1 ←n (r1 − r ′1)/(c1 − c ′1);otherwise c2 6= c ′2, and set x2 ←n (r2 − r ′2)/(c2 − c ′2).Witness (x1, x2) satisfies h1 = gx1 ∨ h2 = gx2 .

Page 477: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

147/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.8 (OR-composition)The protocol in Figure 5.8 is a Σ-protocol for relation

{(h1, h2; x1, x2) : h1 = gx1 ∨ h2 = g x2}.

Proof.Special honest-verifier zero-knowledgeness. Given challenge c, distributions ofreal conversations and simulated conversations are resp. (case prover uses x1):

{(a1, a2; c; c1, c2, r1, r2) : u1, c2, r2 ∈R Zn; a1 ← gu1 ; a2 ← g r2 h−c22 ;

c1 ←n c − c2; r1 ←n u1 + c1x1}{(a1, a2; c; c1, c2, r1, r2) : c1, r1, r2 ∈R Zn; c2 ←n c − c1;

a1 ← g r1 h−c11 ; a2 ← g r2 h−c2

2 }

Identical distributions: each conversation occurs with probability 1/n3.

Page 478: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

148/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Remark (Witness indistinguishability of OR-composition)Real conversations in case prover uses x1:

{(a1, a2; c; c1, c2, r1, r2) : u1, c2, r2 ∈R Zn; a1 ← gu1 ; a2 ← g r2 h−c22 ;

c1 ←n c − c2; r1 ←n u1 + c1x1}

Real conversations in case prover uses x2:

{(a1, a2; c; c1, c2, r1, r2) : u2, c1, r1 ∈R Zn; a1 ← g r1 h−c11 ; a2 ← gu2 ;

c2 ←n c − c1; r2 ←n u2 + c2x2}

Identical distributions (both identical to distribution of simulated conversations).Therefore, protocol is witness indistinguishable.

Exercise 5.2.3 (OR-composition slightly optimized)See Figure 5.8. The prover may omit sending c2, in which case the verifier mustreplace test c1 + c2

?=n c by assignment c2 ←n c − c1. (Thus, prover always omitssending c2 independent of whether it knows x1 and/or x2.) Prove that theresulting protocol is a Σ-protocol for the same relation as before.

Page 479: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

148/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Remark (Witness indistinguishability of OR-composition)Real conversations in case prover uses x1:

{(a1, a2; c; c1, c2, r1, r2) : u1, c2, r2 ∈R Zn; a1 ← gu1 ; a2 ← g r2 h−c22 ;

c1 ←n c − c2; r1 ←n u1 + c1x1}

Real conversations in case prover uses x2:

{(a1, a2; c; c1, c2, r1, r2) : u2, c1, r1 ∈R Zn; a1 ← g r1 h−c11 ; a2 ← gu2 ;

c2 ←n c − c1; r2 ←n u2 + c2x2}

Identical distributions (both identical to distribution of simulated conversations).Therefore, protocol is witness indistinguishable.

Exercise 5.2.3 (OR-composition slightly optimized)See Figure 5.8. The prover may omit sending c2, in which case the verifier mustreplace test c1 + c2

?=n c by assignment c2 ←n c − c1. (Thus, prover always omitssending c2 independent of whether it knows x1 and/or x2.) Prove that theresulting protocol is a Σ-protocol for the same relation as before.

Page 480: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

149/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

NEQ-CompositionGiven Σ-protocol for relation R, construct Σ-protocol for relation:

{(v1, v2; w1,w2) : (v1; w1) ∈ R, (v2; w2) ∈ R,w1 6= w2}

AND-composition proves knowledge of w1 and w2. How to prove w1 6= w2?

For Schnorr’s protocol, with public keys g1, h1 and g2, h2,use AND-composition to prove knowledge of x1 = logg1 h1 and x2 = logg2 h2.

Since x1 6= x2, multiplicative inverse of x1 − x2 modulo n is defined. Hence,

h1h2 = g x11 gx2

2 = (g1g2)x1 gx2−x12

impliesg2 = (g1g2)x1/(x1−x2)(h1h2)1/(x2−x1). (5.1)

Use instance of Okamoto’s protocol with public key g2, generators g1g2 and h1h2,witnesses x1/(x1 − x2) and 1/(x2 − x1).

Page 481: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

149/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

NEQ-CompositionGiven Σ-protocol for relation R, construct Σ-protocol for relation:

{(v1, v2; w1,w2) : (v1; w1) ∈ R, (v2; w2) ∈ R,w1 6= w2}

AND-composition proves knowledge of w1 and w2. How to prove w1 6= w2?

For Schnorr’s protocol, with public keys g1, h1 and g2, h2,use AND-composition to prove knowledge of x1 = logg1 h1 and x2 = logg2 h2.

Since x1 6= x2, multiplicative inverse of x1 − x2 modulo n is defined. Hence,

h1h2 = g x11 gx2

2 = (g1g2)x1 gx2−x12

impliesg2 = (g1g2)x1/(x1−x2)(h1h2)1/(x2−x1). (5.1)

Use instance of Okamoto’s protocol with public key g2, generators g1g2 and h1h2,witnesses x1/(x1 − x2) and 1/(x2 − x1).

Page 482: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

149/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

NEQ-CompositionGiven Σ-protocol for relation R, construct Σ-protocol for relation:

{(v1, v2; w1,w2) : (v1; w1) ∈ R, (v2; w2) ∈ R,w1 6= w2}

AND-composition proves knowledge of w1 and w2. How to prove w1 6= w2?

For Schnorr’s protocol, with public keys g1, h1 and g2, h2,use AND-composition to prove knowledge of x1 = logg1 h1 and x2 = logg2 h2.

Since x1 6= x2, multiplicative inverse of x1 − x2 modulo n is defined. Hence,

h1h2 = g x11 gx2

2 = (g1g2)x1 gx2−x12

impliesg2 = (g1g2)x1/(x1−x2)(h1h2)1/(x2−x1). (5.1)

Use instance of Okamoto’s protocol with public key g2, generators g1g2 and h1h2,witnesses x1/(x1 − x2) and 1/(x2 − x1).

Page 483: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

149/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

NEQ-CompositionGiven Σ-protocol for relation R, construct Σ-protocol for relation:

{(v1, v2; w1,w2) : (v1; w1) ∈ R, (v2; w2) ∈ R,w1 6= w2}

AND-composition proves knowledge of w1 and w2. How to prove w1 6= w2?

For Schnorr’s protocol, with public keys g1, h1 and g2, h2,use AND-composition to prove knowledge of x1 = logg1 h1 and x2 = logg2 h2.

Since x1 6= x2, multiplicative inverse of x1 − x2 modulo n is defined. Hence,

h1h2 = g x11 gx2

2 = (g1g2)x1 gx2−x12

impliesg2 = (g1g2)x1/(x1−x2)(h1h2)1/(x2−x1). (5.1)

Use instance of Okamoto’s protocol with public key g2, generators g1g2 and h1h2,witnesses x1/(x1 − x2) and 1/(x2 − x1).

Page 484: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

149/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

NEQ-CompositionGiven Σ-protocol for relation R, construct Σ-protocol for relation:

{(v1, v2; w1,w2) : (v1; w1) ∈ R, (v2; w2) ∈ R,w1 6= w2}

AND-composition proves knowledge of w1 and w2. How to prove w1 6= w2?

For Schnorr’s protocol, with public keys g1, h1 and g2, h2,use AND-composition to prove knowledge of x1 = logg1 h1 and x2 = logg2 h2.

Since x1 6= x2, multiplicative inverse of x1 − x2 modulo n is defined. Hence,

h1h2 = g x11 gx2

2 = (g1g2)x1 gx2−x12

impliesg2 = (g1g2)x1/(x1−x2)(h1h2)1/(x2−x1). (5.1)

Use instance of Okamoto’s protocol with public key g2, generators g1g2 and h1h2,witnesses x1/(x1 − x2) and 1/(x2 − x1).

Page 485: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

150/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Figure 5.9 (NEQ-composition of Schnorr’s protocol)

Prover Verifier(x1 = logg1 h1, x2 = logg2 h2)

u1, u2, u3, u4 ∈R Zna1 ← gu1

1a2 ← gu2

2a3 ← (g1g2)u3 (h1h2)u4

−−−a1, a2, a3−−−−−−−−−→

c ∈R Zn

←−−−−−−c−−−−−−

r1 ←n u1 + cx1r2 ←n u2 + cx2

r3 ←n u3 + cx1/(x1 − x2)r4 ←n u4 + c/(x2 − x1) −−

r1, r2, r3, r4−−−−−−−−−→ g r1

1?= a1hc

1

g r22

?= a2hc2

(g1g2)r3 (h1h2)r4 ?= a3g c2

Page 486: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

151/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.9 (NEQ-composition)The protocol in Figure 5.9 is a Σ-protocol for relation

{(g1, h1, g2, h2; x1, x2) : h1 = g x11 , h2 = g x2

2 , x1 6= x2},

assuming logg1 g2 is unknown.

Proof.Completeness. Clearly, g ri

i = ai hci for i = 1, 2.

Furthermore:

(g1g2)r3 (h1h2)r4 = (g1g2)u3 (h1h2)u4 ((g1g2)cx1/(x1−x2)(h1h2)c/(x2−x1)) = a3g c2 ,

using Eq. (5.1).

Page 487: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

151/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.9 (NEQ-composition)The protocol in Figure 5.9 is a Σ-protocol for relation

{(g1, h1, g2, h2; x1, x2) : h1 = g x11 , h2 = g x2

2 , x1 6= x2},

assuming logg1 g2 is unknown.

Proof.Special soundness. Given (a1, a2, a3; c; r1, r2, r3, r4), (a1, a2, a3; c ′; r ′1, r ′2, r ′3, r ′4)both accepting, c 6= c ′. As for AND-composition, witness (x1, x2) is extractedas x1 ←n (r ′1 − r1)/(c ′ − c) and x2 ←n (r ′2 − r2)/(c ′ − c).Moreover,

g2 = (g1g2)(r3−r′3 )/(c−c′)(h1h2)(r4−r′4 )/(c−c′).

Suppose x1 = x2. Then g2 = (g1g2)α for known α 6= 0, 1 (as g1, g2 6= 1), henceg2 = gα/(1−α)

1 , contradicting that logg1 g2 is unknown. Therefore x1 6= x2.

Page 488: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

151/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.2.1 Parallel Composition5.2.2 AND-Composition5.2.3 EQ-Composition5.2.4 OR-Composition5.2.5 NEQ-Composition

Proposition 5.9 (NEQ-composition)The protocol in Figure 5.9 is a Σ-protocol for relation

{(g1, h1, g2, h2; x1, x2) : h1 = g x11 , h2 = g x2

2 , x1 6= x2},

assuming logg1 g2 is unknown.

Proof.Special honest-verifier zero-knowledgeness. Given challenge c, distributions ofreal conversations and simulated conversations are:

{(a1, a2, a3; c; r1, r2, r3, r4) : u1, u2, u3, u4 ∈R Zn; a1 ← gu11 ; a2 ← gu2

2 ;a3 ← (g1g2)u3 (h1h2)u4 ; r1 ←n u1 + cx1; r2 ←n u2 + cx2;

r3 ←n u3 + cx1/(x1 − x2); r4 ←n u4 + c/(x2 − x1)},{(a1, a2, a3; c; r1, r2, r3, r4) : r1, r2, r3, r4 ∈R Zn; a1 ← g r1

1 h−c1 ; a2 ← g r2

2 h−c2 ;

a3 ← (g1g2)r3 (h1h2)r4 g−c2 }.

Identical distributions provided logg1 h1 6= logg2 h2, cf. Definition 5.1; furthermore,if logg1 h1 = logg2 h2, simulated conversations are accepting, as required.

Page 489: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

152/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Example 5.10Σ-protocol needed for relation R:

R = {(A,B; x , y , z) : A = g x hy ∧ B = gxy h(1−x)z ∧ x ∈ {0, 1}}.

Distinguish cases x = 0 and x = 1 for given (A,B; x , y , z) ∈ R.If x = 0, then A = hy ∧ B = hz ; if x = 1, then A = ghy ∧ B = gy .For relation R, apply OR-composition to:

R0 = {(A,B; y , z) : A = hy ∧ B = hz},R1 = {(A,B; y) : A = ghy ∧ B = g y}.

For relation R0, apply AND-composition to:

R0A = {(A; y) : A = hy}, R0B = {(B; z) : B = hz}.

For relation R1, apply EQ-composition to:

R1A = {(A; y) : A/g = hy}, R1B = {(B; y) : B = gy}.

R0A, R0B , R1A, R1B are instances of (slight variations of) Schnorr’s protocol.

Page 490: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

152/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Example 5.10Σ-protocol needed for relation R:

R = {(A,B; x , y , z) : A = g x hy ∧ B = gxy h(1−x)z ∧ x ∈ {0, 1}}.

Distinguish cases x = 0 and x = 1 for given (A,B; x , y , z) ∈ R.If x = 0, then A = hy ∧ B = hz ; if x = 1, then A = ghy ∧ B = gy .For relation R, apply OR-composition to:

R0 = {(A,B; y , z) : A = hy ∧ B = hz},R1 = {(A,B; y) : A = ghy ∧ B = g y}.

For relation R0, apply AND-composition to:

R0A = {(A; y) : A = hy}, R0B = {(B; z) : B = hz}.

For relation R1, apply EQ-composition to:

R1A = {(A; y) : A/g = hy}, R1B = {(B; y) : B = gy}.

R0A, R0B , R1A, R1B are instances of (slight variations of) Schnorr’s protocol.

Page 491: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

152/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Example 5.10Σ-protocol needed for relation R:

R = {(A,B; x , y , z) : A = g x hy ∧ B = gxy h(1−x)z ∧ x ∈ {0, 1}}.

Distinguish cases x = 0 and x = 1 for given (A,B; x , y , z) ∈ R.If x = 0, then A = hy ∧ B = hz ; if x = 1, then A = ghy ∧ B = gy .For relation R, apply OR-composition to:

R0 = {(A,B; y , z) : A = hy ∧ B = hz},R1 = {(A,B; y) : A = ghy ∧ B = g y}.

For relation R0, apply AND-composition to:

R0A = {(A; y) : A = hy}, R0B = {(B; z) : B = hz}.

For relation R1, apply EQ-composition to:

R1A = {(A; y) : A/g = hy}, R1B = {(B; y) : B = gy}.

R0A, R0B , R1A, R1B are instances of (slight variations of) Schnorr’s protocol.

Page 492: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

152/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Example 5.10Σ-protocol needed for relation R:

R = {(A,B; x , y , z) : A = g x hy ∧ B = gxy h(1−x)z ∧ x ∈ {0, 1}}.

Distinguish cases x = 0 and x = 1 for given (A,B; x , y , z) ∈ R.If x = 0, then A = hy ∧ B = hz ; if x = 1, then A = ghy ∧ B = gy .For relation R, apply OR-composition to:

R0 = {(A,B; y , z) : A = hy ∧ B = hz},R1 = {(A,B; y) : A = ghy ∧ B = g y}.

For relation R0, apply AND-composition to:

R0A = {(A; y) : A = hy}, R0B = {(B; z) : B = hz}.

For relation R1, apply EQ-composition to:

R1A = {(A; y) : A/g = hy}, R1B = {(B; y) : B = gy}.

R0A, R0B , R1A, R1B are instances of (slight variations of) Schnorr’s protocol.

Page 493: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

152/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Example 5.10Σ-protocol needed for relation R:

R = {(A,B; x , y , z) : A = g x hy ∧ B = gxy h(1−x)z ∧ x ∈ {0, 1}}.

Distinguish cases x = 0 and x = 1 for given (A,B; x , y , z) ∈ R.If x = 0, then A = hy ∧ B = hz ; if x = 1, then A = ghy ∧ B = gy .For relation R, apply OR-composition to:

R0 = {(A,B; y , z) : A = hy ∧ B = hz},R1 = {(A,B; y) : A = ghy ∧ B = g y}.

For relation R0, apply AND-composition to:

R0A = {(A; y) : A = hy}, R0B = {(B; z) : B = hz}.

For relation R1, apply EQ-composition to:

R1A = {(A; y) : A/g = hy}, R1B = {(B; y) : B = gy}.

R0A, R0B , R1A, R1B are instances of (slight variations of) Schnorr’s protocol.

Page 494: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

152/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Example 5.10Σ-protocol needed for relation R:

R = {(A,B; x , y , z) : A = g x hy ∧ B = gxy h(1−x)z ∧ x ∈ {0, 1}}.

Distinguish cases x = 0 and x = 1 for given (A,B; x , y , z) ∈ R.If x = 0, then A = hy ∧ B = hz ; if x = 1, then A = ghy ∧ B = gy .For relation R, apply OR-composition to:

R0 = {(A,B; y , z) : A = hy ∧ B = hz},R1 = {(A,B; y) : A = ghy ∧ B = g y}.

For relation R0, apply AND-composition to:

R0A = {(A; y) : A = hy}, R0B = {(B; z) : B = hz}.

For relation R1, apply EQ-composition to:

R1A = {(A; y) : A/g = hy}, R1B = {(B; y) : B = gy}.

R0A, R0B , R1A, R1B are instances of (slight variations of) Schnorr’s protocol.

Page 495: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

153/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Figure 5.10 (Σ-protocol for {(A,B; x ,y ,z):A=gx hy ∧ B=g xy h(1−x)z ∧ x∈{0, 1}})

Prover Verifier(case x = 0) (case x = 1)u0A, u0B ∈R Zn u1 ∈R Zna0A ← hu0A a1A ← hu1

a0B ← hu0B a1B ← gu1

c1, r1 ∈R Zn c0, r0A, r0B ∈R Zna1A ← hr1 (A/g)−c1 a0A ← hr0A A−c0

a1B ← g r1 B−c1 a0B ← hr0B B−c0−a0A, a0B , a1A, a1B−−−−−−−−−−−−−→

c0 ←n c − c1 c1 ←n c − c0 ←−−−−−−c−−−−−− c ∈R Zn

r0A ←n u0A + c0y r1 ←n u1 + c1yr0B ←n u0B + c0z −

c0, c1, r0A, r0B , r1−−−−−−−−−−−−→ c0 + c1

?=n chr0A ?= a0AAc0

hr0B ?= a0BBc0

hr1 ?= a1A(A/g)c1

g r1 ?= a1BBc1

Page 496: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

154/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Exercise

Exercise 5.3.1Prove that the protocol of Figure 5.10 is a Σ-protocol for relation R, as defined inExample 5.10.

Page 497: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

155/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Exercise 5.3.2 (logg h unknown to anyone)Design (and prove so!) Σ-protocol for {(B; x , y) : B = gx hy , ψ(x , y)}, where:

(a) ψ(x , y) ≡ true;(b) ψ(x , y) ≡ x = y;(c) ψ(x , y) ≡ αx + βy = γ for given α ∈ Z∗n , β, γ ∈ Zn;(d) ψ(x , y) ≡ x ∈ {0, 1};(e) ψ(x , y) ≡ x ∈ {0, 1, . . . , 2` − 1}, fixed integer `, 1 ≤ ` ≤ blog2 nc;(f) ψ(x , y) ≡ x 6= 0;(g) ψ(x , y) ≡ x 6= y;(h) ψ(x , y) ≡ αx + βy 6= γ for given α ∈ Z∗n , β, γ ∈ Zn;(i) ψ(x , y) ≡ xy = 1;(j) ψ(x , y) ≡ ∃χ∈Zn x = χ2;(k) ψ(x , y) ≡ x2 = y2.

Hints: (a) use Okamoto’s protocol; (b) eliminate variable y using x = y; (c) eliminate variable x using given equation; (d) similar to

OR-composition; (e) consider binary representation of x and use k instances of protocol of part (d); (f) use instance of Okamoto’s protocol by

isolating g in equation B = gx hy , cf. Eq. (5.1); (g) and (h) are generalizations of part (f); (i) isolate g in equation for By and use

EQ-composition with equation for B; (j) use AND-composition and EQ-composition; (k) eliminate one variable and use OR-composition.

Page 498: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

156/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Figure 5.11 (Alternative to Okamoto’s protocol?)

Prover Verifier(h = gx1

1 g x22 )

u1, u2 ∈R Zn

a1 ← gu11 ; a2 ← gu2

2 −−−−a1, a2−−−−−−−→

r1 ←n u1 + cx1 ←−−−−−−c−−−−−− c ∈R Zn

r2 ←n u2 + cx2 −−−−r1, r2−−−−−−−→ g r1

1 g r22

?= a1a2hc

Exercise 5.3.3See Figure 4.5. Is Figure 5.11 a Σ-protocol for {(h; x1, x2) : h = gx1

1 gx22 }?

Exercise 5.3.4 (logg h unknown to anyone)

Design Σ-protocols (and prove correctness) for relations:(a) {(A,B; x , y , z) : A = g x hy ,B = g1/x hz , x 6= 0};(b) {(A1,A2,B; x1, x2, y1, y2, z) : A1 = g x1 hy1 ,A2 = g x2 hy2 ,B = gx1x2 hz}.

Page 499: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

157/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

Exercise 5.3.5 (logg h unknown to anyone)

For Boolean variables v1, . . . , v`, consider instance of 3SAT problem, given byBoolean formula Φ consisting of m clauses, which each consist of 3 literals:

Φ = (l1,1 ∨ l1,2 ∨ l1,3) ∧ · · · ∧ (lm,1 ∨ lm,2 ∨ lm,3).

Each literal is of the form li,j = vk or li,j = v k = 1− vk (negation of vk ),1 ≤ k ≤ `. Construct a Σ-protocol (incl. correctness proof) for relation:

R ′3SAT = {(Φ,B1, . . . ,B`; x1, y1, . . . , x`, y`) : Φ(x1, . . . , x`),∀`k=1Bk = gxk hyk , xk ∈ {0, 1} }.

Exercise 5.3.6 (see previous exercise)Σ-protocol for R ′3SAT actually proves knowledge of witnesses to open thecommitments B1, . . . ,B`. Construct a more efficient way for proving that Φ issatisfiable, by considering instead relation:

R3SAT = {(Φ; x1, . . . , x`) : Φ(x1, . . . , x`)}.

Page 500: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

158/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Schnorr SignaturesCryptographic hash function H.

Fiat-Shamir heuristicTransform identification scheme into digital signature scheme by “computingchallenge as hash of prover’s announcement and message to be signed.”

For Schnorr’s protocol (Figure 4.3): put c ← H(a,M).

Example (Schnorr signature scheme)Key generation. Key pair (h; x) with private key x ∈R Zn, public key h← gx .Signature generation. On input of message M, private key x , set

u ∈R Zn; a← gu; c ← H(a,M); r ←n u + cx .

Signature on M is pair (c, r).Signature verification. On input of message M, pair (c, r), public key h, accept

(c, r) as signature on M iff c = H(g r h−c ,M).

Schnorr signatures secure in random oracle model: challenge c is unpredictable.

Page 501: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

158/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Schnorr SignaturesCryptographic hash function H.

Fiat-Shamir heuristicTransform identification scheme into digital signature scheme by “computingchallenge as hash of prover’s announcement and message to be signed.”

For Schnorr’s protocol (Figure 4.3): put c ← H(a,M).

Example (Schnorr signature scheme)Key generation. Key pair (h; x) with private key x ∈R Zn, public key h← gx .Signature generation. On input of message M, private key x , set

u ∈R Zn; a← gu; c ← H(a,M); r ←n u + cx .

Signature on M is pair (c, r).Signature verification. On input of message M, pair (c, r), public key h, accept

(c, r) as signature on M iff c = H(g r h−c ,M).

Schnorr signatures secure in random oracle model: challenge c is unpredictable.

Page 502: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

159/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Figure 5.12 (Parametrized insecure variant of Schnorr’s protocol)

Prover Verifieru ∈R Z∗n ; a← gu

−−−−−−a−−−−−−→

←−−−−−−c−−−−−− c ∈R Zn

r ←n (c − F (a))u + x −−−−−−r−−−−−−→ g r ?= ac−F (a)h

Exercise 5.4.1To see that Fiat-Shamir heuristic does not necessarily lead to secure signatureschemes, consider the protocol in Figure 5.12. Function F : 〈g〉 → Zn can be yourfavorite hash function; for simplicity assumed that F maps into Zn. Note thatfunction F (w) = 0 for w ∈ 〈g〉 yields the protocol of Exercise 5.1.1.

(i) Show that the protocol is complete, special sound, and honest-verifierzero-knowledge (for any function F : 〈g〉 → Zn).

(ii) What happens if we generate the challenge as c ← F (a) to obtain anoninteractive version of the protocol? That is, what happens if weinstantiate the random oracle with H = F .

Page 503: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

159/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Figure 5.12 (Parametrized insecure variant of Schnorr’s protocol)

Prover Verifieru ∈R Z∗n ; a← gu

−−−−−−a−−−−−−→

←−−−−−−c−−−−−− c ∈R Zn

r ←n (c − F (a))u + x −−−−−−r−−−−−−→ g r ?= ac−F (a)h

Exercise 5.4.1To see that Fiat-Shamir heuristic does not necessarily lead to secure signatureschemes, consider the protocol in Figure 5.12. Function F : 〈g〉 → Zn can be yourfavorite hash function; for simplicity assumed that F maps into Zn. Note thatfunction F (w) = 0 for w ∈ 〈g〉 yields the protocol of Exercise 5.1.1.

(i) Show that the protocol is complete, special sound, and honest-verifierzero-knowledge (for any function F : 〈g〉 → Zn).

(ii) What happens if we generate the challenge as c ← F (a) to obtain anoninteractive version of the protocol? That is, what happens if weinstantiate the random oracle with H = F .

Page 504: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

160/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Proofs of Validity

Fiat-Shamir heuristic can be applied to any Σ-protocol.Result: noninteractive Σ-proof.

Definition 5.11Let H be a cryptographic hash function. For any Σ-protocol as in Figure 5.1, a(noninteractive) Σ-proof for relation R is defined in terms of two algorithms.Proof generation. Given (v ; w) ∈ R, a Σ-proof is a pair (a; r), where

a = α(v ; w ; uP) and r = ρ(v ; w ; H(a; v); uP).Proof verification. For v ∈ V , (a; r) is accepted as Σ-proof if and only if

ϕ(v ; a; H(a; v); r) holds.

Σ-proof consists of announcement a and response r .

Typically, size of Σ-proof reduced by replacing announcement a by challenge c.

Page 505: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

161/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Example 5.12 (Proof of validity)Turn solution to Exercise 5.3.2(d) into Σ-proof.Let B = g x hy where x ∈ {0, 1}, y ∈ Zn is prover’s witness. Write x = 1− x .Proof generation. ux , rx , cx ∈R Zn; ax ← hux ; ax ← hrx (B/g x )−cx ;

c ← H(a0, a1,B); cx ←n c − cx ; rx ←n ux + cx y .Output (c0, c1, r0, r1) as proof.

Proof verification. On input of proof (c0, c1, r0, r1) for commitment B, acceptproof iff c0 + c1 =n H(hr0 B−c0 , hr1 (B/g)−c1 ,B).

B needed in input to H to fix “context”: otherwise proofs can be forged!

Exercise 5.4.2Show how to forge a Σ-proof (c0, c1, r0, r1) for a commitment B if proofverification is changed into c0 + c1 =n H(hr0 B−c0 , hr1 (B/g)−c1 ) by making asuitable choice for B. Hint: B can be set after c = H(a0, a1) is computed.

Page 506: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

162/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Anonymous Signatures: Group Signatures

P0P1

P2

...

Pm

Group manager: P0Group members: P1, . . . ,Pm

Any group member Pi can signon behalf of the group.Actual signer remainsanonymous.Anonymity is revocable: groupmanager can prove which groupmember produced a givensignature.

Group public key: hParty Pi ’s private key: xi

Page 507: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

162/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Anonymous Signatures: Group Signatures

P0P1

P2

...

Pm

Group manager: P0Group members: P1, . . . ,Pm

Any group member Pi can signon behalf of the group.Actual signer remainsanonymous.Anonymity is revocable: groupmanager can prove which groupmember produced a givensignature.

Group public key: hParty Pi ’s private key: xi

Page 508: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

162/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Anonymous Signatures: Group Signatures

P0P1

P2

...

Pm

Group manager: P0Group members: P1, . . . ,Pm

Any group member Pi can signon behalf of the group.Actual signer remainsanonymous.Anonymity is revocable: groupmanager can prove which groupmember produced a givensignature.

Group public key: hParty Pi ’s private key: xi

Page 509: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

162/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Anonymous Signatures: Group Signatures

P0P1

P2

...

Pm

Group manager: P0Group members: P1, . . . ,Pm

Any group member Pi can signon behalf of the group.Actual signer remainsanonymous.Anonymity is revocable: groupmanager can prove which groupmember produced a givensignature.

Group public key: hParty Pi ’s private key: xi

Page 510: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

163/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Definition 5.13 (Group signature scheme)Four components, involving group manager P0, group members P1, . . . ,Pm.Key generation. Protocol between P0,P1, . . . ,Pm for generating public key h for

the group, private key x0 for group manager P0 and private key xifor each group member Pi , 1 ≤ i ≤ m.

Signature generation. Algorithm that on input of message M, public key h of thegroup, private key xi of group member Pi , outputs signature S.

Signature verification. Algorithm that on input of message M, public key h of thegroup, signature S, tests if S is valid group signature on M w.r.t.public key h.

Signature opening. Algorithm that on input of message M, public key h of thegroup, valid signature S, private key x0 of group manager, outputsidentity of group member who generated S.

Page 511: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

163/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Definition 5.13 (Group signature scheme)Four components, involving group manager P0, group members P1, . . . ,Pm.Key generation. Protocol between P0,P1, . . . ,Pm for generating public key h for

the group, private key x0 for group manager P0 and private key xifor each group member Pi , 1 ≤ i ≤ m.

Signature generation. Algorithm that on input of message M, public key h of thegroup, private key xi of group member Pi , outputs signature S.

Signature verification. Algorithm that on input of message M, public key h of thegroup, signature S, tests if S is valid group signature on M w.r.t.public key h.

Signature opening. Algorithm that on input of message M, public key h of thegroup, valid signature S, private key x0 of group manager, outputsidentity of group member who generated S.

Page 512: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

163/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Definition 5.13 (Group signature scheme)Four components, involving group manager P0, group members P1, . . . ,Pm.Key generation. Protocol between P0,P1, . . . ,Pm for generating public key h for

the group, private key x0 for group manager P0 and private key xifor each group member Pi , 1 ≤ i ≤ m.

Signature generation. Algorithm that on input of message M, public key h of thegroup, private key xi of group member Pi , outputs signature S.

Signature verification. Algorithm that on input of message M, public key h of thegroup, signature S, tests if S is valid group signature on M w.r.t.public key h.

Signature opening. Algorithm that on input of message M, public key h of thegroup, valid signature S, private key x0 of group manager, outputsidentity of group member who generated S.

Page 513: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

163/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Definition 5.13 (Group signature scheme)Four components, involving group manager P0, group members P1, . . . ,Pm.Key generation. Protocol between P0,P1, . . . ,Pm for generating public key h for

the group, private key x0 for group manager P0 and private key xifor each group member Pi , 1 ≤ i ≤ m.

Signature generation. Algorithm that on input of message M, public key h of thegroup, private key xi of group member Pi , outputs signature S.

Signature verification. Algorithm that on input of message M, public key h of thegroup, signature S, tests if S is valid group signature on M w.r.t.public key h.

Signature opening. Algorithm that on input of message M, public key h of thegroup, valid signature S, private key x0 of group manager, outputsidentity of group member who generated S.

Page 514: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

163/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Definition 5.13 (Group signature scheme)Four components, involving group manager P0, group members P1, . . . ,Pm.Key generation. Protocol between P0,P1, . . . ,Pm for generating public key h for

the group, private key x0 for group manager P0 and private key xifor each group member Pi , 1 ≤ i ≤ m.

Signature generation. Algorithm that on input of message M, public key h of thegroup, private key xi of group member Pi , outputs signature S.

Signature verification. Algorithm that on input of message M, public key h of thegroup, signature S, tests if S is valid group signature on M w.r.t.public key h.

Signature opening. Algorithm that on input of message M, public key h of thegroup, valid signature S, private key x0 of group manager, outputsidentity of group member who generated S.

Page 515: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

164/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Simple Construction

Party Pi holds a discrete log key pair (hi ; xi ) with hi = g xi .

To sign a message, apply the Fiat-Shamir heuristic to Σ-protocol for provingknowledge of 1-out-of-m private keys x1, . . . , xm.

Exercise 5.4.3Construct Σ-protocol for relation

Rm = {(h1, . . . , hm; x) : ∃mi=1hi = g x}

by generalizing OR-composition, and show it is indeed a Σ-protocol.

For revocability, include an encryption of the actual key pair used.

Page 516: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

164/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Simple Construction

Party Pi holds a discrete log key pair (hi ; xi ) with hi = g xi .

To sign a message, apply the Fiat-Shamir heuristic to Σ-protocol for provingknowledge of 1-out-of-m private keys x1, . . . , xm.

Exercise 5.4.3Construct Σ-protocol for relation

Rm = {(h1, . . . , hm; x) : ∃mi=1hi = g x}

by generalizing OR-composition, and show it is indeed a Σ-protocol.

For revocability, include an encryption of the actual key pair used.

Page 517: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

164/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Simple Construction

Party Pi holds a discrete log key pair (hi ; xi ) with hi = g xi .

To sign a message, apply the Fiat-Shamir heuristic to Σ-protocol for provingknowledge of 1-out-of-m private keys x1, . . . , xm.

Exercise 5.4.3Construct Σ-protocol for relation

Rm = {(h1, . . . , hm; x) : ∃mi=1hi = g x}

by generalizing OR-composition, and show it is indeed a Σ-protocol.

For revocability, include an encryption of the actual key pair used.

Page 518: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

165/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Example (ElGamal-based group signatures)Pi includes ElGamal encryption of hi under P0’s public key in group signature.Key generation. Each Pi picks private key xi ∈R Zn. Public key of group is

(h0, h1, . . . , hm) with hi = gxi .Signature generation. Group member Pi computes (A,B) = (gu, hu

0 hi ) withu ∈R Zn, and Σ-proof for R ′m showing (A,B) encrypts one ofh1, . . . , hm for which Pi knows private key:

R ′m = {(A,B, h0, h1, . . . , hm; u, x) : A = gu,B = hu0 gx , ∃m

i=1hi = g x}.

Signature verification. Σ-proof contained in group signature is verified.Signature opening. Group manager P0 decrypts ElGamal encryption (A,B)

contained in group signature and proves correctness: P0 outputsd = Ax0 and Σ-proof showing logg h0 = logA d .Anyone may now compute B/d , which will match the public keyof the group member who produced the signature.

Page 519: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

165/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Example (ElGamal-based group signatures)Pi includes ElGamal encryption of hi under P0’s public key in group signature.Key generation. Each Pi picks private key xi ∈R Zn. Public key of group is

(h0, h1, . . . , hm) with hi = gxi .Signature generation. Group member Pi computes (A,B) = (gu, hu

0 hi ) withu ∈R Zn, and Σ-proof for R ′m showing (A,B) encrypts one ofh1, . . . , hm for which Pi knows private key:

R ′m = {(A,B, h0, h1, . . . , hm; u, x) : A = gu,B = hu0 gx , ∃m

i=1hi = g x}.

Signature verification. Σ-proof contained in group signature is verified.Signature opening. Group manager P0 decrypts ElGamal encryption (A,B)

contained in group signature and proves correctness: P0 outputsd = Ax0 and Σ-proof showing logg h0 = logA d .Anyone may now compute B/d , which will match the public keyof the group member who produced the signature.

Page 520: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

165/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Example (ElGamal-based group signatures)Pi includes ElGamal encryption of hi under P0’s public key in group signature.Key generation. Each Pi picks private key xi ∈R Zn. Public key of group is

(h0, h1, . . . , hm) with hi = gxi .Signature generation. Group member Pi computes (A,B) = (gu, hu

0 hi ) withu ∈R Zn, and Σ-proof for R ′m showing (A,B) encrypts one ofh1, . . . , hm for which Pi knows private key:

R ′m = {(A,B, h0, h1, . . . , hm; u, x) : A = gu,B = hu0 gx , ∃m

i=1hi = g x}.

Signature verification. Σ-proof contained in group signature is verified.Signature opening. Group manager P0 decrypts ElGamal encryption (A,B)

contained in group signature and proves correctness: P0 outputsd = Ax0 and Σ-proof showing logg h0 = logA d .Anyone may now compute B/d , which will match the public keyof the group member who produced the signature.

Page 521: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

165/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Example (ElGamal-based group signatures)Pi includes ElGamal encryption of hi under P0’s public key in group signature.Key generation. Each Pi picks private key xi ∈R Zn. Public key of group is

(h0, h1, . . . , hm) with hi = gxi .Signature generation. Group member Pi computes (A,B) = (gu, hu

0 hi ) withu ∈R Zn, and Σ-proof for R ′m showing (A,B) encrypts one ofh1, . . . , hm for which Pi knows private key:

R ′m = {(A,B, h0, h1, . . . , hm; u, x) : A = gu,B = hu0 gx , ∃m

i=1hi = g x}.

Signature verification. Σ-proof contained in group signature is verified.Signature opening. Group manager P0 decrypts ElGamal encryption (A,B)

contained in group signature and proves correctness: P0 outputsd = Ax0 and Σ-proof showing logg h0 = logA d .Anyone may now compute B/d , which will match the public keyof the group member who produced the signature.

Page 522: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

165/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Example (ElGamal-based group signatures)Pi includes ElGamal encryption of hi under P0’s public key in group signature.Key generation. Each Pi picks private key xi ∈R Zn. Public key of group is

(h0, h1, . . . , hm) with hi = gxi .Signature generation. Group member Pi computes (A,B) = (gu, hu

0 hi ) withu ∈R Zn, and Σ-proof for R ′m showing (A,B) encrypts one ofh1, . . . , hm for which Pi knows private key:

R ′m = {(A,B, h0, h1, . . . , hm; u, x) : A = gu,B = hu0 gx , ∃m

i=1hi = g x}.

Signature verification. Σ-proof contained in group signature is verified.Signature opening. Group manager P0 decrypts ElGamal encryption (A,B)

contained in group signature and proves correctness: P0 outputsd = Ax0 and Σ-proof showing logg h0 = logA d .Anyone may now compute B/d , which will match the public keyof the group member who produced the signature.

Page 523: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

166/205

5 Zero-Knowledge Proofs

5.1 Σ-Protocols5.2 Composition of Σ-Protocols5.3 Miscellaneous Constructions

5.4 Noninteractive Σ-Proofs

5.4.1 Digital Signatures from Σ-Protocols5.4.2 Proofs of Validity5.4.3 Group Signatures

Exercise

Exercise 5.4.4Give a Σ-protocol for relation R ′m and prove its correctness, in each of thefollowing cases: (i) m = 1, (ii) m = 2, and (iii) arbitrary m ≥ 1.

Page 524: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

167/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

5-Way Latch

1-out-of-5 threshold scheme

5 padlocks “in series”:

opening any 1 padlockwill open gate.

Page 525: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

168/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

Threshold cryptography (group-oriented cryptography)Techniques to distribute cryptographic schemes between multiple parties.

Examples:Safe-deposit box requires use of two keys, one kept by the owner of the boxand one kept by the bank.Control of nuclear weapons in Russia involves a 2-out-of-3 accessmechanism, where the three parties are the President, the Defense Ministerand the Defense Ministry (Time Magazine, May 4, 1992, p.13).Distributing power to issue digital signatures (e.g., issuance of rootcertificates in public key infrastructures).

Group signature ≈ 1-out-of-m threshold signature.

Distributing power to decrypt messages (key escrow, key recovery).Electronic voting: distributing power to decrypt votes.

Page 526: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

169/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Example 6.1 (See also Mathematica notebook d3.nb.)RSA cryptosystem, public exponent e = 3, modulus N = pq, gcd(e, φ(N)) = 1.Two persons split private key d = 1/e mod φ(N) into most-significant half andleast-significant half. How secure?Since 0 < d < φ(N), 3d = 1 + lφ(N) holds either for l = 1 or l = 2. Since p andq not divisible by 3, φ(N) 6≡ 2 (mod 3), hence l ≡ 2 (mod 3). Thus l = 2.Approximation d̂ =

⌊1+2(N−2

√N+1)

3

⌋for d = 1+2φ(N)

3 .

Approximation error: d̂ − d =⌊ 2

3 (p + q − 2√

N)⌋

. Since p + q > 2√

N (use(√p −√q)2 > 0):

0 ≤ d̂ − d <√

N,

as p and q of equal bit length.Thus, most-significant half of d matches most-significant half of d̂ .Person receiving least-significant half of d is able to construct all of d ’s bits!

Page 527: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

169/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Example 6.1 (See also Mathematica notebook d3.nb.)RSA cryptosystem, public exponent e = 3, modulus N = pq, gcd(e, φ(N)) = 1.Two persons split private key d = 1/e mod φ(N) into most-significant half andleast-significant half. How secure?Since 0 < d < φ(N), 3d = 1 + lφ(N) holds either for l = 1 or l = 2. Since p andq not divisible by 3, φ(N) 6≡ 2 (mod 3), hence l ≡ 2 (mod 3). Thus l = 2.Approximation d̂ =

⌊1+2(N−2

√N+1)

3

⌋for d = 1+2φ(N)

3 .

Approximation error: d̂ − d =⌊ 2

3 (p + q − 2√

N)⌋

. Since p + q > 2√

N (use(√p −√q)2 > 0):

0 ≤ d̂ − d <√

N,

as p and q of equal bit length.Thus, most-significant half of d matches most-significant half of d̂ .Person receiving least-significant half of d is able to construct all of d ’s bits!

Page 528: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

169/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Example 6.1 (See also Mathematica notebook d3.nb.)RSA cryptosystem, public exponent e = 3, modulus N = pq, gcd(e, φ(N)) = 1.Two persons split private key d = 1/e mod φ(N) into most-significant half andleast-significant half. How secure?Since 0 < d < φ(N), 3d = 1 + lφ(N) holds either for l = 1 or l = 2. Since p andq not divisible by 3, φ(N) 6≡ 2 (mod 3), hence l ≡ 2 (mod 3). Thus l = 2.Approximation d̂ =

⌊1+2(N−2

√N+1)

3

⌋for d = 1+2φ(N)

3 .

Approximation error: d̂ − d =⌊ 2

3 (p + q − 2√

N)⌋

. Since p + q > 2√

N (use(√p −√q)2 > 0):

0 ≤ d̂ − d <√

N,

as p and q of equal bit length.Thus, most-significant half of d matches most-significant half of d̂ .Person receiving least-significant half of d is able to construct all of d ’s bits!

Page 529: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

169/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Example 6.1 (See also Mathematica notebook d3.nb.)RSA cryptosystem, public exponent e = 3, modulus N = pq, gcd(e, φ(N)) = 1.Two persons split private key d = 1/e mod φ(N) into most-significant half andleast-significant half. How secure?Since 0 < d < φ(N), 3d = 1 + lφ(N) holds either for l = 1 or l = 2. Since p andq not divisible by 3, φ(N) 6≡ 2 (mod 3), hence l ≡ 2 (mod 3). Thus l = 2.Approximation d̂ =

⌊1+2(N−2

√N+1)

3

⌋for d = 1+2φ(N)

3 .

Approximation error: d̂ − d =⌊ 2

3 (p + q − 2√

N)⌋

. Since p + q > 2√

N (use(√p −√q)2 > 0):

0 ≤ d̂ − d <√

N,

as p and q of equal bit length.Thus, most-significant half of d matches most-significant half of d̂ .Person receiving least-significant half of d is able to construct all of d ’s bits!

Page 530: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

169/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Example 6.1 (See also Mathematica notebook d3.nb.)RSA cryptosystem, public exponent e = 3, modulus N = pq, gcd(e, φ(N)) = 1.Two persons split private key d = 1/e mod φ(N) into most-significant half andleast-significant half. How secure?Since 0 < d < φ(N), 3d = 1 + lφ(N) holds either for l = 1 or l = 2. Since p andq not divisible by 3, φ(N) 6≡ 2 (mod 3), hence l ≡ 2 (mod 3). Thus l = 2.Approximation d̂ =

⌊1+2(N−2

√N+1)

3

⌋for d = 1+2φ(N)

3 .

Approximation error: d̂ − d =⌊ 2

3 (p + q − 2√

N)⌋

. Since p + q > 2√

N (use(√p −√q)2 > 0):

0 ≤ d̂ − d <√

N,

as p and q of equal bit length.Thus, most-significant half of d matches most-significant half of d̂ .Person receiving least-significant half of d is able to construct all of d ’s bits!

Page 531: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

169/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Example 6.1 (See also Mathematica notebook d3.nb.)RSA cryptosystem, public exponent e = 3, modulus N = pq, gcd(e, φ(N)) = 1.Two persons split private key d = 1/e mod φ(N) into most-significant half andleast-significant half. How secure?Since 0 < d < φ(N), 3d = 1 + lφ(N) holds either for l = 1 or l = 2. Since p andq not divisible by 3, φ(N) 6≡ 2 (mod 3), hence l ≡ 2 (mod 3). Thus l = 2.Approximation d̂ =

⌊1+2(N−2

√N+1)

3

⌋for d = 1+2φ(N)

3 .

Approximation error: d̂ − d =⌊ 2

3 (p + q − 2√

N)⌋

. Since p + q > 2√

N (use(√p −√q)2 > 0):

0 ≤ d̂ − d <√

N,

as p and q of equal bit length.Thus, most-significant half of d matches most-significant half of d̂ .Person receiving least-significant half of d is able to construct all of d ’s bits!

Page 532: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

170/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Splitting the Bit

Breaking bit string into pieces not a secure way to share a secret.And, how do we “split the bit”?

Critical step: use additional randomness.

Splitting secret bit s ∈ {0, 1} into shares s1, s2 ∈ {0, 1}To split s into s1, s2: pick u ∈R {0, 1}, set s1 = s ⊕ u and s2 = u.To recover s from s1, s2: compute s1 ⊕ s2 = s ⊕ u ⊕ u = s.

Neither s1 nor s2 on its own reveals any information on s.

Exercise 6.1.1Suppose u is uniformly distributed. Show that s1 and s2 are also uniformlydistributed, irrespective of the distribution of s.

Page 533: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

170/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Splitting the Bit

Breaking bit string into pieces not a secure way to share a secret.And, how do we “split the bit”?

Critical step: use additional randomness.

Splitting secret bit s ∈ {0, 1} into shares s1, s2 ∈ {0, 1}To split s into s1, s2: pick u ∈R {0, 1}, set s1 = s ⊕ u and s2 = u.To recover s from s1, s2: compute s1 ⊕ s2 = s ⊕ u ⊕ u = s.

Neither s1 nor s2 on its own reveals any information on s.

Exercise 6.1.1Suppose u is uniformly distributed. Show that s1 and s2 are also uniformlydistributed, irrespective of the distribution of s.

Page 534: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

170/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Splitting the Bit

Breaking bit string into pieces not a secure way to share a secret.And, how do we “split the bit”?

Critical step: use additional randomness.

Splitting secret bit s ∈ {0, 1} into shares s1, s2 ∈ {0, 1}To split s into s1, s2: pick u ∈R {0, 1}, set s1 = s ⊕ u and s2 = u.To recover s from s1, s2: compute s1 ⊕ s2 = s ⊕ u ⊕ u = s.

Neither s1 nor s2 on its own reveals any information on s.

Exercise 6.1.1Suppose u is uniformly distributed. Show that s1 and s2 are also uniformlydistributed, irrespective of the distribution of s.

Page 535: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

170/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Splitting the Bit

Breaking bit string into pieces not a secure way to share a secret.And, how do we “split the bit”?

Critical step: use additional randomness.

Splitting secret bit s ∈ {0, 1} into shares s1, s2 ∈ {0, 1}To split s into s1, s2: pick u ∈R {0, 1}, set s1 = s ⊕ u and s2 = u.To recover s from s1, s2: compute s1 ⊕ s2 = s ⊕ u ⊕ u = s.

Neither s1 nor s2 on its own reveals any information on s.

Exercise 6.1.1Suppose u is uniformly distributed. Show that s1 and s2 are also uniformlydistributed, irrespective of the distribution of s.

Page 536: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

170/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Splitting the Bit

Breaking bit string into pieces not a secure way to share a secret.And, how do we “split the bit”?

Critical step: use additional randomness.

Splitting secret bit s ∈ {0, 1} into shares s1, s2 ∈ {0, 1}To split s into s1, s2: pick u ∈R {0, 1}, set s1 = s ⊕ u and s2 = u.To recover s from s1, s2: compute s1 ⊕ s2 = s ⊕ u ⊕ u = s.

Neither s1 nor s2 on its own reveals any information on s.

Exercise 6.1.1Suppose u is uniformly distributed. Show that s1 and s2 are also uniformlydistributed, irrespective of the distribution of s.

Page 537: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

170/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Splitting the Bit

Breaking bit string into pieces not a secure way to share a secret.And, how do we “split the bit”?

Critical step: use additional randomness.

Splitting secret bit s ∈ {0, 1} into shares s1, s2 ∈ {0, 1}To split s into s1, s2: pick u ∈R {0, 1}, set s1 = s ⊕ u and s2 = u.To recover s from s1, s2: compute s1 ⊕ s2 = s ⊕ u ⊕ u = s.

Neither s1 nor s2 on its own reveals any information on s.

Exercise 6.1.1Suppose u is uniformly distributed. Show that s1 and s2 are also uniformlydistributed, irrespective of the distribution of s.

Page 538: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

170/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Splitting the Bit

Breaking bit string into pieces not a secure way to share a secret.And, how do we “split the bit”?

Critical step: use additional randomness.

Splitting secret bit s ∈ {0, 1} into shares s1, s2 ∈ {0, 1}To split s into s1, s2: pick u ∈R {0, 1}, set s1 = s ⊕ u and s2 = u.To recover s from s1, s2: compute s1 ⊕ s2 = s ⊕ u ⊕ u = s.

Neither s1 nor s2 on its own reveals any information on s.

Exercise 6.1.1Suppose u is uniformly distributed. Show that s1 and s2 are also uniformlydistributed, irrespective of the distribution of s.

Page 539: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

171/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Visual Secret Sharing (Naor & Shamir, Eurocrypt 1994)

Page 540: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

171/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Visual Secret Sharing (Naor & Shamir, Eurocrypt 1994)

Page 541: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

171/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Visual Secret Sharing (Naor & Shamir, Eurocrypt 1994)

Page 542: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

171/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Visual Secret Sharing (Naor & Shamir, Eurocrypt 1994)

Page 543: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

171/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Visual Secret Sharing (Naor & Shamir, Eurocrypt 1994)

Page 544: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

172/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Definition 6.2 (Secret sharing scheme)Two protocols, involving dealer D and participants P1, . . . ,Pm.

Distribution. Protocol in which dealer D shares secret s such that eachparticipant Pi obtains share si , 1 ≤ i ≤ m.

Reconstruction. Protocol in which secret s is recovered by pooling shares si ,i ∈ Q, of any qualified set of participants Q ⊆ {P1, . . . ,Pm}.

Security requirements for secret sharing scheme:(i) any qualified set of participants can determine s by pooling their shares,(ii) any nonqualified set of participants cannot find any information on s when

pooling their shares.

Page 545: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

172/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Definition 6.2 (Secret sharing scheme)Two protocols, involving dealer D and participants P1, . . . ,Pm.

Distribution. Protocol in which dealer D shares secret s such that eachparticipant Pi obtains share si , 1 ≤ i ≤ m.

Reconstruction. Protocol in which secret s is recovered by pooling shares si ,i ∈ Q, of any qualified set of participants Q ⊆ {P1, . . . ,Pm}.

Security requirements for secret sharing scheme:(i) any qualified set of participants can determine s by pooling their shares,(ii) any nonqualified set of participants cannot find any information on s when

pooling their shares.

Page 546: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

173/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Polynomials over Finite Field Zp

straight line (mod 97) parabola (mod 97)

Mathematically, same behavior as polynomials over R:Polynomial of degree d > 0 has at most d roots.Polynomial of degree d is uniquely determined by d + 1 points.

Page 547: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

173/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Polynomials over Finite Field Zp

straight line (mod 97) parabola (mod 97)

Mathematically, same behavior as polynomials over R:Polynomial of degree d > 0 has at most d roots.Polynomial of degree d is uniquely determined by d + 1 points.

Page 548: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

174/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Threshold Secret Sharing Scheme

Participants P1, . . . ,Pm.Threshold t, 0 ≤ t < m.

(t,m)-threshold access structure:

Γ = {Q ⊆ {P1, . . . ,Pm} : |Q| > t}.

Also referred to as a t+1-out-of-m (threshold) access structure.

Perfect (t,m)-threshold secret sharing scheme:Any group of t + 1 participants is able to recover the secret.No group of t or less participants can do so:

t or less participants no information on the secret.

Page 549: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

175/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Shamir’s (t,m)-threshold schemeFor secret s ∈ Zp .

Distribution. Dealer picks random polynomial a(X) ∈R Zp[X ] of degree ≤ tsatisfying a(0) = s, and sends share si = a(i) to participant Pi , fori = 1, . . . ,m.

Reconstruction. Any set Q of t + 1 participants may recover secret s from theirshares by Lagrange interpolation:a

s =∑i∈Q

siλQ,i , with λQ,i =∏

j∈Q\{i}

jj − i .

aNote: i ∈ Q shorthand for Pi ∈ Q.

Example ((1, 5)-threshold scheme)Distribution. Let a(X) = s + uX with u ∈R Zp . Send share si = a(i) to Pi .

Reconstruction. Any pair Pi ,Pj recovers secret as s = (isj − jsi )/(i − j).

Page 550: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

175/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.1.1 Shamir Threshold Scheme

Shamir’s (t,m)-threshold schemeFor secret s ∈ Zp .

Distribution. Dealer picks random polynomial a(X) ∈R Zp[X ] of degree ≤ tsatisfying a(0) = s, and sends share si = a(i) to participant Pi , fori = 1, . . . ,m.

Reconstruction. Any set Q of t + 1 participants may recover secret s from theirshares by Lagrange interpolation:a

s =∑i∈Q

siλQ,i , with λQ,i =∏

j∈Q\{i}

jj − i .

aNote: i ∈ Q shorthand for Pi ∈ Q.

Example ((1, 5)-threshold scheme)Distribution. Let a(X) = s + uX with u ∈R Zp . Send share si = a(i) to Pi .

Reconstruction. Any pair Pi ,Pj recovers secret as s = (isj − jsi )/(i − j).

Page 551: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

176/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Secret sharing schemes resists passive attacks only.

Verifiable secret sharing (VSS)VSS scheme resists (combinations of) two types of active attacks:

Dealer sending incorrect shares to some/all participants during distribution.Participants submitting incorrect shares during reconstruction.

Shamir’s scheme is not a VSS scheme:During distribution, no guarantee shares si correspond to single polynomiala(X) of degree ≤ t.During reconstruction, no guarantee share si provided by Pi is correct.

Nothing prevents Pi from using s̃i ∈R Zp instead; reconstructed value s̃ will beuseless, and if only Pi is cheating, Pi finds value of s using the other t correctshares.

Page 552: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

176/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Secret sharing schemes resists passive attacks only.

Verifiable secret sharing (VSS)VSS scheme resists (combinations of) two types of active attacks:

Dealer sending incorrect shares to some/all participants during distribution.Participants submitting incorrect shares during reconstruction.

Shamir’s scheme is not a VSS scheme:During distribution, no guarantee shares si correspond to single polynomiala(X) of degree ≤ t.During reconstruction, no guarantee share si provided by Pi is correct.

Nothing prevents Pi from using s̃i ∈R Zp instead; reconstructed value s̃ will beuseless, and if only Pi is cheating, Pi finds value of s using the other t correctshares.

Page 553: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

177/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉.

Feldman’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomial (u0 = s):

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Zn.

Dealer sends shares si = a(i) to Pi in private, for i = 1, . . . ,m,and broadcasts commitments Bj = guj , 0 ≤ j ≤ t. Upon receipt ofshare si , Pi checks:

g si =t∏

j=0

B i jj . (6.1)

Reconstruction. Share si contributed by Pi checked using Eq. (6.1). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Commitments Bj define unique polynomial with coefficients logg Bj .

Page 554: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

177/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉.

Feldman’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomial (u0 = s):

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Zn.

Dealer sends shares si = a(i) to Pi in private, for i = 1, . . . ,m,and broadcasts commitments Bj = guj , 0 ≤ j ≤ t. Upon receipt ofshare si , Pi checks:

g si =t∏

j=0

B i jj . (6.1)

Reconstruction. Share si contributed by Pi checked using Eq. (6.1). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Commitments Bj define unique polynomial with coefficients logg Bj .

Page 555: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

177/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉.

Feldman’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomial (u0 = s):

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Zn.

Dealer sends shares si = a(i) to Pi in private, for i = 1, . . . ,m,and broadcasts commitments Bj = guj , 0 ≤ j ≤ t. Upon receipt ofshare si , Pi checks:

g si =t∏

j=0

B i jj . (6.1)

Reconstruction. Share si contributed by Pi checked using Eq. (6.1). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Commitments Bj define unique polynomial with coefficients logg Bj .

Page 556: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

177/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉.

Feldman’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomial (u0 = s):

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Zn.

Dealer sends shares si = a(i) to Pi in private, for i = 1, . . . ,m,and broadcasts commitments Bj = guj , 0 ≤ j ≤ t. Upon receipt ofshare si , Pi checks:

g si =t∏

j=0

B i jj . (6.1)

Reconstruction. Share si contributed by Pi checked using Eq. (6.1). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Commitments Bj define unique polynomial with coefficients logg Bj .

Page 557: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

177/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉.

Feldman’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomial (u0 = s):

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Zn.

Dealer sends shares si = a(i) to Pi in private, for i = 1, . . . ,m,and broadcasts commitments Bj = guj , 0 ≤ j ≤ t. Upon receipt ofshare si , Pi checks:

g si =t∏

j=0

B i jj . (6.1)

Reconstruction. Share si contributed by Pi checked using Eq. (6.1). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Commitments Bj define unique polynomial with coefficients logg Bj .

Page 558: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

177/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉.

Feldman’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomial (u0 = s):

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Zn.

Dealer sends shares si = a(i) to Pi in private, for i = 1, . . . ,m,and broadcasts commitments Bj = guj , 0 ≤ j ≤ t. Upon receipt ofshare si , Pi checks:

g si =t∏

j=0

B i jj . (6.1)

Reconstruction. Share si contributed by Pi checked using Eq. (6.1). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Commitments Bj define unique polynomial with coefficients logg Bj .

Page 559: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

177/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉.

Feldman’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomial (u0 = s):

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Zn.

Dealer sends shares si = a(i) to Pi in private, for i = 1, . . . ,m,and broadcasts commitments Bj = guj , 0 ≤ j ≤ t. Upon receipt ofshare si , Pi checks:

g si =t∏

j=0

B i jj . (6.1)

Reconstruction. Share si contributed by Pi checked using Eq. (6.1). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Commitments Bj define unique polynomial with coefficients logg Bj .

Page 560: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

177/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉.

Feldman’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomial (u0 = s):

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Zn.

Dealer sends shares si = a(i) to Pi in private, for i = 1, . . . ,m,and broadcasts commitments Bj = guj , 0 ≤ j ≤ t. Upon receipt ofshare si , Pi checks:

g si =t∏

j=0

B i jj . (6.1)

Reconstruction. Share si contributed by Pi checked using Eq. (6.1). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Commitments Bj define unique polynomial with coefficients logg Bj .

Page 561: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

178/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Security of Feldman VSS

No more than t cheating participants, t < m/2.1. Dealer and participants bound to unique polynomial by Eq. (6.1).2. Secret s hidden even given B0 = g s ,B1 = gu1 , . . . ,Bt = gut .Reduction proof: given instance of DL problem h successful collusion ofparticipants P∗1 , . . . ,P∗t would compute logg h. As follows.Dealer sets B0 = h, s1, . . . , st ∈R Zn, and Bj for j = 1, . . . , t such that Eq. (6.1)holds for P∗1 , . . . ,P∗t , without knowing s = logg h:

Bj =t∏

k=1

(g sk /h)γj,k , (6.2)

where

(γj,k ) =

1 1 · · · 12 22 · · · 2t

......

...t t2 · · · tt

−1

Shares for Pt+1, . . . ,Pm are irrelevant.

Page 562: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

178/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Security of Feldman VSS

No more than t cheating participants, t < m/2.1. Dealer and participants bound to unique polynomial by Eq. (6.1).2. Secret s hidden even given B0 = g s ,B1 = gu1 , . . . ,Bt = gut .Reduction proof: given instance of DL problem h successful collusion ofparticipants P∗1 , . . . ,P∗t would compute logg h. As follows.Dealer sets B0 = h, s1, . . . , st ∈R Zn, and Bj for j = 1, . . . , t such that Eq. (6.1)holds for P∗1 , . . . ,P∗t , without knowing s = logg h:

Bj =t∏

k=1

(g sk /h)γj,k , (6.2)

where

(γj,k ) =

1 1 · · · 12 22 · · · 2t

......

...t t2 · · · tt

−1

Shares for Pt+1, . . . ,Pm are irrelevant.

Page 563: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

178/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Security of Feldman VSS

No more than t cheating participants, t < m/2.1. Dealer and participants bound to unique polynomial by Eq. (6.1).2. Secret s hidden even given B0 = g s ,B1 = gu1 , . . . ,Bt = gut .Reduction proof: given instance of DL problem h successful collusion ofparticipants P∗1 , . . . ,P∗t would compute logg h. As follows.Dealer sets B0 = h, s1, . . . , st ∈R Zn, and Bj for j = 1, . . . , t such that Eq. (6.1)holds for P∗1 , . . . ,P∗t , without knowing s = logg h:

Bj =t∏

k=1

(g sk /h)γj,k , (6.2)

where

(γj,k ) =

1 1 · · · 12 22 · · · 2t

......

...t t2 · · · tt

−1

Shares for Pt+1, . . . ,Pm are irrelevant.

Page 564: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

178/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Security of Feldman VSS

No more than t cheating participants, t < m/2.1. Dealer and participants bound to unique polynomial by Eq. (6.1).2. Secret s hidden even given B0 = g s ,B1 = gu1 , . . . ,Bt = gut .Reduction proof: given instance of DL problem h successful collusion ofparticipants P∗1 , . . . ,P∗t would compute logg h. As follows.Dealer sets B0 = h, s1, . . . , st ∈R Zn, and Bj for j = 1, . . . , t such that Eq. (6.1)holds for P∗1 , . . . ,P∗t , without knowing s = logg h:

Bj =t∏

k=1

(g sk /h)γj,k , (6.2)

where

(γj,k ) =

1 1 · · · 12 22 · · · 2t

......

...t t2 · · · tt

−1

Shares for Pt+1, . . . ,Pm are irrelevant.

Page 565: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

178/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Security of Feldman VSS

No more than t cheating participants, t < m/2.1. Dealer and participants bound to unique polynomial by Eq. (6.1).2. Secret s hidden even given B0 = g s ,B1 = gu1 , . . . ,Bt = gut .Reduction proof: given instance of DL problem h successful collusion ofparticipants P∗1 , . . . ,P∗t would compute logg h. As follows.Dealer sets B0 = h, s1, . . . , st ∈R Zn, and Bj for j = 1, . . . , t such that Eq. (6.1)holds for P∗1 , . . . ,P∗t , without knowing s = logg h:

Bj =t∏

k=1

(g sk /h)γj,k , (6.2)

where

(γj,k ) =

1 1 · · · 12 22 · · · 2t

......

...t t2 · · · tt

−1

Shares for Pt+1, . . . ,Pm are irrelevant.

Page 566: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

179/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Simulation View

D P∗1 , . . . ,P∗t

s

Real protocol runs between dealer D and participants P∗1 , . . . ,P∗t ,D using secret s

Page 567: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

179/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Simulation View

S P∗1 , . . . ,P∗t

Simulated protocol runs between simulator S and participants P∗1 , . . . ,P∗t ,S not knowing s = logg B0

Page 568: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

179/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Simulation View

D P∗1 , . . . ,P∗t

s

S P∗1 , . . . ,P∗t

P∗1 , . . . ,P∗t cannot distinguish between protocol with D and protocol with S⇒ protocol is “zero-knowledge” w.r.t. secret s

Page 569: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

180/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Exercises

Exercise 6.2.1Verify that Eq. (6.1) holds for 1 ≤ i ≤ t if B0 = h and Bj , 1 ≤ j ≤ t, are definedby (6.2).

Exercise 6.2.2The special case of an m-out-of-m threshold scheme for secrets s ∈ Zn can besolved simply by setting the shares as follows: choose si ∈R Zn for i = 2, . . . ,mand set s1 = (s −

∑mi=2 si ) mod n. Extend this basic secret sharing scheme to a

Feldman VSS scheme, and provide a security analysis of the resulting VSS scheme.

Note: m-out-of-m threshold scheme same as an (m − 1,m)-threshold scheme.

Page 570: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

181/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉, h ∈R 〈g〉 such that logg h not known.

Pedersen’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomials a(X), b(X) with u0 = s:

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Znb(X) = v0 + v1X + · · ·+ vtX t , v0, . . . , vt ∈R Zn

Dealer sends shares si = (a(i), b(i)) to Pi in private, andbroadcasts commitments Cj = guj hvj , 0 ≤ j ≤ t.Upon receipt of si = (si1, si2), Pi checks:

g si1 hsi2 =t∏

j=0

C i jj . (6.3)

Reconstruction. Share si contributed by Pi checked using Eq. (6.3). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Page 571: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

181/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉, h ∈R 〈g〉 such that logg h not known.

Pedersen’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomials a(X), b(X) with u0 = s:

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Znb(X) = v0 + v1X + · · ·+ vtX t , v0, . . . , vt ∈R Zn

Dealer sends shares si = (a(i), b(i)) to Pi in private, andbroadcasts commitments Cj = guj hvj , 0 ≤ j ≤ t.Upon receipt of si = (si1, si2), Pi checks:

g si1 hsi2 =t∏

j=0

C i jj . (6.3)

Reconstruction. Share si contributed by Pi checked using Eq. (6.3). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Page 572: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

181/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉, h ∈R 〈g〉 such that logg h not known.

Pedersen’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomials a(X), b(X) with u0 = s:

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Znb(X) = v0 + v1X + · · ·+ vtX t , v0, . . . , vt ∈R Zn

Dealer sends shares si = (a(i), b(i)) to Pi in private, andbroadcasts commitments Cj = guj hvj , 0 ≤ j ≤ t.Upon receipt of si = (si1, si2), Pi checks:

g si1 hsi2 =t∏

j=0

C i jj . (6.3)

Reconstruction. Share si contributed by Pi checked using Eq. (6.3). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Page 573: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

181/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Discrete log setting 〈g〉, h ∈R 〈g〉 such that logg h not known.

Pedersen’s (t,m)-threshold VSS schemeFor secret s ∈ Zn.

Distribution. Dealer chooses random polynomials a(X), b(X) with u0 = s:

a(X) = u0 + u1X + · · ·+ utX t , u1, . . . , ut ∈R Znb(X) = v0 + v1X + · · ·+ vtX t , v0, . . . , vt ∈R Zn

Dealer sends shares si = (a(i), b(i)) to Pi in private, andbroadcasts commitments Cj = guj hvj , 0 ≤ j ≤ t.Upon receipt of si = (si1, si2), Pi checks:

g si1 hsi2 =t∏

j=0

C i jj . (6.3)

Reconstruction. Share si contributed by Pi checked using Eq. (6.3). Secrets = a(0) recovered as in Shamir’s scheme from t + 1 valid shares.

Page 574: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

182/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Security of Pedersen VSS

1. Dealer and participants bound to unique polynomial by Eq. (6.3).Under DL assumption!

Cf. Pedersen commitments are computationally binding.

2. Secret s hidden information-theoretically,even given commitments C0,C1, . . . ,Ct .

Cf. Pedersen commitments are information-theoretically hiding.

Exercise 6.2.3See Exercise 6.2.2. This time extend the basic m-out-of-m scheme, where sharessi1 ∈R Zn for i = 2, . . . ,m and s11 = (s −

∑mi=2 si1) mod n, to a Pedersen VSS

scheme, and provide a security analysis of the resulting VSS scheme.

Page 575: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

182/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Security of Pedersen VSS

1. Dealer and participants bound to unique polynomial by Eq. (6.3).Under DL assumption!

Cf. Pedersen commitments are computationally binding.

2. Secret s hidden information-theoretically,even given commitments C0,C1, . . . ,Ct .

Cf. Pedersen commitments are information-theoretically hiding.

Exercise 6.2.3See Exercise 6.2.2. This time extend the basic m-out-of-m scheme, where sharessi1 ∈R Zn for i = 2, . . . ,m and s11 = (s −

∑mi=2 si1) mod n, to a Pedersen VSS

scheme, and provide a security analysis of the resulting VSS scheme.

Page 576: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

182/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems

6.2.1 Feldman VSS6.2.2 Pedersen VSS

Security of Pedersen VSS

1. Dealer and participants bound to unique polynomial by Eq. (6.3).Under DL assumption!

Cf. Pedersen commitments are computationally binding.

2. Secret s hidden information-theoretically,even given commitments C0,C1, . . . ,Ct .

Cf. Pedersen commitments are information-theoretically hiding.

Exercise 6.2.3See Exercise 6.2.2. This time extend the basic m-out-of-m scheme, where sharessi1 ∈R Zn for i = 2, . . . ,m and s11 = (s −

∑mi=2 si1) mod n, to a Pedersen VSS

scheme, and provide a security analysis of the resulting VSS scheme.

Page 577: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

183/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.3.1 Threshold ElGamal Cryptosystem

Definition 6.3 ((t,m)-threshold cryptosystem)Three components involving parties P1, . . . ,Pm.Distributed key generation. Protocol between P1, . . . ,Pm for generating public

key h such that Pi obtains private share xi (of private key xcorresponding to h) and public verification key hi , 1 ≤ i ≤ m.The protocol depends on t.

Encryption. Algorithm that on input of plaintext M, public key h, outputsciphertext C of M under public key h.

Threshold decryption. Protocol between t + 1 parties Pi0 , . . . ,Pit that on input ofciphertext C , private shares xi0 , . . . , xit , verification keyshi0 , . . . , hit , outputs plaintext M.

Exercise 6.3.1See Section 2.1.4. Assuming honest behavior of parties P1, . . . ,Pm, design anm-out-of-m threshold ElGamal cryptosystem with public key h =

∏mi=1 hi , where

xi ∈ Zn is the private share of Pi and hi = g xi is the corresponding verification key,1 ≤ i ≤ m. Discuss its security against passive attacks.

Page 578: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

184/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.3.1 Threshold ElGamal Cryptosystem

Distributed key generation protocol1 Each Pi picks random polynomial ai (X) ∈ Zn[X ] of degree ≤ t, and

broadcasts commitment to g si , where si = ai (0).

2 Each Pi opens its commitment to g si . Public key h is set as h = g∑m

i=1si .

3 Each Pi , 1 ≤ i ≤ m, runs instance of Feldman’s VSS scheme, using si ∈ Znas secret value. Pi plays the role of dealer, and P1, . . . ,Pm play the role ofparticipants. (Hence, Pi plays a double role.)

4 Let sij denote the share of si as sent by party Pi to party Pj , for 1 ≤ i , j ≤ m.Each party Pi sums all its received shares sji to obtain its share xi =

∑mj=1 sji

of the private key x . The verification key of party Pi is defined as hi = gxi .

Note that sji = aj (i). Since a(X) =∑m

i=1 ai (X), it follows that xi = a(i).

Nobody knows x !

Page 579: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

184/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.3.1 Threshold ElGamal Cryptosystem

Distributed key generation protocol1 Each Pi picks random polynomial ai (X) ∈ Zn[X ] of degree ≤ t, and

broadcasts commitment to g si , where si = ai (0).

2 Each Pi opens its commitment to g si . Public key h is set as h = g∑m

i=1si .

3 Each Pi , 1 ≤ i ≤ m, runs instance of Feldman’s VSS scheme, using si ∈ Znas secret value. Pi plays the role of dealer, and P1, . . . ,Pm play the role ofparticipants. (Hence, Pi plays a double role.)

4 Let sij denote the share of si as sent by party Pi to party Pj , for 1 ≤ i , j ≤ m.Each party Pi sums all its received shares sji to obtain its share xi =

∑mj=1 sji

of the private key x . The verification key of party Pi is defined as hi = gxi .

Note that sji = aj (i). Since a(X) =∑m

i=1 ai (X), it follows that xi = a(i).

Nobody knows x !

Page 580: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

185/205

6 Threshold Cryptography

6.1 Secret Sharing6.2 Verifiable Secret Sharing

6.3 Threshold Cryptosystems6.3.1 Threshold ElGamal Cryptosystem

Threshold decryption protocolLet C = (A,B) be an ElGamal ciphertext for public key h.

1 Each Pi takes A as input and uses its share xi to produce a value di = Axi

along with a Σ-proof showing that logg hi = logA di .2 Let Q be a set of t + 1 parties who produced correct di values. Then

plaintext M can be recovered by evaluating:

B/∏i∈Q

dλQ,ii = B/Ax = M,

where λQ,i =∏

j∈Q\{i}j

j−i denote Lagrange coefficients as in Shamir’sscheme.

Page 581: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

186/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

YES/NO referendum is secure multiparty computation for function

f (x1, . . . , xm) = x1 + · · ·+ xm, for votes x1, . . . , xm ∈ {0, 1}.

Inputs x1, . . . , xm are private.Output x1 + · · ·+ xm is public.

Security requirements:Eligibility: only eligible voters can cast vote, at most one vote.Privacy: assured against any reasonably sized coalition of parties (notincluding the voter herself).Universal Verifiability: anyone can check that the election is fair, i.e.,published final tally is computed fairly from ballots that were correctly cast.Robustness: faulty behavior (benign or malicious) of any reasonably sizedcoalition of participants can be tolerated (e.g., cheating voter can be detectedand discarded).

Page 582: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

186/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

YES/NO referendum is secure multiparty computation for function

f (x1, . . . , xm) = x1 + · · ·+ xm, for votes x1, . . . , xm ∈ {0, 1}.

Inputs x1, . . . , xm are private.Output x1 + · · ·+ xm is public.

Security requirements:Eligibility: only eligible voters can cast vote, at most one vote.Privacy: assured against any reasonably sized coalition of parties (notincluding the voter herself).Universal Verifiability: anyone can check that the election is fair, i.e.,published final tally is computed fairly from ballots that were correctly cast.Robustness: faulty behavior (benign or malicious) of any reasonably sizedcoalition of participants can be tolerated (e.g., cheating voter can be detectedand discarded).

Page 583: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

187/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Threshold Homomorphic ElGamal Cryptosystem

Threshold ElGamal cryptosystem with Zn as plaintext space instead of 〈g〉.

Homomorphic ElGamal encryptionFor plaintext M ∈ Zn and public key h, ciphertext is defined as

(A,B) = (gu, hugM), u ∈R Zn.

In other words: M ∈ Zn is encoded as gM ∈ 〈g〉.

(Additive) homomorphic property

Product of encryptions (A,B), (A′,B′) of plaintexts M,M′, respectively, isencryption of sum of plaintexts M + M′:

(A,B) ∗ (A′,B′) = (AA′,BB′) = (gu+u′ , hu+u′gM+M′).

Page 584: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

188/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Electronic voting schemeKey generation. Talliers T1, . . . , Tm run DKG protocol of (t,m)-threshold ElGamal

cryptosystem. Let h denote resulting public key.Voting. Voter Vi casts vote vi ∈ {0, 1} ' {“no”, “yes”} by broadcasting a

ballot consisting of ElGamal encryption (Ai ,Bi ) = (gui , hui g vi ),ui ∈R Zn, and noninteractive Σ-proof that (Ai ,Bi ) is correctlyformed.

Tallying. Talliers decrypt (A,B) =∏m′

i=1(Ai ,Bi ) to obtain g∑m′

i=1vi , from

which∑m′

i=1 vi is easily determined using 0 ≤∑m′

i=1 vi ≤ m′.

If all (Ai ,Bi ) are correctly formed, homomorphic property yields

(A,B) = (gu, hug∑m′

i=1vi ) for some u ∈ Zn, ensuring validity of final tally.

Exercise 7.1.1Construct a Σ-protocol (and prove its correctness) for proving that (Ai ,Bi ) iscorrectly formed, and turn it into a Σ-proof (see Section 5.4.2 for a similar case).

Page 585: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

189/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Exercise 7.1.2 (boardroom election scheme)Voter Vi has a public key hi = g xi , where xi ∈R Zn is Vi ’s private key. LetHi = hm

∏i−1j=1 hj , for 1 ≤ i ≤ m.

First, voter Vm publishes the following encryption of its vote vm ∈ {0, 1}:

(Am,Bm) = (gum ,Humm gvm ), um ∈R Zn.

Next, for i = m − 1, . . . , 1 (in this order), voter Vi publishes the followingencryption of its vote vi ∈ {0, 1}:

(Ai ,Bi ) = (Ai+1gui ,Bi+1A−xii+1 Hui

i gvi ), ui ∈R Zn.

Finally, voter Vm publishes logg B1A−xm1 .

Let ti =∑m

j=i vj , for 1 ≤ i ≤ m. (i) Prove by induction on i that (Ai ,Bi ) isElGamal encryption of g ti under public key Hi . Hence, Vm publishes

∑mj=1 vj at

the end of the protocol. (ii) Show how Vm,V1, . . . ,Vi−1 for any i, 2 ≤ i ≤ m, arejointly able to decrypt (Ai ,Bi ), hence able to determine intermediate electionresult ti . (iii) Describe the relations to be proved in each protocol step to showthat the voter’s output is formed correctly.

Page 586: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

190/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Matching without Embarrassments

Alice’s rule separator Bob’s rule

for “yes” for “no” for “yes” for “no”

Suppose Alice thinks “yes” separator Suppose Bob thinks “yes”

Alice and Bob make a random cut:

and open the cards ...

Page 587: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

190/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Matching without Embarrassments

Alice’s rule separator Bob’s rule

for “yes” for “no” for “yes” for “no”Suppose Alice thinks “yes” separator Suppose Bob thinks “yes”

Alice and Bob make a random cut:

and open the cards ...

Page 588: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

190/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Matching without Embarrassments

Alice’s rule separator Bob’s rule

for “yes” for “no” for “yes” for “no”Suppose Alice thinks “yes” separator Suppose Bob thinks “yes”

Alice and Bob make a random cut:

and open the cards ...

Page 589: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

191/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Five-Card Trick (Bert den Boer, Eurocrypt 1989)

MATCH

yes yesNO MATCH

yes no

no yes

no no“NO MATCH” cases are indistinguishable!If you put “no” you don’t find out the other’s preference.

Page 590: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

192/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Tom Verhoeff turned the 5-card trick into a wonderful 3D printable smiley design:

Check out TNO’s cool MPC animation demoing the 3D smiley!

Figure 7.1 (Matching without embarrassments)

x y xy0 0 01 0 00 1 01 1 1

∼=

Alice Bob match?no no -yes no -no yes -yes yes ♥

Page 591: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

192/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Tom Verhoeff turned the 5-card trick into a wonderful 3D printable smiley design:

Check out TNO’s cool MPC animation demoing the 3D smiley!

Figure 7.1 (Matching without embarrassments)

x y xy0 0 01 0 00 1 01 1 1

∼=

Alice Bob match?no no -yes no -no yes -yes yes ♥

Page 592: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

193/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B set up (1, 2)-threshold homomorphic ElGamal with public key h.

Secure multiplication: private inputs x , y , public output xy

Party A Party B(x ∈ {0, 1}) (y ∈ {0, 1})

u ∈R ZnA← gu

B ← hugx−−−−−−

(A,B)−−−−−−−−−−→ v ∈R Zn

C ← g v Ay

←−−−−−−(C ,D)−−−−−−−−−− D ← hv By

←−jointly decrypt−−−−−−−−−−−−

(C ,D)−−−−−→

output xy output xy

Note: (C ,D) = (gv+uy , hv+uy gxy ).

Page 593: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

193/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B set up (1, 2)-threshold homomorphic ElGamal with public key h.

Secure multiplication: private inputs x , y , public output xy

Party A Party B(x ∈ {0, 1}) (y ∈ {0, 1})

u ∈R ZnA← gu

B ← hugx−−−−−−

(A,B)−−−−−−−−−−→ v ∈R Zn

C ← g v Ay

←−−−−−−(C ,D)−−−−−−−−−− D ← hv By

←−jointly decrypt−−−−−−−−−−−−

(C ,D)−−−−−→

output xy output xy

Note: (C ,D) = (gv+uy , hv+uy gxy ).

Page 594: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

193/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B set up (1, 2)-threshold homomorphic ElGamal with public key h.

Secure multiplication: private inputs x , y , public output xy

Party A Party B(x ∈ {0, 1}) (y ∈ {0, 1})

u ∈R ZnA← gu

B ← hugx−−−−−−

(A,B)−−−−−−−−−−→ v ∈R Zn

C ← g v Ay

←−−−−−−(C ,D)−−−−−−−−−− D ← hv By

←−jointly decrypt−−−−−−−−−−−−

(C ,D)−−−−−→

output xy output xy

Note: (C ,D) = (gv+uy , hv+uy gxy ).

Page 595: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

194/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Let X = (−1)x and Y = (−1)y .Encryptions E(X), E(Y ) common input to parties A and B.

Secure multiplication: input E(X), E(Y ), output E(XY )

Party A Party Bu ∈R {1,−1}

−−−−E(Xu),E(Yu)−−−−−−−−−−−−−−→ v ∈R {1,−1}

←−−−E(Xuv),E(Yuv)−−−−−−−−−−−−−−−

←−jointly decrypt−−−−−−−−−−−−

E(Xuv)−−−−−−→

output E(Yuv)Xuv output E(Yuv)Xuv

Note:E(Yuv)Xuv = E(YuvXuv) = E(XYu2v 2) = E(XY ).Xuv as decrypted during protocol is statistically independent of X :

from A’s point of view: A does not know v ∈R {1,−1}from B’s point of view: B does not know u ∈R {1,−1}

Page 596: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

194/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Let X = (−1)x and Y = (−1)y .Encryptions E(X), E(Y ) common input to parties A and B.

Secure multiplication: input E(X), E(Y ), output E(XY )

Party A Party Bu ∈R {1,−1}

−−−−E(Xu),E(Yu)−−−−−−−−−−−−−−→ v ∈R {1,−1}

←−−−E(Xuv),E(Yuv)−−−−−−−−−−−−−−−

←−jointly decrypt−−−−−−−−−−−−

E(Xuv)−−−−−−→

output E(Yuv)Xuv output E(Yuv)Xuv

Note:E(Yuv)Xuv = E(YuvXuv) = E(XYu2v 2) = E(XY ).Xuv as decrypted during protocol is statistically independent of X :

from A’s point of view: A does not know v ∈R {1,−1}from B’s point of view: B does not know u ∈R {1,−1}

Page 597: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

194/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Let X = (−1)x and Y = (−1)y .Encryptions E(X), E(Y ) common input to parties A and B.

Secure multiplication: input E(X), E(Y ), output E(XY )

Party A Party Bu ∈R {1,−1}

−−−−E(Xu),E(Yu)−−−−−−−−−−−−−−→ v ∈R {1,−1}

←−−−E(Xuv),E(Yuv)−−−−−−−−−−−−−−−

←−jointly decrypt−−−−−−−−−−−−

E(Xuv)−−−−−−→

output E(Yuv)Xuv output E(Yuv)Xuv

Note:E(Yuv)Xuv = E(YuvXuv) = E(XYu2v 2) = E(XY ).Xuv as decrypted during protocol is statistically independent of X :

from A’s point of view: A does not know v ∈R {1,−1}from B’s point of view: B does not know u ∈R {1,−1}

Page 598: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

195/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

“Raw” OT

Figure 7.2 (Rabin OT protocol)

Sender Receiver(b ∈ {0, 1})

←−−−−−−−−−−−−−−−−−−−−−−−−→

output b or ⊥

Both cases probability 50%.Receiver knows whether it gets b or ⊥.Sender does not know whether bit b was transferred successfully or not.

Strange functionality of OT sufficiently powerful to construct secure computationfor any computable function: OT is complete for secure computation.

Page 599: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

195/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

“Raw” OT

Figure 7.2 (Rabin OT protocol)

Sender Receiver(b ∈ {0, 1})

←−−−−−−−−−−−−−−−−−−−−−−−−→

output b or ⊥

Both cases probability 50%.Receiver knows whether it gets b or ⊥.Sender does not know whether bit b was transferred successfully or not.

Strange functionality of OT sufficiently powerful to construct secure computationfor any computable function: OT is complete for secure computation.

Page 600: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

196/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

1-out-of-2 OT

Sender holds two data bits x0, x1, receiver holds one selection bit s.Functionality: OT (x0, x1; s) = xs .

Figure 7.3 ((2

1

)-OT protocol)

Sender Receiver(x0, x1 ∈ {0, 1}) (s ∈ {0, 1})

u ∈R Znhs ← gu

h1−s ← h/gu

←−−−−−h0, h1−−−−−−−−−

u0, u1 ∈R Zn(A0,B0)← (gu0 , hu0

0 gx0 )(A1,B1)← (gu1 , hu1

1 gx1 )−(A0,B0), (A1,B1)−−−−−−−−−−−−−→

xs ← logg (Bs/Aus )

Page 601: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

196/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

1-out-of-2 OT

Sender holds two data bits x0, x1, receiver holds one selection bit s.Functionality: OT (x0, x1; s) = xs .

Figure 7.3 ((2

1

)-OT protocol)

Sender Receiver(x0, x1 ∈ {0, 1}) (s ∈ {0, 1})

u ∈R Znhs ← gu

h1−s ← h/gu

←−−−−−h0, h1−−−−−−−−−

u0, u1 ∈R Zn(A0,B0)← (gu0 , hu0

0 gx0 )(A1,B1)← (gu1 , hu1

1 gx1 )−(A0,B0), (A1,B1)−−−−−−−−−−−−−→

xs ← logg (Bs/Aus )

Page 602: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

197/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Property: OT (0, x ; y) = xy

Secure multiplication: private inputs x , y , public output xy

Party A Party B(x ∈ {0, 1}) (y ∈ {0, 1})

u ∈R Znhy ← gu

h1−y ← h/gu

←−−−−−h0, h1−−−−−−−−−

u0, u1 ∈R Zn(A0,B0)← (gu0 , hu0

0 )(A1,B1)← (gu1 , hu1

1 g x )−(A0,B0), (A1,B1)−−−−−−−−−−−−−→

xy ← logg (By/Auy )

←−−−−−−xy−−−−−−−

output xy output xy

Note: xy = logg (By/Auy ) = xy .

Page 603: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

197/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Property: OT (0, x ; y) = xy

Secure multiplication: private inputs x , y , public output xy

Party A Party B(x ∈ {0, 1}) (y ∈ {0, 1})

u ∈R Znhy ← gu

h1−y ← h/gu

←−−−−−h0, h1−−−−−−−−−

u0, u1 ∈R Zn(A0,B0)← (gu0 , hu0

0 )(A1,B1)← (gu1 , hu1

1 g x )−(A0,B0), (A1,B1)−−−−−−−−−−−−−→

xy ← logg (By/Auy )

←−−−−−−xy−−−−−−−

output xy output xy

Note: xy = logg (By/Auy ) = xy .

Page 604: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

197/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

Property: OT (0, x ; y) = xy

Secure multiplication: private inputs x , y , public output xy

Party A Party B(x ∈ {0, 1}) (y ∈ {0, 1})

u ∈R Znhy ← gu

h1−y ← h/gu

←−−−−−h0, h1−−−−−−−−−

u0, u1 ∈R Zn(A0,B0)← (gu0 , hu0

0 )(A1,B1)← (gu1 , hu1

1 g x )−(A0,B0), (A1,B1)−−−−−−−−−−−−−→

xy ← logg (By/Auy )

←−−−−−−xy−−−−−−−

output xy output xy

Note: xy = logg (By/Auy ) = xy .

Page 605: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

198/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B hold (1, 2)-threshold secret shares of bits x , y , cf. Exercise 6.1.1.

Secure multiplication: input x = xa ⊕ xb,y = ya ⊕ yb, output xy = za ⊕ zb

Party A Party B(xa, ya ∈ {0, 1}) (xb, yb ∈ {0, 1})

ua ∈R {0, 1} ub ∈R {0, 1}

−OT (ua, xa ⊕ ua; yb)−−−−−−−−−−−−−−−→

←−OT (ub, xb ⊕ ub; ya)−−−−−−−−−−−−−−−

va ← OT (ub, xb ⊕ ub; ya) vb ← OT (ua, xa ⊕ ua; yb)za ← xaya ⊕ ua ⊕ va zb ← xbyb ⊕ ub ⊕ vb

Property: OT (x0, x1; s) = xs = x0(1− s)⊕ x1s.Therefore: va = OT (ub, xb ⊕ ub; ya)

So z = za ⊕ zb = xy follows from:{

za = xaya ⊕ ua ⊕ ub ⊕ xbyazb = xbyb ⊕ ub ⊕ ua ⊕ xayb

Shares za, zb uniform and independent of other values due to ub, ua, resp.

Page 606: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

198/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B hold (1, 2)-threshold secret shares of bits x , y , cf. Exercise 6.1.1.

Secure multiplication: input x = xa ⊕ xb,y = ya ⊕ yb, output xy = za ⊕ zb

Party A Party B(xa, ya ∈ {0, 1}) (xb, yb ∈ {0, 1})

ua ∈R {0, 1} ub ∈R {0, 1}

−OT (ua, xa ⊕ ua; yb)−−−−−−−−−−−−−−−→

←−OT (ub, xb ⊕ ub; ya)−−−−−−−−−−−−−−−

va ← OT (ub, xb ⊕ ub; ya) vb ← OT (ua, xa ⊕ ua; yb)za ← xaya ⊕ ua ⊕ va zb ← xbyb ⊕ ub ⊕ vb

Property: OT (x0, x1; s) = xs = x0(1− s)⊕ x1s.Therefore: va = OT (ub, xb ⊕ ub; ya)

So z = za ⊕ zb = xy follows from:{

za = xaya ⊕ ua ⊕ ub ⊕ xbyazb = xbyb ⊕ ub ⊕ ua ⊕ xayb

Shares za, zb uniform and independent of other values due to ub, ua, resp.

Page 607: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

198/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B hold (1, 2)-threshold secret shares of bits x , y , cf. Exercise 6.1.1.

Secure multiplication: input x = xa ⊕ xb,y = ya ⊕ yb, output xy = za ⊕ zb

Party A Party B(xa, ya ∈ {0, 1}) (xb, yb ∈ {0, 1})

ua ∈R {0, 1} ub ∈R {0, 1}

−OT (ua, xa ⊕ ua; yb)−−−−−−−−−−−−−−−→

←−OT (ub, xb ⊕ ub; ya)−−−−−−−−−−−−−−−

va ← OT (ub, xb ⊕ ub; ya) vb ← OT (ua, xa ⊕ ua; yb)za ← xaya ⊕ ua ⊕ va zb ← xbyb ⊕ ub ⊕ vb

Property: OT (x0, x1; s) = xs = x0(1− s)⊕ x1s.Therefore: va = OT (ub, xb ⊕ ub; ya)

So z = za ⊕ zb = xy follows from:{

za = xaya ⊕ ua ⊕ ub ⊕ xbyazb = xbyb ⊕ ub ⊕ ua ⊕ xayb

Shares za, zb uniform and independent of other values due to ub, ua, resp.

Page 608: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

198/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B hold (1, 2)-threshold secret shares of bits x , y , cf. Exercise 6.1.1.

Secure multiplication: input x = xa ⊕ xb,y = ya ⊕ yb, output xy = za ⊕ zb

Party A Party B(xa, ya ∈ {0, 1}) (xb, yb ∈ {0, 1})

ua ∈R {0, 1} ub ∈R {0, 1}

−OT (ua, xa ⊕ ua; yb)−−−−−−−−−−−−−−−→

←−OT (ub, xb ⊕ ub; ya)−−−−−−−−−−−−−−−

va ← OT (ub, xb ⊕ ub; ya) vb ← OT (ua, xa ⊕ ua; yb)za ← xaya ⊕ ua ⊕ va zb ← xbyb ⊕ ub ⊕ vb

Property: OT (x0, x1; s) = xs = x0(1− s)⊕ x1s.Therefore: va = OT (ub, xb ⊕ ub; ya) = ub(1− ya)⊕ (xb ⊕ ub)ya

So z = za ⊕ zb = xy follows from:{

za = xaya ⊕ ua ⊕ ub ⊕ xbyazb = xbyb ⊕ ub ⊕ ua ⊕ xayb

Shares za, zb uniform and independent of other values due to ub, ua, resp.

Page 609: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

198/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B hold (1, 2)-threshold secret shares of bits x , y , cf. Exercise 6.1.1.

Secure multiplication: input x = xa ⊕ xb,y = ya ⊕ yb, output xy = za ⊕ zb

Party A Party B(xa, ya ∈ {0, 1}) (xb, yb ∈ {0, 1})

ua ∈R {0, 1} ub ∈R {0, 1}

−OT (ua, xa ⊕ ua; yb)−−−−−−−−−−−−−−−→

←−OT (ub, xb ⊕ ub; ya)−−−−−−−−−−−−−−−

va ← OT (ub, xb ⊕ ub; ya) vb ← OT (ua, xa ⊕ ua; yb)za ← xaya ⊕ ua ⊕ va zb ← xbyb ⊕ ub ⊕ vb

Property: OT (x0, x1; s) = xs = x0(1− s)⊕ x1s.Therefore: va = . . . = ub(1− ya)⊕ (xb ⊕ ub)ya = ub ⊕ ubya ⊕ xbya ⊕ ubya

So z = za ⊕ zb = xy follows from:{

za = xaya ⊕ ua ⊕ ub ⊕ xbyazb = xbyb ⊕ ub ⊕ ua ⊕ xayb

Shares za, zb uniform and independent of other values due to ub, ua, resp.

Page 610: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

198/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B hold (1, 2)-threshold secret shares of bits x , y , cf. Exercise 6.1.1.

Secure multiplication: input x = xa ⊕ xb,y = ya ⊕ yb, output xy = za ⊕ zb

Party A Party B(xa, ya ∈ {0, 1}) (xb, yb ∈ {0, 1})

ua ∈R {0, 1} ub ∈R {0, 1}

−OT (ua, xa ⊕ ua; yb)−−−−−−−−−−−−−−−→

←−OT (ub, xb ⊕ ub; ya)−−−−−−−−−−−−−−−

va ← OT (ub, xb ⊕ ub; ya) vb ← OT (ua, xa ⊕ ua; yb)za ← xaya ⊕ ua ⊕ va zb ← xbyb ⊕ ub ⊕ vb

Property: OT (x0, x1; s) = xs = x0(1− s)⊕ x1s.Therefore: va = . . . = ub ⊕ ubya ⊕ xbya ⊕ ubya = ub ⊕ xbya

So z = za ⊕ zb = xy follows from:{

za = xaya ⊕ ua ⊕ ub ⊕ xbyazb = xbyb ⊕ ub ⊕ ua ⊕ xayb

Shares za, zb uniform and independent of other values due to ub, ua, resp.

Page 611: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

198/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B hold (1, 2)-threshold secret shares of bits x , y , cf. Exercise 6.1.1.

Secure multiplication: input x = xa ⊕ xb,y = ya ⊕ yb, output xy = za ⊕ zb

Party A Party B(xa, ya ∈ {0, 1}) (xb, yb ∈ {0, 1})

ua ∈R {0, 1} ub ∈R {0, 1}

−OT (ua, xa ⊕ ua; yb)−−−−−−−−−−−−−−−→

←−OT (ub, xb ⊕ ub; ya)−−−−−−−−−−−−−−−

va ← OT (ub, xb ⊕ ub; ya) vb ← OT (ua, xa ⊕ ua; yb)za ← xaya ⊕ ua ⊕ va zb ← xbyb ⊕ ub ⊕ vb

Property: OT (x0, x1; s) = xs = x0(1− s)⊕ x1s.Therefore: va = ub ⊕ xbya

So z = za ⊕ zb = xy follows from:{

za = xaya ⊕ ua ⊕ ub ⊕ xbyazb = xbyb ⊕ ub ⊕ ua ⊕ xayb

Shares za, zb uniform and independent of other values due to ub, ua, resp.

Page 612: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

198/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B hold (1, 2)-threshold secret shares of bits x , y , cf. Exercise 6.1.1.

Secure multiplication: input x = xa ⊕ xb,y = ya ⊕ yb, output xy = za ⊕ zb

Party A Party B(xa, ya ∈ {0, 1}) (xb, yb ∈ {0, 1})

ua ∈R {0, 1} ub ∈R {0, 1}

−OT (ua, xa ⊕ ua; yb)−−−−−−−−−−−−−−−→

←−OT (ub, xb ⊕ ub; ya)−−−−−−−−−−−−−−−

va ← OT (ub, xb ⊕ ub; ya) vb ← OT (ua, xa ⊕ ua; yb)za ← xaya ⊕ ua ⊕ va zb ← xbyb ⊕ ub ⊕ vb

Property: OT (x0, x1; s) = xs = x0(1− s)⊕ x1s.Therefore: va = ub ⊕ xbya and vb = ua ⊕ xayb.

So z = za ⊕ zb = xy follows from:{

za = xaya ⊕ ua ⊕ ub ⊕ xbyazb = xbyb ⊕ ub ⊕ ua ⊕ xayb

Shares za, zb uniform and independent of other values due to ub, ua, resp.

Page 613: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

198/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B hold (1, 2)-threshold secret shares of bits x , y , cf. Exercise 6.1.1.

Secure multiplication: input x = xa ⊕ xb,y = ya ⊕ yb, output xy = za ⊕ zb

Party A Party B(xa, ya ∈ {0, 1}) (xb, yb ∈ {0, 1})

ua ∈R {0, 1} ub ∈R {0, 1}

−OT (ua, xa ⊕ ua; yb)−−−−−−−−−−−−−−−→

←−OT (ub, xb ⊕ ub; ya)−−−−−−−−−−−−−−−

va ← OT (ub, xb ⊕ ub; ya) vb ← OT (ua, xa ⊕ ua; yb)za ← xaya ⊕ ua ⊕ va zb ← xbyb ⊕ ub ⊕ vb

Property: OT (x0, x1; s) = xs = x0(1− s)⊕ x1s.Therefore: va = ub ⊕ xbya and vb = ua ⊕ xayb.

So z = za ⊕ zb = xy follows from:{

za = xaya ⊕ ua ⊕ ub ⊕ xbyazb = xbyb ⊕ ub ⊕ ua ⊕ xayb

Shares za, zb uniform and independent of other values due to ub, ua, resp.

Page 614: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

198/205

7 Secure Multiparty Computation

7.1 Electronic Voting7.2 Based on Threshold Homomorphic Cryptosystems

7.3 Based on Oblivious Transfer

A and B hold (1, 2)-threshold secret shares of bits x , y , cf. Exercise 6.1.1.

Secure multiplication: input x = xa ⊕ xb,y = ya ⊕ yb, output xy = za ⊕ zb

Party A Party B(xa, ya ∈ {0, 1}) (xb, yb ∈ {0, 1})

ua ∈R {0, 1} ub ∈R {0, 1}

−OT (ua, xa ⊕ ua; yb)−−−−−−−−−−−−−−−→

←−OT (ub, xb ⊕ ub; ya)−−−−−−−−−−−−−−−

va ← OT (ub, xb ⊕ ub; ya) vb ← OT (ua, xa ⊕ ua; yb)za ← xaya ⊕ ua ⊕ va zb ← xbyb ⊕ ub ⊕ vb

Property: OT (x0, x1; s) = xs = x0(1− s)⊕ x1s.Therefore: va = ub ⊕ xbya and vb = ua ⊕ xayb.

So z = za ⊕ zb = xy follows from:{

za = xaya ⊕ ua ⊕ ub ⊕ xbyazb = xbyb ⊕ ub ⊕ ua ⊕ xayb

Shares za, zb uniform and independent of other values due to ub, ua, resp.

Page 615: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

199/205

8 Blind Signatures

8.1 Definitions8.2 Chaum Blind Signature Scheme

8.3 Blind Signatures from Σ-Protocols

Definition 8.1 (Blind signature scheme)Key generation. Algorithm that on input of security parameter k, generates key

pair (sk, pk) consisting of private key sk and public key pk.Signature generation. Two-party protocol between signer S and receiver R with

public key pk as common input. Private input of S is private keysk, and private input of R is message M. At the end of theprotocol, R obtains signature S on M as private output.

Signature verification. Algorithm that on input of message M, public key pk, andsignature S, determines whether S is a valid signature on M w.r.t.public key pk.

unforgeabilityunlinkability

Page 616: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

200/205

8 Blind Signatures

8.1 Definitions8.2 Chaum Blind Signature Scheme

8.3 Blind Signatures from Σ-Protocols

Chaum’s Blind SignaturesRSA setting: RSA modulus N, public exponent e.

Figure 8.1 (Chaum’s blind signature protocol)

Signer Receiver(d = 1/e mod φ(N))

u ∈R Z∗Ny ←N H(M)ue

←−−−−−−y−−−−−−−

x ←N yd

−−−−−−x−−−−−−−→

S ←N x/uSe ?=N H(M)

Receiver obtains RSA signature S on message M:

Se = (x/u)e = (y 1/e/u)e = y/ue = H(M) mod N

Perfect unlinkability: (x , y) is uniformly random, independent of (M,S).

Page 617: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

201/205

8 Blind Signatures

8.1 Definitions8.2 Chaum Blind Signature Scheme

8.3 Blind Signatures from Σ-Protocols

Figure 8.2 (Schnorr-based blind signature protocol)

Signer Receiver(x = logg h)

u ∈R Zn

a← gu−−−−−−

a−−−−−−→ s, t ∈R Zn

a′ ← ag sh−t

c ′ ← H(a′,M)←−−−−−−

c−−−−−− c ←n c ′ − t

r ←n u + cx−−−−−−

r−−−−−−→

r ′ ←n r + sg r′ ?= a′hc′

Receiver obtains Schnorr signature S = (c ′, r ′) on message M:

c ′ = H(a′,M) = H(ag sh−t ,M) = H(g r+sh−c−t ,M) = H(g r′h−c′ ,M).

Perfect unlinkability: (c, r) is uniformly random, independent of (c ′, r ′).

Page 618: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

202/205

8 Blind Signatures

8.1 Definitions8.2 Chaum Blind Signature Scheme

8.3 Blind Signatures from Σ-Protocols

Exercises

Exercise 8.3.1Consider Chaum’s blind signature protocol (Figure 8.1) for a fixed message M.Show that the pair (x , y) is distributed uniformly random by proving that

Pr[(x , y) = (x0, y0)] = 1/φ(N)

for any x0, y0 ∈ Z∗N satisfying y0 = x e0 mod N.

Exercise 8.3.2Consider the Schnorr-based blind signature protocol (Figure 8.2) for a fixedmessage M. Show that the triples (a, c, r), (a′, c ′, r ′) are distributed uniformlyrandom and independent of each other by proving that

Pr[(a; c; r) = (a0; c0; r0) ∧ (a′; c ′; r ′) = (a′0; c ′0; r ′0)] = 1/n3

for any (a0; c0; r0), (a′0; c ′0; r ′0) s.t. g r0 = a0hc0 , c ′0 = H(a′0,M), and g r′0 = a′0hc′0 .

Page 619: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

203/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Proposition (“Fundamental Lemma of Cryptology”)Let G be a group of order n. Let a ∈ G be any random variable and b ∈R G.Then we have:

Pr[ab = v ] = Pr[ba = v ] = 1n , for all values v ∈ G.

Proof.Pr[ab = v ]

=∑

w∈G Pr[ab = v , b = w ] “split on value of b”=

∑w∈G Pr[aw = v , b = w ] “substitute b = w”

=∑

w∈G Pr[aw = v ] Pr[b = w ] “a and b independent”=

∑w∈G Pr[aw = v ]/n “b uniform on G”

=∑

w∈G Pr[a = vw−1]/n “multiply with w−1 from the right”=

∑w′∈G Pr[a = w ′]/n “one-to-one map w ′ = vw−1”

= 1/n. “random variable a ∈ G”

Same proof for Pr[ba = v ], but using multiplication with w−1 from the left.

Page 620: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

203/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Proposition (“Fundamental Lemma of Cryptology”)Let G be a group of order n. Let a ∈ G be any random variable and b ∈R G.Then we have:

Pr[ab = v ] = Pr[ba = v ] = 1n , for all values v ∈ G.

Proof.Pr[ab = v ]

=∑

w∈G Pr[ab = v , b = w ] “split on value of b”=

∑w∈G Pr[aw = v , b = w ] “substitute b = w”

=∑

w∈G Pr[aw = v ] Pr[b = w ] “a and b independent”=

∑w∈G Pr[aw = v ]/n “b uniform on G”

=∑

w∈G Pr[a = vw−1]/n “multiply with w−1 from the right”=

∑w′∈G Pr[a = w ′]/n “one-to-one map w ′ = vw−1”

= 1/n. “random variable a ∈ G”

Same proof for Pr[ba = v ], but using multiplication with w−1 from the left.

Page 621: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

203/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Proposition (“Fundamental Lemma of Cryptology”)Let G be a group of order n. Let a ∈ G be any random variable and b ∈R G.Then we have:

Pr[ab = v ] = Pr[ba = v ] = 1n , for all values v ∈ G.

Proof.Pr[ab = v ]

=∑

w∈G Pr[ab = v , b = w ] “split on value of b”=

∑w∈G Pr[aw = v , b = w ] “substitute b = w”

=∑

w∈G Pr[aw = v ] Pr[b = w ] “a and b independent”=

∑w∈G Pr[aw = v ]/n “b uniform on G”

=∑

w∈G Pr[a = vw−1]/n “multiply with w−1 from the right”=

∑w′∈G Pr[a = w ′]/n “one-to-one map w ′ = vw−1”

= 1/n. “random variable a ∈ G”

Same proof for Pr[ba = v ], but using multiplication with w−1 from the left.

Page 622: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

203/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Proposition (“Fundamental Lemma of Cryptology”)Let G be a group of order n. Let a ∈ G be any random variable and b ∈R G.Then we have:

Pr[ab = v ] = Pr[ba = v ] = 1n , for all values v ∈ G.

Proof.Pr[ab = v ]

=∑

w∈G Pr[ab = v , b = w ] “split on value of b”=

∑w∈G Pr[aw = v , b = w ] “substitute b = w”

=∑

w∈G Pr[aw = v ] Pr[b = w ] “a and b independent”=

∑w∈G Pr[aw = v ]/n “b uniform on G”

=∑

w∈G Pr[a = vw−1]/n “multiply with w−1 from the right”=

∑w′∈G Pr[a = w ′]/n “one-to-one map w ′ = vw−1”

= 1/n. “random variable a ∈ G”

Same proof for Pr[ba = v ], but using multiplication with w−1 from the left.

Page 623: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

203/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Proposition (“Fundamental Lemma of Cryptology”)Let G be a group of order n. Let a ∈ G be any random variable and b ∈R G.Then we have:

Pr[ab = v ] = Pr[ba = v ] = 1n , for all values v ∈ G.

Proof.Pr[ab = v ]

=∑

w∈G Pr[ab = v , b = w ] “split on value of b”=

∑w∈G Pr[aw = v , b = w ] “substitute b = w”

=∑

w∈G Pr[aw = v ] Pr[b = w ] “a and b independent”=

∑w∈G Pr[aw = v ]/n “b uniform on G”

=∑

w∈G Pr[a = vw−1]/n “multiply with w−1 from the right”=

∑w′∈G Pr[a = w ′]/n “one-to-one map w ′ = vw−1”

= 1/n. “random variable a ∈ G”

Same proof for Pr[ba = v ], but using multiplication with w−1 from the left.

Page 624: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

203/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Proposition (“Fundamental Lemma of Cryptology”)Let G be a group of order n. Let a ∈ G be any random variable and b ∈R G.Then we have:

Pr[ab = v ] = Pr[ba = v ] = 1n , for all values v ∈ G.

Proof.Pr[ab = v ]

=∑

w∈G Pr[ab = v , b = w ] “split on value of b”=

∑w∈G Pr[aw = v , b = w ] “substitute b = w”

=∑

w∈G Pr[aw = v ] Pr[b = w ] “a and b independent”=

∑w∈G Pr[aw = v ]/n “b uniform on G”

=∑

w∈G Pr[a = vw−1]/n “multiply with w−1 from the right”=

∑w′∈G Pr[a = w ′]/n “one-to-one map w ′ = vw−1”

= 1/n. “random variable a ∈ G”

Same proof for Pr[ba = v ], but using multiplication with w−1 from the left.

Page 625: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

203/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Proposition (“Fundamental Lemma of Cryptology”)Let G be a group of order n. Let a ∈ G be any random variable and b ∈R G.Then we have:

Pr[ab = v ] = Pr[ba = v ] = 1n , for all values v ∈ G.

Proof.Pr[ab = v ]

=∑

w∈G Pr[ab = v , b = w ] “split on value of b”=

∑w∈G Pr[aw = v , b = w ] “substitute b = w”

=∑

w∈G Pr[aw = v ] Pr[b = w ] “a and b independent”=

∑w∈G Pr[aw = v ]/n “b uniform on G”

=∑

w∈G Pr[a = vw−1]/n “multiply with w−1 from the right”=

∑w′∈G Pr[a = w ′]/n “one-to-one map w ′ = vw−1”

= 1/n. “random variable a ∈ G”

Same proof for Pr[ba = v ], but using multiplication with w−1 from the left.

Page 626: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

203/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Proposition (“Fundamental Lemma of Cryptology”)Let G be a group of order n. Let a ∈ G be any random variable and b ∈R G.Then we have:

Pr[ab = v ] = Pr[ba = v ] = 1n , for all values v ∈ G.

Proof.Pr[ab = v ]

=∑

w∈G Pr[ab = v , b = w ] “split on value of b”=

∑w∈G Pr[aw = v , b = w ] “substitute b = w”

=∑

w∈G Pr[aw = v ] Pr[b = w ] “a and b independent”=

∑w∈G Pr[aw = v ]/n “b uniform on G”

=∑

w∈G Pr[a = vw−1]/n “multiply with w−1 from the right”=

∑w′∈G Pr[a = w ′]/n “one-to-one map w ′ = vw−1”

= 1/n. “random variable a ∈ G”

Same proof for Pr[ba = v ], but using multiplication with w−1 from the left.

Page 627: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

203/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Proposition (“Fundamental Lemma of Cryptology”)Let G be a group of order n. Let a ∈ G be any random variable and b ∈R G.Then we have:

Pr[ab = v ] = Pr[ba = v ] = 1n , for all values v ∈ G.

Proof.Pr[ab = v ]

=∑

w∈G Pr[ab = v , b = w ] “split on value of b”=

∑w∈G Pr[aw = v , b = w ] “substitute b = w”

=∑

w∈G Pr[aw = v ] Pr[b = w ] “a and b independent”=

∑w∈G Pr[aw = v ]/n “b uniform on G”

=∑

w∈G Pr[a = vw−1]/n “multiply with w−1 from the right”=

∑w′∈G Pr[a = w ′]/n “one-to-one map w ′ = vw−1”

= 1/n. “random variable a ∈ G”

Same proof for Pr[ba = v ], but using multiplication with w−1 from the left.

Page 628: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

203/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Proposition (“Fundamental Lemma of Cryptology”)Let G be a group of order n. Let a ∈ G be any random variable and b ∈R G.Then we have:

Pr[ab = v ] = Pr[ba = v ] = 1n , for all values v ∈ G.

Proof.Pr[ab = v ]

=∑

w∈G Pr[ab = v , b = w ] “split on value of b”=

∑w∈G Pr[aw = v , b = w ] “substitute b = w”

=∑

w∈G Pr[aw = v ] Pr[b = w ] “a and b independent”=

∑w∈G Pr[aw = v ]/n “b uniform on G”

=∑

w∈G Pr[a = vw−1]/n “multiply with w−1 from the right”=

∑w′∈G Pr[a = w ′]/n “one-to-one map w ′ = vw−1”

= 1/n. “random variable a ∈ G”

Same proof for Pr[ba = v ], but using multiplication with w−1 from the left.

Page 629: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

204/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Fundamental Lemma of Cryptology

Lemma even holds for quasigroups, using right division / and left division \, resp.Latin square property for Cayley (multiplication) table of quasigroups.No associativity, commutativity, identity element required for quasigroups.

G Examples of uniform ab or ba with a ∈ G and b ∈R G{0, 1}k - Shannon’s perfect secrecy of one-time pad: C = M ⊕ K

- perfect secret sharing of bit s: share s1 = s ⊕ u〈g〉 - additive RSR of DL problem: h′ = h gu

- perfect hiding Pedersen commitment: C = guhx

- special HVZK of Schnorr protocol: a = g r h−c

〈g〉∗ - multiplicative RSR of DL∗ problem: h′ = hu = h ∗ gu

(DH-product ∗, see Exercise 1.2.4)Z∗N - special HVZK of GQ protocol: a = r ey−c mod N

- RSR of RSA problem: y ′ = yue mod N- perfect unlinkability of Chaum’s blind signatures: y = H(M)ue mod N

Also, recognizable in random reencryption of ElGamal ciphertexts, and so on!

Page 630: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

204/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Fundamental Lemma of Cryptology

Lemma even holds for quasigroups, using right division / and left division \, resp.Latin square property for Cayley (multiplication) table of quasigroups.No associativity, commutativity, identity element required for quasigroups.

G Examples of uniform ab or ba with a ∈ G and b ∈R G{0, 1}k - Shannon’s perfect secrecy of one-time pad: C = M ⊕ K

- perfect secret sharing of bit s: share s1 = s ⊕ u〈g〉 - additive RSR of DL problem: h′ = h gu

- perfect hiding Pedersen commitment: C = guhx

- special HVZK of Schnorr protocol: a = g r h−c

〈g〉∗ - multiplicative RSR of DL∗ problem: h′ = hu = h ∗ gu

(DH-product ∗, see Exercise 1.2.4)Z∗N - special HVZK of GQ protocol: a = r ey−c mod N

- RSR of RSA problem: y ′ = yue mod N- perfect unlinkability of Chaum’s blind signatures: y = H(M)ue mod N

Also, recognizable in random reencryption of ElGamal ciphertexts, and so on!

Page 631: Cryptographic Protocols: Lecture Slidesberry/CryptographicProtocols/LectureSlides.pdf · By hiding transaction details such as payer’s identity or amount. Monero based onCryptoNote

205/205

Appendices

A Fundamental Lemma of CryptologyB Spell Check

Spell Check

authentication authentificationciphertext cipher textcryptanalysis cryptoanalysis, crypto analysiscryptosystem crypto systemidentification indentificationplaintext plain text