1
CS 134 CS 134 Wi Winter 2016 Anonymity Applica cation Example: - - PowerPoint PPT Presentation
CS 134 CS 134 Wi Winter 2016 Anonymity Applica cation Example: - - PowerPoint PPT Presentation
CS 134 CS 134 Wi Winter 2016 Anonymity Applica cation Example: Elect ctronic c Cash (E-Cash) and Bitco coin 1 Motivation For E-Cash Conventional Cash is: Counterfeitable Slow Costly Vulnerable Bad for Remote
2
Motivation For E-Cash
Conventional Cash is:
- Counterfeitable
- Slow
- Costly
- Vulnerable
- Bad for Remote Transactions
3
Credit Cards, Bank Cards, Checks, and Phone/Subway cards: Easy Fraud Little Privacy
4
Off-line Electronic Cash is for 2-Party (PayeràPayee) Payment
Deposit
Payment
Withdrawal
- Low Communication Requirements
5
In Contrast, On-line Payments:
“OK”
E-Cash in 1970s
- Stephen Wiesner‘s (graduate student at Columbia) paper “Conjugate Coding
and Quantum Money” sent in 1970 to IEEE Transactions on Information Theory
- Paper immediately rejected
- Published in 1983 as is in ACM SIGACT
- Proposed design of unforgaeble bank notes based on quantum properties
- Influenced Quantum (Cryptographic) Key Distribution (QKD)
E-Cash in 1980s and 1990s
- Chaum’s “Blind Signatures for Untraceable Payments” paper is the
first to propose (realizable) E-Cash using blind digital signatures
- Based on RSA (Rivest Shamir and Adelman) signatures
- RSA breaks if one can factor large composite numbers (100s of
decimal digits, 1000s of bits)
- DigiCash (anonymous ecash) launched by Chaum in 1990.
DigiCash declared bankruptcy in 1998.
1970s 2000s 1990s
Requirements for Anonymous Payments (afterwards known as E-Cash)
From Chaum’s “Blind Signatures for Untraceable Payments” paper:
- Unlinkability: third parties can not determine payee (amount
and time of payment)
- Provability: individuals can provide (unforgaeble) proof of
payment, or determine identity of payee under exceptional circumstance (e.g., by courts)
- Revocation: revoke stolen coins or payment media
Anonymous Payments
user 1 user 2
Anonymous Payments
user 1 user 2
Anonymous Payments
withdraw coins withdraw coins user 1 user 2
Anonymous Payments
user 1 user 2
transfer coins user 2
Anonymous Payments
Was it user 1 or user 2?
user 2
Anonymous Payments
15
Overspending: Problem with Off-line E-Cash
Step 1: The bad user copies his money
16
Step 2: The bad user gives copied cash to multiple people
17
The Bank is aware of trouble only later
!!!
18
1.
Use tamper-resistant hardware to prevent over- spending (e.g., MONDEX in Europe)
2.
Trace over-spenders
3.
Blacklist over-spenders
4.
Put a bound on dollar-value for off-line transactions
Techniques to Contain Over-Spending
19
Tracing be used to fight big-time international crime
But, tracing could be abused on many levels
20
Minting the Money/Coins
Heart of Each Coin is a Digital Signature
Secret Minting Key to Create Coins (Signatures)
Public Verification Key to Recognize Coins
21
Minting a Conventional Coin
E-Cash Withdrawer
SN= 12345 SN = 12345 BankSig SN= 12345 SN = 12345 BankSig
The Mint
22
Without Anonymity Mint Knows Serial Number
One Dollar
SN 12345
The Mint E-Cash Withdrawer $1 signing key
23
Minting an Untraceable Coin
E-Cash User The Mint
SN= 12345 SN = 12345 BankSig BankSig BankSig
24
Blind Signing is (Like) Signing Through a Veil
One Dollar
The Mint $1 signing key E-Cash Withdrawer
25
Minting a Trustee-Traceable Coin
E-Cash User The Mint
SN= 12345 SN = 12345 BankSig BankSig BankSig
26
Escrowing Trustee-Traceable Coins
SN= 12345
E-Cash User
Trustee 1 Trustee 2 escrow key1 escrow key2
27
Recall: Cryptographic Assumptions
Infeasible Tasks
- 1. Factoring. Given a number N = pq, find p and q
primes of at least 2048 bits
- 1a. RSA assumption.
Given exponent e and me (mod N), find m
28
- 2. Discrete log. Given a prime p, a generator g,
and gx (mod p), find x Infeasible Tasks
(continued)
- f at least 2048 bits
Recall: Cryptographic Assumptions
29
Example of Coin Minting
Public Information:
N H()
- - Large Composite Number
- - Cryptographic hash function
Private Minting Information: Key = p,q prime numbers such that N=pq A coin has the form: (x,H(x)d mod N), 1 < x < N
30
Minting a Conventional Coin with RSA (Traceable)
E-Cash User The Mint
x,H(x)
x,H(x)d
x,H(x)
x,H(x)d
31
x H(x) H(x)d mod N
Anti-counterfeiting Assumption:
Without knowing the key, it is difficult to find pre-images that map to the same point
= p,q
Where: d = e-1 mod phi(N)
Blind (Digital) Signatures
- Message is blinded (disguised or randomized) before it is signed
- Signature can be publicly verified against the original message
(unblinded one) similar to a standard digital signature
- Typically employed in privacy-preserving protocols where signer
and author of message are different entities
- Main goal is to provide unlinkability: prevent signer from linking
the blinded message it signs to a later un-blinded version that it may be called upon to verify
Anonymous Payments via Blind Signatures
(to withdraw coins: obtain Bank’s signature on a coin (m))
(6) I got this coin: sig(m) for coin m Was it M?
(4) transfer coins: sig(m) (1) send blinded coin/message (m’) (2) sign coin: sig(m’) (3) unblind the coin to obtain sig(m)
(6) Not sure!? I saw a random value: m’
(5) receive goods or services
34
Blind Digital Signatures à Payer’s Privacy [Chaum]
E-Cash User The Mint
chooses random
x,r
x,H(x)
x, H(x)d
reH(x) reH(x)
rH(x)d rH(x)d
RSA-based Blind Signatures
- Public key (e, N) and corresponding private key (d, p, q), such that N =p*q
and e*d = 1 mod Φ(N)
- Choose a random r coprime to N, i.e., GCD(r, N) = 1. re mod N is then used
as a blinding factor. (GCD = greatest common divisor)
- m’ = m * re mod N ( m’ is random, does not leak any info about m)
- m’ is sent to the signing authority who signs it as
- s’ = (m’)d mod N = md * red mod N = md * r mod N
- s’ is sent back to the message owner who unblinds it by multiplying by r-1 to
- btain the signature s = md mod N
Anonymous Payments via RSA-based Blind Signatures
(to withdraw coins: obtain Bank’s signature on a coin (m))
(6) I got this coin: s = md * modN Was it M?
(4) transfer coins: send coin s (1) m’ = m * re modN (2) s’ = md * r modN (3) s = s’ * r-1 modN = md * modN
(6) Not sure!? I saw a random value: s’ = md * r modN
(5) receive goods or services
37
- p1, p2: two large prime numbers such that p2 | p1-1
- G: subgroup of Zp1 such that |G| = p2
- g: generator of G
- I: the user’s identity (set up by bank),
expressed as a number
*
= Coin = (ga mod p1, gb mod p1, H(ga,gb)d mod N) where I = ab mod p2
Tracing Double-Spenders
38
Buyer
ga mod p1, gb mod p1, H(ga,gb)1/3
Seller
- verify Bank’s signature
- send random challenge k
- verify gr=(ga)kgb
k
r = ak+b
r
Tracing Double-Spenders
39
Two Payments with the same coin yield Buyer’s Identity r = ak + b r’ = ak’ + b
a,b
I
Tracing Double-Spenders
r = ak + b
a?,b?
?
A lot of E-Cash and anonymous payment schemes followed similar blueprints in the 1990s and early 2000s
2009-2016
- 2009: Bitcoin paper by Satoshi Nakamoto
- Pseudonym for individual or a group
- 2009-2011: slow start …
- 2011-2013: Silk Road and Dread Pirate Roberts
- End 2013: Bitcoin price skyrockets
- a lot of people notice
- 2014-2015: Price drops by 75%
- 2016: Price up again
In 2016
Large Ecosystem Market Capitalization over $4 Billion ($8.2 Billion a year ago) Number of transactions growing steadily
Bitcoin (BTC) Preliminaries
- Cryptographic Hash Function: a hash function that is hard to
invert, i.e., computationally infeasible to recreate data from hash value alone, e.g., the secure hash algorithm (SHA)
- Required properties of a Cryptographic Hash Function:
i. easy to compute hash value h( ) of any message m ii. given h(m) it is (computationally) infeasible to recover m iii. infeasible to modify m without h(m) being also modified iv. infeasible to find two different m with same hash (collision resistance)
- Proof-of-Work Schemes/Protocols: originally invented as an
economic measure to prevent denial-of-service and spam by requiring clients to solve computationally-demanding puzzles, e.g., find a number that has a certain preamble (say 3 zeros) in its hash
Stepping Back
Stepping back: most physical and digital currencies today effectively exist in the form of a ledger.
Electronic Accounts in Banks Blockcain in Bitcoin (BTC)
Questions Answered by Bitcoin (BTC)
How to maintain integrity of a public ledger in a distributed manner (BTC answer: longest chain of verified transactions) How to use such a ledger for transactions (BTC answer: transferring coins via signatures) How to incentivize people to allocate CPU power to ensure integrity of the longest chain (BTC answer: reward with new minted coins when verifying transactions, also called mining)
Bitcoin’s Peer-to-Peer Network
- A peer-to-peer network without any “central” authority
for ensuring integrity of transactions and keeping track of
- wnership of (Bit)coins (and minting them)
- Ledger and history of ALL transactions are public and
available for anyone to inspect
Transactions in Bitcoin
Owner 0 is transferring Coin(s) to Owner 1 A (Bit)coin is defined as a chain of digital signatures.
Timestamps in Bitcoin
- Hash a block of items (transactions) to be time stamped and widely
publish the hash
- The time stamp proves that data must have existed in order to have
gotten into the hash
- Each timestamp includes previous timestamp in the hash, forming
chain (the Btitcoin blockchain)
- Each additional time stamp reinforces the ones before it
Hash Hash Block Item Item … Block Item Item …
Proof-of-Work (PoW) and Incentives in Bitcoin
- PoW in Bitcoin is finding a value that when hashed (SHA-256) the
hash begins with a certain number of zeros (control of difficulty level)
- Incentive for Mining/Ensuring Integrity of Blockchain: The first
transaction in a block is a special transaction that starts a new coin owned by the creator of the block.
Block Tx Tx … Previous Hash Nonce (to be found) Block Tx Tx … Previous Hash Nonce (to be found)
Operation of Bitcoin’s Network
1) New transactions are broadcast to all nodes 2) Each node collects new transactions into a block 3) Each node works on finding a difficult proof-of-work for its block 4) When a node finds a proof-of-work, it broadcasts the block to all nodes 5) Nodes accept block only if all transactions in it are valid and not already spent 6) Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash
51% Attack
Blockchain Size
More Features of Bitcoin
Additional Features:
– Saving disk space by using hash (Merkle) trees to compress history of coins – Allow multiple inputs and
- utputs to be
handled with one transaction
Alternative Coins (Alt-Coins)
Digital Currency Scheme Centralized/ Decentralized Can be Regulated? Security Guarantees Privacy/Anonymity Guarantees Resilience Guarantees Bitcoin, Namecoin Fully (P2P) Decentralized No SHA-256 proof-of- work Unrecoverable (but Linkable) Anonymity P2P Decentralized Ledger Litecoin Fully (P2P) Decentralized No Scrypt-based proof-of-work Unrecoverable (but Linkable) Anonymity P2P Decentralized Ledger Zerocoin Fully (P2P) Decentralized No SHA-256 proof-of- work Unrecoverable, Unlinkable Anonymity P2P Decentralized Ledger PPcoin Fully (P2P) Decentralized No SHA-256 proof-of- work/proof-of- stake Unrecoverable (but Linkable) Anonymity P2P Decentralized Ledger Ripple Fully (P2P) Decentralized No Trust-based consensus Anonymity Level Varies P2P Decentralized Ledger
–Essentially all following the Bitcoin blueprint –Ethereum is the new kid on the block (smart
contracts via a “Turing complete” language)