SlideShare a Scribd company logo
1 of 48
Cryptocurrency Cabal
cs4501 Fall 2015
David Evans and Samee Zahur
University of Virginia
Class 7:
The
Blockchain
1
Plan for Today
Trust
Distributed
Consensus
Proof-of-Work
Blockchain
2
Next Wednesday: Checkup 2
Classes through next Monday
Checkup 1, PS1
Readings:
Satoshi paper
Antonopoulos book: Ch 6 and
7
Princeton book: Ch 2 and 5
Where does trust come from?
3
4
http://www.jdsurvey.net/jds/jdsurveyMaps.jsp
5
Image credit:
https://howveryromanian.wordpress.com/2013/09/15/ba
Queuing for cooking oil (Bucharest, 1986)
Scott Edelman
6Image: Queerbubbles CC BY-SA
7
Sources of Trust
Yourself (super trustworthy!)
Mathematics and Science
Trustworthy because of logic, verified experiments
Organizations and People
Trustworthy because of what they have to lose (reputation)
Trustworthy because of trusted oversight (law, police)
Trustworthy because incentives are aligned
Trustworthy because of processes they follow
8
9
Bitcoin’s solution: a public ledger
Trust in resources
Public Ledger
10
Node A Node B Node C
M = transfer X to Bob SignKRA
[H(M)]
Bob wants to verify:
1. Alice hasn’t already transferred X
2. The coin will be valuable for Bob
Public Ledger: Distributed Trust (?)
11
Node A Node B Node C
M = transfer X to Bob
Bob wants to verify:
1. Alice hasn’t already transferred X
2. The coin will be valuable for Bob
tb
tb
tb tb
SignKRA
[H(M)]
12
Node A Node B Node C
M = transfer X to Bob
Bob wants to verify:
1. Alice hasn’t already transferred X
2. The coin will be valuable for Bob
tb
tb
tb tb
ok!
ok!
t
Transactions
1 tb (X->Bob)
Transactions
1 tb (X->Bob)
SignKRA
[H(M)]
13
Node A Node B Node C
Bob wants to verify:
1. Alice hasn’t already transferred X
2. The coin will be valuable for Bob
tb
tb
tb tb
ok!
ok!
t
Transactions
1 tb (X->Bob)
Transactions
1 tb (X->Bob)
14
Node A Node B Node C
M = transfer X to Cathy
tc
tc
tc tc
BAD!
t
Transactions
1 tb (X->Bob)
Transactions
1 tb (X->Bob)
Transactions
1 tc (X->Cathy)
SignKRA
[H(M)]
Scaling the Network
15
Node A Node B Node C
ta
tb
tb
Node D Node E Node F Node G
Blockchain
16
Public ledger without fixed set of nodes – decentralized, distributed trust
Requires coalition with majority of computing power to collude to cheat
Blockchain
17
B0
H(B0) Nonce
Transactions
H(B1) Nonce
Transactions
H(B2) Nonce
Transactions
Inconsistent Blockchains
18
Node A Node B Node C
Node D Node E Node F Node G
How do we know
which blockchain is
“correct”?
19
CRYPTO 1992
Cynthia Dwork
(now at MSR)
Moni Naor
(Weizmann Institute)
20
Idea: Proof-of-Work
Pricing Function: (f)
- moderately easy to compute
- cannot be amortized
computing f(m1),…, f(ml) costs l times as
much as computing f(mi).
- easily verified: given x, y easy to check y = f(x)
21
Proposed Pricing Function
22
Extracting Square Roots
index: p
find x, y such that y2 = x mod p
Dwork and Naor proposed two other pricing
functions, designed to have “shortcuts” (backdoors)
to allow administrators to compute them efficiently.
Hashcash
Adam Back
1997
23
Interactive Hashcash
24
mail sender
mail recipient’s
server
Hello
Challenge: r
r  random nonce
Everyone agrees on one-way function f
Interactive Hashcash
25
mail sender
mail recipient’s
server
Hello
Challenge: r
r  random nonce
search for x such that
f(x) = r
Everyone agrees on one-way function f
(x, Mail)
Interactive Hashcash
26
mail sender
mail recipient’s
server
Hello
Challenge: r
r  random nonce
search for x such that
f(x) = r
Everyone agrees on one-way function f
(x, Mail) Verify f(x) = r
Interactive Hashcash
27
mail sender
mail recipient’s
server
Hello
Challenge: r
r  random nonce
search for x such that
f(x) = r
Everyone agrees on one-way function f
(x, Mail) Verify f(x) = r
Can we make this non-interactive?
Non-Interactive Hashcash
28
mail sender
mail recipient’s
server
Everyone agrees on one-way function f
Verify
Non-Interactive Hashcash
29
mail sender
mail recipient’s
server, s
Everyone agrees on one-way function f
How well would this work if f is SHA-256?
msg || x
Verify f(msg || x) = s
Pre-image Attack on SHA-256
30
search for x such that
f(msg || x) = s
31
Estimated hash rate of entire bitcoin network:
441,695,290 GH/s
32
Variable-Difficulty f
33
Challenge: r, Difficulty: d
Find an x such that:
SHA-256(msg || x) < T/d T is some set “target”.
If the difficulty doubles, how much more work is expected?
Bitcoin’s Proof-of-Work
34
Find an x such that:
SHA-256(SHA-256(r + x)) < T/d
Why use double SHA-256?
35
http://crypto.stackexchange.com/questions/779/hashing-or-encrypting-twice-to-increase-security
36
https://bitcointalk.org/index.php?topic=45456.0;all
37https://bitcoinwisdom.com/bitcoin/difficulty
Difficulty adjusts (every 2016
blocks) to keep block-finding
time around 10 minutes
38https://bitcoinwisdom.com/bitcoin/difficulty
Finding the Next Block
39
B0
H(B0) Nonce
Transactions
H(B1) Nonce
Transactions
H(B2) Nonce
Transactions
Find a nonce x such that:
SHA-256(SHA-256(r + x)) < T/d
Finding the Next Block
40
B0
H(B0) Nonce
Transactions
H(B1) Nonce
Transactions
H(B2) Nonce
Transactions
Find a nonce x such that:
SHA-256(SHA-256(r + x)) < T/d
r = header + transactions (including mining fee)
header = H(previous block)
Actual Bitcoin Block
41
https://en.bitcoin.it/wiki/Protocol_documentation#Block_Headers
Inconsistent Blockchains
42
Node A Node B Node C
Node D Node E Node F Node G
The longest blockchain
is the “right” one.
43
44
What happened to proof-of-work
for sending email?
45
46
Instead of making computers
do inane, repetitive work to
prevent mass automation, we
make humans do inane, soul-
killing work!
Charge
Readings:
Satoshi paper
Antonopoulos book: Chapters 6 and 7
Princeton book: Chapters 2 and 5
Wednesday: Checkup 2
47

More Related Content

What's hot

What's hot (16)

Hash function
Hash functionHash function
Hash function
 
ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...
ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...
ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...
 
Computing on Encrypted Data
Computing on Encrypted DataComputing on Encrypted Data
Computing on Encrypted Data
 
Introduction to Homomorphic Encryption
Introduction to Homomorphic EncryptionIntroduction to Homomorphic Encryption
Introduction to Homomorphic Encryption
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic Encryption
 
CRC JAVA CODE
CRC JAVA CODECRC JAVA CODE
CRC JAVA CODE
 
Partial Homomorphic Encryption
Partial Homomorphic EncryptionPartial Homomorphic Encryption
Partial Homomorphic Encryption
 
RSA cracking puzzle
RSA cracking puzzleRSA cracking puzzle
RSA cracking puzzle
 
A survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic EncryptionA survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic Encryption
 
LCS35
LCS35LCS35
LCS35
 
Cyclic code non systematic
Cyclic code non systematicCyclic code non systematic
Cyclic code non systematic
 
Secure and privacy-preserving data transmission and processing using homomorp...
Secure and privacy-preserving data transmission and processing using homomorp...Secure and privacy-preserving data transmission and processing using homomorp...
Secure and privacy-preserving data transmission and processing using homomorp...
 
RSA without Padding
RSA without PaddingRSA without Padding
RSA without Padding
 
Deep dive into rsa
Deep dive into rsaDeep dive into rsa
Deep dive into rsa
 
An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)
 
Cyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionCyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor Function
 

Similar to The Blockchain

Crypto Jamming
Crypto JammingCrypto Jamming
Crypto Jamming
Melanie Swan
 
20101017 program analysis_for_security_livshits_lecture02_compilers
20101017 program analysis_for_security_livshits_lecture02_compilers20101017 program analysis_for_security_livshits_lecture02_compilers
20101017 program analysis_for_security_livshits_lecture02_compilers
Computer Science Club
 

Similar to The Blockchain (20)

A Signature Algorithm Based On Chaotic Maps And Factoring Problems
A Signature Algorithm Based On Chaotic Maps And Factoring ProblemsA Signature Algorithm Based On Chaotic Maps And Factoring Problems
A Signature Algorithm Based On Chaotic Maps And Factoring Problems
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Blockchain introduction
Blockchain introductionBlockchain introduction
Blockchain introduction
 
Security of Artificial Intelligence
Security of Artificial IntelligenceSecurity of Artificial Intelligence
Security of Artificial Intelligence
 
How to verify computation in the blink of an eye
How to verify computation in the blink of an eyeHow to verify computation in the blink of an eye
How to verify computation in the blink of an eye
 
The Mathematics Behind Bitcoin
The Mathematics Behind BitcoinThe Mathematics Behind Bitcoin
The Mathematics Behind Bitcoin
 
Blockchain: The New Technology of Trust
Blockchain: The New Technology of TrustBlockchain: The New Technology of Trust
Blockchain: The New Technology of Trust
 
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
 
Token btlcoin btlcoin
Token btlcoin btlcoinToken btlcoin btlcoin
Token btlcoin btlcoin
 
Token btlcoin
Token btlcoinToken btlcoin
Token btlcoin
 
Bitcoin MOOC Lecture 1.pptx
Bitcoin MOOC Lecture 1.pptxBitcoin MOOC Lecture 1.pptx
Bitcoin MOOC Lecture 1.pptx
 
Crypto Jamming
Crypto JammingCrypto Jamming
Crypto Jamming
 
20101017 program analysis_for_security_livshits_lecture02_compilers
20101017 program analysis_for_security_livshits_lecture02_compilers20101017 program analysis_for_security_livshits_lecture02_compilers
20101017 program analysis_for_security_livshits_lecture02_compilers
 
Modularity for Accurate Static Analysis of Smart Contracts
Modularity for Accurate Static Analysis of Smart ContractsModularity for Accurate Static Analysis of Smart Contracts
Modularity for Accurate Static Analysis of Smart Contracts
 

More from David Evans

More from David Evans (20)

Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in Bitcoin
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm Confirmations
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting Transactions
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in Paradise
 
Mining Economics
Mining EconomicsMining Economics
Mining Economics
 
Mining
MiningMining
Mining
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More Paranoid
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key Signatures
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the Masses
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of Reserve
 
Silk Road
Silk RoadSilk Road
Silk Road
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, Permacoin
 
Alternate Cryptocurrencies
Alternate CryptocurrenciesAlternate Cryptocurrencies
Alternate Cryptocurrencies
 
Script
ScriptScript
Script
 
Selfish Mining
Selfish MiningSelfish Mining
Selfish Mining
 
Quiz 2: Bitcoin Protocol, Mining, Supsersizing
Quiz 2: Bitcoin Protocol, Mining, SupsersizingQuiz 2: Bitcoin Protocol, Mining, Supsersizing
Quiz 2: Bitcoin Protocol, Mining, Supsersizing
 
Mostly About Superfish
Mostly About SuperfishMostly About Superfish
Mostly About Superfish
 
Mining Pools and Profits
Mining Pools and ProfitsMining Pools and Profits
Mining Pools and Profits
 

Recently uploaded

MASTERING FOREX: STRATEGIES FOR SUCCESS.pdf
MASTERING FOREX: STRATEGIES FOR SUCCESS.pdfMASTERING FOREX: STRATEGIES FOR SUCCESS.pdf
MASTERING FOREX: STRATEGIES FOR SUCCESS.pdf
Cocity Enterprises
 

Recently uploaded (20)

Escorts Indore Call Girls-9155612368-Vijay Nagar Decent Fantastic Call Girls ...
Escorts Indore Call Girls-9155612368-Vijay Nagar Decent Fantastic Call Girls ...Escorts Indore Call Girls-9155612368-Vijay Nagar Decent Fantastic Call Girls ...
Escorts Indore Call Girls-9155612368-Vijay Nagar Decent Fantastic Call Girls ...
 
Vip Call Girls Rasulgada😉 Bhubaneswar 9777949614 Housewife Call Girls Servic...
Vip Call Girls Rasulgada😉  Bhubaneswar 9777949614 Housewife Call Girls Servic...Vip Call Girls Rasulgada😉  Bhubaneswar 9777949614 Housewife Call Girls Servic...
Vip Call Girls Rasulgada😉 Bhubaneswar 9777949614 Housewife Call Girls Servic...
 
MASTERING FOREX: STRATEGIES FOR SUCCESS.pdf
MASTERING FOREX: STRATEGIES FOR SUCCESS.pdfMASTERING FOREX: STRATEGIES FOR SUCCESS.pdf
MASTERING FOREX: STRATEGIES FOR SUCCESS.pdf
 
W.D. Gann Theory Complete Information.pdf
W.D. Gann Theory Complete Information.pdfW.D. Gann Theory Complete Information.pdf
W.D. Gann Theory Complete Information.pdf
 
Call Girls in Benson Town / 8250092165 Genuine Call girls with real Photos an...
Call Girls in Benson Town / 8250092165 Genuine Call girls with real Photos an...Call Girls in Benson Town / 8250092165 Genuine Call girls with real Photos an...
Call Girls in Benson Town / 8250092165 Genuine Call girls with real Photos an...
 
Toronto dominion bank investor presentation.pdf
Toronto dominion bank investor presentation.pdfToronto dominion bank investor presentation.pdf
Toronto dominion bank investor presentation.pdf
 
Kurla Capable Call Girls ,07506202331, Sion Affordable Call Girls
Kurla Capable Call Girls ,07506202331, Sion Affordable Call GirlsKurla Capable Call Girls ,07506202331, Sion Affordable Call Girls
Kurla Capable Call Girls ,07506202331, Sion Affordable Call Girls
 
Mahendragarh Escorts 🥰 8617370543 Call Girls Offer VIP Hot Girls
Mahendragarh Escorts 🥰 8617370543 Call Girls Offer VIP Hot GirlsMahendragarh Escorts 🥰 8617370543 Call Girls Offer VIP Hot Girls
Mahendragarh Escorts 🥰 8617370543 Call Girls Offer VIP Hot Girls
 
✂️ 👅 Independent Bhubaneswar Escorts Odisha Call Girls With Room Bhubaneswar ...
✂️ 👅 Independent Bhubaneswar Escorts Odisha Call Girls With Room Bhubaneswar ...✂️ 👅 Independent Bhubaneswar Escorts Odisha Call Girls With Room Bhubaneswar ...
✂️ 👅 Independent Bhubaneswar Escorts Odisha Call Girls With Room Bhubaneswar ...
 
Technology industry / Finnish economic outlook
Technology industry / Finnish economic outlookTechnology industry / Finnish economic outlook
Technology industry / Finnish economic outlook
 
Thane Call Girls , 07506202331 Kalyan Call Girls
Thane Call Girls , 07506202331 Kalyan Call GirlsThane Call Girls , 07506202331 Kalyan Call Girls
Thane Call Girls , 07506202331 Kalyan Call Girls
 
Pension dashboards forum 1 May 2024 (1).pdf
Pension dashboards forum 1 May 2024 (1).pdfPension dashboards forum 1 May 2024 (1).pdf
Pension dashboards forum 1 May 2024 (1).pdf
 
logistics industry development power point ppt.pdf
logistics industry development power point ppt.pdflogistics industry development power point ppt.pdf
logistics industry development power point ppt.pdf
 
GIFT City Overview India's Gateway to Global Finance
GIFT City Overview  India's Gateway to Global FinanceGIFT City Overview  India's Gateway to Global Finance
GIFT City Overview India's Gateway to Global Finance
 
Q1 2024 Conference Call Presentation vF.pdf
Q1 2024 Conference Call Presentation vF.pdfQ1 2024 Conference Call Presentation vF.pdf
Q1 2024 Conference Call Presentation vF.pdf
 
Explore Dual Citizenship in Africa | Citizenship Benefits & Requirements
Explore Dual Citizenship in Africa | Citizenship Benefits & RequirementsExplore Dual Citizenship in Africa | Citizenship Benefits & Requirements
Explore Dual Citizenship in Africa | Citizenship Benefits & Requirements
 
Call Girls Howrah ( 8250092165 ) Cheap rates call girls | Get low budget
Call Girls Howrah ( 8250092165 ) Cheap rates call girls | Get low budgetCall Girls Howrah ( 8250092165 ) Cheap rates call girls | Get low budget
Call Girls Howrah ( 8250092165 ) Cheap rates call girls | Get low budget
 
cost-volume-profit analysis.ppt(managerial accounting).pptx
cost-volume-profit analysis.ppt(managerial accounting).pptxcost-volume-profit analysis.ppt(managerial accounting).pptx
cost-volume-profit analysis.ppt(managerial accounting).pptx
 
Premium Call Girls Bangalore Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
Premium Call Girls Bangalore Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...Premium Call Girls Bangalore Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
Premium Call Girls Bangalore Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
Collecting banker, Capacity of collecting Banker, conditions under section 13...
Collecting banker, Capacity of collecting Banker, conditions under section 13...Collecting banker, Capacity of collecting Banker, conditions under section 13...
Collecting banker, Capacity of collecting Banker, conditions under section 13...
 

The Blockchain