SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere Àhnliche Inhalte

Was ist angesagt?

Was ist angesagt? (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
 

Ähnlich wie The Blockchain

Hashfunction
HashfunctionHashfunction
Hashfunction
James Wong
 
Hashfunction
HashfunctionHashfunction
Hashfunction
David Hoen
 
Hashfunction
HashfunctionHashfunction
Hashfunction
Fraboni Ec
 
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
 

Ähnlich wie 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
 

Mehr von David Evans

Mehr von 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
 

KĂŒrzlich hochgeladen

VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
VIP Independent Call Girls in Andheri đŸŒč 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri đŸŒč 9920725232 ( Call Me ) Mumbai Escorts...VIP Independent Call Girls in Andheri đŸŒč 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri đŸŒč 9920725232 ( Call Me ) Mumbai Escorts...
dipikadinghjn ( Why You Choose Us? ) Escorts
 

KĂŒrzlich hochgeladen (20)

Independent Call Girl Number in Kurla MumbaiđŸ“Č Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla MumbaiđŸ“Č Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla MumbaiđŸ“Č Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla MumbaiđŸ“Č Pooja Nehwal 9892124323 💞 Full ...
 
00_Main ppt_MeetupDORA&CyberSecurity.pptx
00_Main ppt_MeetupDORA&CyberSecurity.pptx00_Main ppt_MeetupDORA&CyberSecurity.pptx
00_Main ppt_MeetupDORA&CyberSecurity.pptx
 
The Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdfThe Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdf
 
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
 
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
 
Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024
 
Gurley shaw Theory of Monetary Economics.
Gurley shaw Theory of Monetary Economics.Gurley shaw Theory of Monetary Economics.
Gurley shaw Theory of Monetary Economics.
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
 
Basic concepts related to Financial modelling
Basic concepts related to Financial modellingBasic concepts related to Financial modelling
Basic concepts related to Financial modelling
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdf
 
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service NashikHigh Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
 
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
 
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
 
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
 
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
 
VIP Independent Call Girls in Andheri đŸŒč 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri đŸŒč 9920725232 ( Call Me ) Mumbai Escorts...VIP Independent Call Girls in Andheri đŸŒč 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri đŸŒč 9920725232 ( Call Me ) Mumbai Escorts...
 
Top Rated Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
Top Rated  Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...Top Rated  Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
Top Rated Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
 
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
 
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsHigh Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Indore Real Estate Market Trends Report.pdf
Indore Real Estate Market Trends Report.pdfIndore Real Estate Market Trends Report.pdf
Indore Real Estate Market Trends Report.pdf
 

The Blockchain