standardizing commit-and-prove zk · 2020-08-03 · matteo campanelli dario fiore standardizing...

20
Dario Fiore Matteo Campanelli Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software Institute, Madrid 2 nd ZKProof Workshop

Upload: others

Post on 13-Aug-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Dario FioreMatteo Campanelli

Standardizing Commit-and-Prove ZK

IMDEA Software Institute, Madrid

Daniel BenarrochQEDIT IMDEA Software Institute,

Madrid

2nd ZKProof Workshop

Page 2: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

ZK

. . .

P V

Look, V, I know u such that R(u) holds.

Page 3: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Commit-and-Prove (CP) ZK

. . .

P V

u

Rcom(c, u) := R(u) AND c u opens

Commit-and-Prove ZKP:

A ZKP for the relation

Look, V, I know u such that R(u) holds.

And, by the way,opens u

Page 4: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Motivation: Soundness + Integrity

Composition of proof systems [CFQ19,Folklore]CP in several applications presented in this workshop

More:

One example (from [WZCPS18])

training algorithm

public ML model

commitpublic commitment

proof

Page 5: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Applications

Abstractions

Implementation

My goal: throwing things at you re CP standards.

Caveats on the focus:

Non-Interactive case

Page 6: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

What?

How (much)?

Standardizing CP

Why?

Page 7: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Why?

What?

How (much)?

Standardizing CP

Page 8: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Why Discussing a Standard for CP?

• Extensive usage

• → Typical reasons to standardize (maximize compatibility, etc.)

• Idiosyncratic reasons

• CP requires a particular type of interoperability

NEXT: let’s give an example

Page 9: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Interoperability and CP

Intuition:Different CPZK operate on the same representation (the commitment).

This representation is part of the relation.

= Commit(D)

Rbank(D) AND D opens

Rempl(D) AND D opens

Me

D

my data

πbank

πemployer

Rland(D) AND D opens

πlandlord

Page 10: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Why?

What?

How (much)?

Standardizing CP

Page 11: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Step 0: One Single Notion for CPZK

An arbitrary relation for CP:

Rcom(ck, c, u) := R(u) AND “c opens to u w.r.t. ck”

* NB: this distinction makes sense for systems with trusted setup.Recall KG syntax: srs <- ZK.KeyGen(R)

There exist two notions in literature; they treat ck differently*

(ck, srs) <- ZKCP.KeyGen(R)

Notion (B) (ck input of KG)

[CFQ19,Lipmaa16,~EG14]

Notion (A) (ck output of KG)

[Geppetto]

srs <- ZKCP.KeyGen(ck, R)

ck <- Com.Setup()...

Page 12: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Comparing Notions

Commitment depends on R and on scheme.

Quite specific.

Decouples commitment, R and scheme.

Enables nice applications for CP

(e.g. commit-ahead-of-time, etc.)

May be the notion worth standardizing

In the remainder of this presentation I will assume (B) as a CP notion to standardize

Notion (A) (ck output of KG)

Notion (B) (ck input of KG)

(ck, srs) <- ZKCP.KeyGen(R) srs <- ZKCP.KeyGen(ck, R)

Page 13: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

What to standardize?Plausibly, commitments. Why?

2. Commitments are the“interoperability bottleneck”

and they are part of the relation.

At least we may need to agree on their syntax.

Rland(D) AND D opens

= Commit(D)Rbank(D) AND D opens

Rempl(D) AND D opens

Me

D

πbank

πemployer

πlandlord

my data

1. CPZK ~ ZK + Commitment

Page 14: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

A Commitment SyntaxD opensGOAL: A syntax for

As for CP, different notions of “opening” are possible. Let’s agree on one.

A possible syntax:𝖵𝖿𝗒𝖢𝗈𝗆(ck, c, D, o) → b ∈ {0,1}

“c opens to data D through opening o w.r.t. ck”

Contrast this with (the more common) 𝖮𝗉𝖾𝗇(ck, c, o) → D ∈ {0,1}*

“Verification”-flavored(opening always carries D)

“Reconstruction”-flavored(need to be able to recompute D from (c,o))

Page 15: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

A Definition for CP* [CDQ19]

R( x , u , ω )

Publicinput

Committedwitness

“free"witness

*credits to Dario Fiore for the slide.

Def. A CP-NIZK for relation R and commitment scheme Com is a NIZK for the relation Rcom ≔ (ck, R) s.t.

Rcom( x, c, u, o, ω ) ≔ “ R( x, u, ω ) = 1 ⋀ VfyCom(ck, c, u, o) = 1 ”

CP syntax. KeyGen(ck, R) → srs = (ek, vk)

Prove(ek, x, c, u, o, ω) → 𝝅

Ver(vk, x, c, 𝝅) → 0/1

Page 16: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Why?

What?

How (much)?

Standardizing CP

Page 17: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

CP and Relation Representation

Rbank(D) AND D opens

A Commit-and-prove relation shows separation of concerns:

Domain Logic

“Protocol” Logic

Q: Could CP be standardized at the level of relation representation?

Page 18: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

define_rel(name: myComAndProveRel,vars:(

X: Field,comY: Commitment(Field) ),

constraints: /* Domain logic R(X,Y) */

)

CP and Relation Representation (cont.)

Q: Could we do the same for other cryptographic constructs?

Could compile automatically to R* that: 1. shows opening of Y2. applies domain logic on domain input values (X,Y)

Domain Logic

X Y

VfyCom

CY OY

Page 19: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Not only Commit-and-Prove

define_rel(name: mySigAndProveRel,vars:(

X: Field,sigY: Sign(Field) ),

constraints: /* Domain logic R(X,Y) */

)

Could compile automatically to R* that: 1. verifies signature on Y2. applies domain logic on domain input values (X,Y)

Domain Logic

X Y

VfySig

SY

Page 20: Standardizing Commit-and-Prove ZK · 2020-08-03 · Matteo Campanelli Dario Fiore Standardizing Commit-and-Prove ZK IMDEA Software Institute, Madrid Daniel Benarroch QEDIT IMDEA Software

Final Remarks/Qs• What abstraction(s) for CP?

• def. should decouple commitment and relation (or should it?)

• Current proposal:

• modularity

• enable “nice” properties (commit-ahead-of-time, etc.)

• Standardizing commitments? Which syntax?

• Should we separate “domain” and “protocol” logic?

• Standardizing applications, implementation, etc…?

Thanks!