Zcash adds privacy to Bitcoin’s decentralization

Slides:



Advertisements
Similar presentations
Perfect Non-interactive Zero-Knowledge for NP
Advertisements

On the Amortized Complexity of Zero-Knowledge Proofs Ronald Cramer, CWI Ivan Damgård, Århus University.
Spreading Alerts Quietly and the Subgroup Escape Problem Aleksandr Yampolskiy (Yale) Joint work with James Aspnes, Zoë Diamadi, Kristian Gjøsteen, and.
Efficient Non-Interactive Zero Knowledge Arguments for Set Operations Prastudy Fauzi, Helger Lipmaa, Bingsheng Zhang University of Tartu, University of.
Authentication and Digital Signatures CSCI 5857: Encoding and Encryption.
Efficient Zero-Knowledge Proof Systems Jens Groth University College London FOSAD 2014.
Non-interactive Zaps and New Techniques for NIZK Jens Groth Rafail Ostrovsky Amit Sahai University of California Los Angeles.
YSLInformation Security -- Public-Key Cryptography1 Elliptic Curve Cryptography (ECC) For the same length of keys, faster than RSA For the same degree.
Introduction to Modern Cryptography Homework assignments.
Chapter 7-1 Signature Schemes.
Electronic Voting Schemes and Other stuff. Requirements Only eligible voters can vote (once only) No one can tell how voter voted Publish who voted (?)
Introduction to Modern Cryptography, Lecture 7/6/07 Zero Knowledge and Applications.
Introduction to Modern Cryptography, Lecture 9 More about Digital Signatures and Identification.
Chapter 9 Cryptographic Protocol Cryptography-Principles and Practice Harbin Institute of Technology School of Computer Science and Technology Zhijun Li.
Digital Signatures (DSs) The digital signatures cannot be separated from the message and attached to another The signature is not only tied to signer but.
Quadratic Residuosity and Two Distinct Prime Factor ZK Protocols By Stephen Hall.
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Digital Signatures A primer 1. Why public key cryptography? With secret key algorithms Number of key pairs to be generated is extremely large If there.
1 Bitcoin A Digital Currency. Functions of Money.
Non-Interactive Verifiable Computing August 5, 2009 Bryan Parno Carnegie Mellon University Rosario Gennaro, Craig Gentry IBM Research.
New Techniques for NIZK Jens Groth Rafail Ostrovsky Amit Sahai University of California Los Angeles.
Identity based signature schemes by using pairings Parshuram Budhathoki Department of Mathematical Science FAU 02/21/2013 Cyber Security Seminar, FAU.
Electronic Cash R. Newman. Topics Defining anonymity Need for anonymity Defining privacy Threats to anonymity and privacy Mechanisms to provide anonymity.
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
Cryptographic methods. Outline  Preliminary Assumptions Public-key encryption  Oblivious Transfer (OT)  Random share based methods  Homomorphic Encryption.
Multi-Party Computation r n parties: P 1,…,P n  P i has input s i  Parties want to compute f(s 1,…,s n ) together  P i doesn’t want any information.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 14. Digital signature.
Real Number System.
Advanced Information Security 5 ECC Cryptography
Bryan Pano, Jon Howell, Craig Gentry, Mariana Raykova
On the Size of Pairing-based Non-interactive Arguments
Information Security message M one-way hash fingerprint f = H(M)
Cryptographic Hash Function
MPC and Verifiable Computation on Committed Data
Information Security message M one-way hash fingerprint f = H(M)
Digital Signature Schemes and the Random Oracle Model
Course Business I am traveling April 25-May 3rd
Elliptic Curve Cryptography (ECC)
CS/COE 1501 Recitation RSA Encryption/Decryption
Digital Signatures Campbell R. Harvey Duke University, NBER and
Digital Signature Schemes and the Random Oracle Model
Cryptographic protocols 2016, Lecture 12 Sigma protocols
cryptographic protocols 2014, lecture 12 Getting full zero knowledge
Information Security message M one-way hash fingerprint f = H(M)
Elliptic Curve Cryptography (ECC)
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Digital Signatures.
Hash Functions Motivation Hash Functions: collision, pre-images SHA-1
Enabling Full Transactional Privacy with
Practical Aspects of Modern Cryptography
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Short Pairing-based Non-interactive Zero-Knowledge Arguments
Interactive Proofs and Secure Multi-Party Computation
Chapter 3 - Public-Key Cryptography & Authentication
Introduction to Modern Cryptography
CSCI284 Spring 2009 GWU Sections 5.1, 5.2.2, 5.3
Privacy Coins CS1952 L Spring 2019 Maurice Herlihy Brown University.
One Way Functions Motivation Complexity Theory Review, Motivation
Oblivious Transfer.
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Zerocash: Decentralized Anonymized Payments from Bitcoins
Proofs of Space 徐昊 2017/5/31.
Ensuring Correctness over Untrusted Private Database
Cryptography Lecture 26.
Blockchain Tech Big Picture
ITIS 6200/8200 Chap 5 Dr. Weichao Wang.
Jens Groth and Mary Maller University College London
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Presentation transcript:

A very brief description of how Zcash private transactions work Ariel Gabizon,

Zcash adds privacy to Bitcoin’s decentralization Shielded (private) transactions reveal no information about sender, receiver, amount ..yet miners can still distinguish between valid and non-valid transactions!

Recall Bitcoin’s set of unspent transaction outputs. (PK1,2.3BTC), (PK2, 0.4BTC),.. To spend money Alice signs a message with the secret key corresponding to a public address in an output: “Move my BTC from PK1 to PK4” (signed by sk1)

For simplicity, assume each output/note is exactly 1 BTC. Each node stores: Note1=(PK1) Note2=(PK2) Note3=(PK3)

Now think of each note as containing a randomly picked ``serial number’’ ri. Note1=(PK1,r1) Note2=(PK2,r2) Note3=(PK3,r3)

For privacy..the node database will only contain hashes of the notes H1=HASH(PK1,r1) H2=HASH(PK2,r2) H3=HASH(PK3,r3)

For privacy, the node will continue to store Hi even after Notei has been spent. The node also stores a nullifier set that contains the hashes of all serial numbers of notes previously spent Nullifier set after Note2 has been spent: H1=HASH(PK1,r1) H2=HASH(PK2,r2) H3=HASH(PK3,r3) nf1=HASH(r2)

To spend a note, Alice sends a zk-SNARK proving she knows the secret key of a note s.t. -It’s Hash is in the table -The hash of its serial number is not in the nullifier set Nullifier set after Note2 has been spent: H1=HASH(PK1,r1) H2=HASH(PK2,r2) H3=HASH(PK3,r3) nf1=HASH(r2)

zk-SNARKs(zero-knowledge Succinct Non-interactive Arguments of Knowledge) Short proofs that let you to prove possession of information, e.g. a secret key, without revealing that information. In 2013 “Quadratic Span Programs and Succint NIZKs without PCPs “ by Gennaro, Gentry, Parno and Raykova paved the way for efficient SNARK constructions

Main ingredient: Homomorphic Hidings(HH) Mapping E such that - Given E(x) hard to find x - x≠y­ → E(x)­≠E(y) - from E(x),E(y) can compute E(x+y),E(x*y)

(over)Simple zk-SNARK example using HH Alice wants to prove to Bob she knows a,b s.t. a+b=7 1. She sends E(a),E(b) to Bob. 2. Bob computes E(7) and E(a+b) using E(a), E(b). 3. Bob checks that E(7)=E(a+b).

how to construct HH? If only need E(x+y) use x→gx in group with hard DL problem. If want both E(x+y) and E(x*y)..need pairings in elliptic curve groups.

Thanks!

more detailed SNARK example, leading to QAPs 1.want to prove know a,b with a+b=7 mod p g – generator of group of order p where DL is hard. Prover: send A=ga, B= gb Verifier: Check that A*B=ga+b = g7 2. Prove we know a,b,c with (a+b)*c = 7 mod p Need: Bi-linear pairings: Map e:G⨯G → GT such that e(ga,gb)=gTa*b (Exists for some elliptic curve groups)

1.want to prove know a,b with a+b=7 mod p heck that A*B=ga+b = g7 2. Prove we know a,b,c with (a+b)*c = 7 mod p Need: Bi-linear pairings: Map e:G⨯G → GT such that e(ga,gb)=gTa*b (Exists for some elliptic curve groups)

more detailed SNARK example, leading to QAPs Prover: Send A=ga, B=gb, C=gc Verifier: Check that e(A*B,C) = (gT)7 e(A*B,C) = e(ga+b,gc) = gT(a+b)c 3. Prove you know a,b,c,d with (a+b)*bc = 7 mod p

Label multiplication gates: + x a b c (a+b)*b*c g2 g1

x + a b c w5 g2 w4 g1 w1 w2 w3 Label wires in certain way: What we want to prove is that we have legal assignment to wires with w5=7.

x + a b c Define degree 2 polys A1,..,A5 w1 w2 w3 w4 w5 Define degree 2 polys A1,..,A5 Ai(j)=1 if wi is left input of gj , 0 otherwise i.e. A1(2)=A2(1)=1, otherwise Ai(j)=0 Bi’s , Ci’s defined sim. for right input and output wires

Define A(X):= sumi=1..5wiAi(X) B(X):= sumi=1..5wiBi(X) C(X):= sumi=1..5wiBi(X) For example A(1) = w2, B(1)=w3, C(1)=w4 We have that w1,…,w5 is legal assignment iff P(X):=A*B-C is divisible by t(X):=(X-1)*(X-2). If so, there exists h(X) such that P(X)≡t(X)*h(X)

Idea: Verifier will check equality on random s not known to the prover: Verifier: choose rand s, send gs,gs^2,,...,gs^d Prover: compute and send A=gA(s),B=gB(s),C=gC(s),H=gh(s) Verifier: Check that e(A*B,1/C) = e(H,gt(s))

Idea: Verifier will check equality on random s not known to the prover: Verifier: choose rand s, send gs,gs^2,,...,gs^d Prover: compute and send A=gA(s),B=gB(s),C=gC(s),H=gh(s) Verifier: Check that e(A*B,1/C) = e(H,gt(s)) e(A*B,1/C) = gA(s)*B(s)-C(s)=gP(s) e(H,gt(s)) = gh(s)*t(s)=gP(s)

Zero-Knowledge (ZK) proofs are to encryption/hashing as a dimmer to a light switch. Decide what and how much you want to reveal about the plaintext/hash preimage.

Example: Alice can use a ZK-proof to prove she knows a SHA-2 preimage of z with msb 1 (and not reveal anything else about preimage). z z Reveal preimage ZK proof 100 1XX

Non-interactive-just one message from Prover (requires setup phase) zk-SNARKs-ZK proofs with all the dream features Succinct: verification time very quick, proof length very short -a few 100 bytes. Non-interactive-just one message from Prover (requires setup phase) Argument of Knowledge In 2013 “Quadratic Span Programs and Succint NIZKs without PCPs “ by Gennaro, Gentry, Parno and Raykova paved the way for efficient SNARK constructions

A few minutes about how zk-SNARKs work. Ingredient one: Convert what you want to prove to knowing a solution to some algebraic equations I know SHA-2 preimage of z with msb 1 I know x,y such that x3+y5=2

Ingredient two: Homomorphic encryption Given encryptions of x,y can obtain the encryption of any arithmetic expression in x,y. E(x3+y5) E(x),E(y)

Proving possession of x,y satisfying x3+y5=2: (without revealing x,y) Prover: Send E(x),E(y) Verifier: Compute E(x3+y5), and E(2), check that they are equal.