matthew green johns hopkins university (joint work with ian miers, christina garman, avi rubin)

64
‘How will Satoshi Nakamoto spend his fortune?’ Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Upload: kiaria

Post on 06-Jan-2016

16 views

Category:

Documents


0 download

DESCRIPTION

Zerocoin: Anonymous Distributed e-Cash from Bitcoin or ‘How will Satoshi Nakamoto spend his fortune?’. Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin). What is money?. What is money?. What is money?. Limited quantity Widely accepted. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Zerocoin: Anonymous Distributed e-Cash from

Bitcoin

or

‘How will Satoshi Nakamoto spend his fortune?’

Matthew GreenJohns Hopkins University

(Joint work with Ian Miers, Christina Garman, Avi Rubin)

Page 2: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

What is money?

Page 3: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

What is money?

Page 4: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

What is money?

•Limited quantity•Widely accepted

•Easy to transfer

Page 5: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

What is money?

Page 6: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

What is money?

Page 7: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Problem: electronic money

1) Very difficult 2) Very simple

Page 8: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Naive approach

1) Very difficult 2) Very simple

Page 9: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Account-based approach

1) Very difficult 2) Very simple

Page 10: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Account-based approach

Page 11: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Problems• Centralization & Trust

• You need a trusted party to operate the bank

• They can create currency, steal or simply fail

Page 12: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Problems• Centralization & Trust

• You need a trusted party to operate the bank

• They can create currency, steal or simply fail

• Privacy

• The bank sees every transaction you make!

Page 13: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

“Ideal electronic currency”

Decentralized

SecurePr

ivat

e

Page 14: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin

Page 15: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin• Proposed in 2008 by “Nakamoto”

• Extends and improves ideas of Dai (b-money),Szabo (bit gold)

• Provides for effective, verifiable currency transfers & creation in a decentralized peer-to-peer setting

• A real system with a $1.38 billion ‘market cap’ (4/21/13)

Page 16: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Alice

Page 17: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Alice

Page 18: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Pay to the order of BobxxAlice

Alice

Page 19: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Pay to the order of BobxxAlice

Pay to the order of CharliexxBob

Page 20: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Can we make this electronic?

• Idea:

• Replace names with public keys

• Replace handwritten signatures with digital signatures

Public key 0xa8fc93875a927472ea

Pay to 0x9fea3018e89...Digital signature

Page 21: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Can we make this electronic?

• Problem: Alice can still double spend!

• Alice “gives” the same checkto Bob and Charlie Pay to the order of

BobxxAlice

Pay to the order of Charlie

xxAlice

Page 22: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Double-spending• Keep a central ‘ledger’ of all transfers

• Register all transfers on the ledger

• Recipients can check if money has already been ‘spent’

• How to do this in a decentralized fashion??

Page 23: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

The block chain• Bitcoin solves this through consensus

• All participants keep a copy of the ledger(divided into ‘blocks’ of many transactions)

• The blocks are connected through hash chaining

.32,A->B

1.03,S->J

2.5,M->S

...

1.0,J->Z

.23,B->C

.1,S->F

...

Block 1 Block 2 Block 3 Block 4

1.45,C->S

1.2,E->J

.2,M->J

...HASH HASH HASH

1.0,H->J

.9,M->B

1.3,S->S

...

Page 24: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

The block chain• Nodes compete to add new blocks to the chain

• This is done by making nodes solve a simple “proof of work”

• This prevents a single node from controlling the chain

.32,A->B

1.03,S->J

2.5,M->S

...

1.0,J->Z

.23,B->C

.1,S->F

...

Block 1 Block 2 Block 3 Block 4

1.45,C->S

1.2,E->J

.2,M->J

...HASH HASH HASH

1.0,H->J

.9,M->B

1.3,S->S

...

Page 25: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

The block chain• Nodes get a reward for ‘winning’ the PoW on a given block

• They’re allowed to ‘mint’ 25 new Bitcoin out of thin air

• (They can also receive transaction fees).32,A->B

1.03,S->J

2.5,M->S

...

1.0,J->Z

.23,B->C

.1,S->F

...

Block 1 Block 2 Block 3 Block 4

1.45,C->S

1.2,E->J

.2,M->J

...HASH HASH HASH

1.0,H->J

.9,M->B

1.3,S->S

...

Page 26: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin triangle

Page 27: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin triangle

Decentralized

Page 28: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin triangle

Decentralized

Secure

Page 29: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin triangle

Decentralized

SecurePr

ivat

e

Page 30: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin privacy• The block chain is a history of every Bitcoin transaction ever!

• Identifiers are public keys not names (“pseudonyms”)

• You can make as many public keys as you want

• But these still leak information! .32,A->B

1.03,S->J

2.5,M->S

...

1.0,J->Z

.23,B->C

.9B->D

...

Block 1 Block 2 Block 3 Block 4

.23,C->E

1.2,E->J

.2,M->J

...HASH HASH HASH

.23,E->F

.9,M->B

...

.9,D->Z

Page 31: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin privacy

Sender

Page 32: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin privacy

Sender

Receiver

Page 33: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin privacy

Sender

Receiver

Sender (again!)

Page 34: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin privacy

Page 35: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin privacy

Page 36: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Bitcoin privacy

Page 38: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

The Nakamoto Treasure

http://bitslog.wordpress.com/2013/04/17/the-well-deserved-fortune-of-satoshi-nakamoto/

Page 39: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Privacy solutions• “Be careful”

• Use ‘laundry’ services

• Mix many users’ coins together

• You must really trust the laundry

• Bu

Page 40: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Chaumian e-Cash• Dates to Chaum [82] (many subsequent works)

• Completely untraceable electronic cash

• Withdraw ‘coins’ from a central bank(using blind signatures)

• Even the bank can’t track the coins

Blind sign “s”

signature(s)

Page 41: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Laundries & Chaum

Decentralized

SecurePr

ivat

e

Page 42: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Zerocoin• New approach to creating electronic coins

• Based on a technique due to Sander and Ta-shma

• Extends Bitcoin by adding a ‘decentralized laundry’

• Requires only a trusted, append-onlybulletin board

• Bitcoin block chain gives us this ‘for free’!

Page 43: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

• Zerocoins are just numbers

• Each is a digital commitment to a random serial number

• Anyone can make one!

Making Zerocoin

823848273471012983

Page 44: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

• Zerocoins are just numbers

• They have value once you put them on the block chain

• This costs e.g., 1 bitcoin

Making Zerocoin

1.0,A->B

1.03,S->J

2.5,M->S...

1.0,J->Z

1.0,

.9B->D

...

Block 1 Block 2 Block 3 Block 4

.23,C->E

1.2,E->J

.2,M->J

...HASH HASH HASH

.23,E->F

.9,M->B

...

1.0->Z

bitcoins

Block 5

HASH

.23,E->F

.9,M->B

...

1.0->Z

Page 45: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Spending Zerocoin

1.0,A->B

1.03,S->J

2.5,M->S...

1.0,J->Z

1.0,

.9B->D

...

Block 1 Block 2 Block 3 Block 4

.23,C->E

1.2,E->J

.2,M->J

...HASH HASH HASH

.23,E->F

.9,M->B

...

1.0->Z

bitcoinsbitcoins

Block 5

HASH

.23,E->F

1.0,Z->B

...

1.0->Z

Page 46: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

• Where do the bitcoins go/come from?

• Nowhere -- they get ‘escrowed’ in place

• A Zerocoin spend transaction allows you to claim the coinsleft by some other Zerocoin user

Spending Zerocoin

1.0,A->B

1.03,S->J

2.5,M->S...

1.0,J->Z

1.0,

.9B->D

...

Block 1 Block 2 Block 3 Block 4

1.0,C->E

1.2,E->J

.2,M->J

...HASH HASH HASH

.23,E->F

.9,M->B

...

1.0->Zbitcoins

Block 5

HASH

.23,E->F

1.0,Z->B

...

1.0->Z

Page 47: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

• Why is this anonymous?

• It’s all in the way we ‘prove’ we have a Zerocoin

• This is done using a zero knowledge proof

Spending Zerocoin

1.0,A->B

1.03,S->J

2.5,M->S...

1.0,J->Z

1.0,

.9B->D

...

Block 1 Block 2 Block 3 Block 4

1.0,C->E

1.2,E->J

.2,M->J

...HASH HASH HASH

.23,E->F

.9,M->B

...

1.0->Z

Block 5

HASH

.23,E->F

.9,M->B

...

1.0->Z

Page 48: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

• Zero knowledge [Goldwasser, Micali 1980s, and beyond]

• Prove a statement without revealing any other knowledge

• Specific variant: proof of knowledge

• Here we prove knowledge of: (a) a Zerocoin in the block chain(b) we just revealed the actual serial number inside of it

• The trick is doing this efficiently!

Spending Zerocoin

Page 49: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

• Inefficient proof

• Identify all valid Zerocoins in the blockchain(call them )

• Prove knowledge of such that:

Spending Zerocoin

These ‘or’ proofs have cost O(N)

These ‘or’ proofs have cost O(N)

Page 50: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

• Better approach

• Use an efficient one-way accumulator

• Accumulate to produce accumulator

• Then prove knowledge of a witness s.t.

Spending Zerocoin

Page 51: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

• Better approach

• Use an efficient one-way accumulator

• Accumulate to produce accumulator

• Then prove knowledge of a witness s.t.

Spending Zerocoin

H(C4)H(C1) H(C2) H(C3)

H(C1,C2)

H(C3,C4)

A

Page 52: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

• Better approach

• Use an efficient one-way accumulator

• Accumulate to produce accumulator

• Then prove knowledge of a witness s.t.

Spending Zerocoin

H(C4)H(C1) H(C2) H(C3)

H(C1,C2)

H(C3,C4)

A = sibling nodes

Page 53: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

• Problem:

• There are relatively few accumulators that meet our criteria

1. Computing the accumulator should not require any secrets (i.e., it’s publicly computable/verifiable)

2. There must be an efficient ZK proof of knowledge of a witness.

Spending Zerocoin

Merkle trees don’t (seem) to possess one

Merkle trees don’t (seem) to possess one

Page 54: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Strong RSA Accumulator(Benaloh & de Mare)

To accumulate primes compute:

An efficient ZKPoK proposed by

Camenisch/Lysyanskaya ’01!

An efficient ZKPoK proposed by

Camenisch/Lysyanskaya ’01!

Page 55: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

The protocol overview• The protocol:

• Generate random serial number S. Compute:

• (Retain S, commitment randomness )

• Accumulate all valid coins, compute witness

• Reveal S, prove knowledge of accumulator witnessand commitment randomness

s.t. C is prime,

Requires a DDL proof (~40kb)

Requires a DDL proof (~40kb)

Page 56: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Optimizations• Accumulator can be incrementally computed

• Don’t make Prover do it: have the miners computean accumulator ‘checkpoint’ each block

• This minimizes accumulator computation time

• Probabilistic verification

• The proof doesn’t need to be fully verified

• Verify random portions (reduces certainty)

Page 57: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Performance

Page 58: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

The upshot• I can take Bitcoin from my wallet

• Turn them into Zerocoins

• Where they get ‘mixed up’ with many other users’ coins

• I can redeem them to a new fresh Wallet

• Nobody will be able to link the new ones to the old!

Page 59: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Zerocoin

Decentralized

SecurePr

ivat

e

Page 60: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Divisible Zerocoin!• Make coins divisible!

• Include coin values in the commitment

• Users can insert ‘divide’ instructions that converta single Zerocoin into two separate coins thatsum to the original value

• Note: doesn’t even require ZK proofs!

Page 61: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Anonymous Credentials!• Wait a second: e-Cash is just a form of anonymous credential

• New systems like Namecoin allow us to establishidentities (with attributes, e.g., time identity established)

• By adding similar commitments to the identities/attributeswe can prove statements about our identity

• No trusted credential issuer

• Can use this to implement decentralizedanonymous reputation systems &‘subscription’ services to manage resourcesin ad-hoc networks!

Page 62: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

Can we build this today?• Short answer: yes and no

• We have code that does all of it(update to the bitcoind client)

• But to make this work we need to get the newtransactions built into Bitcoin

• The algorithms add cost to the Bitcoin networkand many will be unwilling to do this

Page 63: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

The future• There’s much more to talk about

• Can something like this be deployed?

• What are the ethics of doing it?

• What’s the future of Bitcoin as a technology? As a currency?

• What about identity management?

Page 64: Matthew Green Johns Hopkins University (Joint work with Ian Miers, Christina Garman, Avi Rubin)

blog.cryptographyengineering.com

spar.isi.jhu.edu/~mgreen/ZerocoinOakland.pdf

The paper:

zerocoin.org

Code & website (coming soon):