SlideShare a Scribd company logo
1 of 38
||
Presenter: Hang Tong
1.12.2014 1
Bitcoin:
A Peer-to-Peer Electronic Cash System
[Nakamoto, 2009]
||
 Motivation of Bitcoin
 Underlying data structure of Bitcoin
 Accounting with Bitcoin
 Mathematical background of Bitcoin security
 Underlying data structure for efficiency
1.12.2014 2
Overview
||
 ”Improve the existing electronic cash system”
 Ecash [David Chaum, 1983]
 Transaction with 3rd party
 Rely on 3rd party
 Subject to financial
situation of bank
 Problems
 3rd party may bankrupt
 Vulnerable to the
financial crisis
(Remember “Lehman shock”)
1.12.2014 3
The motivation of Bitcoin
Existing electronic cash system
(Trust based model)
||
 ”Create new currency w/o central organization !”
 How do we create currency?
 Currency must be trusted
by everyone spending it
 Existing system
 3rd party guarantees the value of currency
-> How ?
1.12.2014 4
The motivation of Bitcoin: Eliminating 3rd party
||
 Source of trust: transaction record
 They know ALL the transaction history
 Prevent mainly 2 things
1. Double-Spending Problem :
To copy and pay same coin for different person
2. Coin robbery :
To change the history of transaction
and get someone’s coin
1.12.2014 5
How do 3rd parties guarantee the value?
Existing electronic coin system
(Trust based model)
A -> B: 5 CHF
D -> C: 100 CHF
A -> C: 7 CHF
…
||
 They know ALL the transaction history
 Prevents mainly 2 things
1. Double-Spending Problem
To spend same coin for different payment.
1.12.2014 6
Double-Spending Problem
Your successive
transactions have same
coin IDs.
Payment Invalid.
I wanna do
Me -> A: 5 CHF
Me -> B: 5 CHF
at the same time
with same coin,man.
||
 They know ALL the transaction history
 Prevents mainly 2 things
1. Double-Spending Problem
2. Coin robbery :
To change the history of transaction
and get someone’s coin
1.12.2014 7
Coin robbery
A -> B: 5 CHF
D -> C: 100 CHF
A -> C: 7 CHF
…
I wanna change
D -> C: 100 CHF
Into
D -> Me: 100CHF
But I can’t…damn!
||
 They know ALL the transaction history
 Prevents mainly 2 things
1. Double-Spending Problem
2. Coin robbery :
To change the history of transaction
and get someone’s coin
 How do we substitute 3rd party?
-> Blockchain ! [Nakamoto, 2009]
1.12.2014 8
How do we eliminate the 3rd party?
||
 Block: A group of transactions (transferring of currency)
 Blockchain: A sequence of Blocks
 Rule: The longest chain is always true
1.12.2014 9
Blockchain: New form of transaction record
Tx
Previous
block
hash Integer
Tx
A -> B: 10 CHF C -> D: 2 CHF
||
 Everyone trusts the longest chain to be true history
 Free to extend the chain, and the block will be verified by others
 Once you get behind, it is really hard to catch up with the top block -> Why ?
1.12.2014 10
Blockchain: in P2P network
P2P network
||
 Proof of work
 Meant to be
time-consuming math problem
-> Require about 10 minutes to solve
 Block is created only after finding the nonce(integer) s.t.
hash(nonce+other data) = 000…05fs2ce91a
 If someone tries to change Tx1
-> They have to find another corresponding nonce
-> Same work must be done for subsequent blocks
1.12.2014 11
Blockchain: Proof of Work
Tx
1
Tx
2
Tx
3
Tx
4
Tx
5
Tx
6
Unjustified
Transactions
Tx1
Previous
block
hash nonce hash
n
|| 1.12.2014 12
Blockchain: How does it get added?
Transaction
Tx
1
Tx
2
Tx
3
Tx
4
Tx
5
Tx
6
Unjustified
Transactions
Block Block Block
Current blocks
Finding a nonce
cast
Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block
|| 1.12.2014 13
Block & Transaction creation
Transaction
Tx
1
Tx
2
Tx
3
Tx
4
Tx
5
Tx
6
Unjustified
Transactions
Block Block Block
Current blocks
New block
With tx4
New block
With tx4
New block
With tx5
Finding a nonce
|| 1.12.2014 14
Block & Transaction creation
Transaction
Tx
1
Tx
2
Tx
3
Tx
4
Tx
5
Tx
6
Unjustified
Transactions
Block Block Block
Current blocks
New block
With tx4
New block
With tx4
New block
With tx5
“I found the
answer!”
|| 1.12.2014 15
Block & Transaction creation
Transaction
Tx
1
Tx
2
Tx
3
Tx
4
Tx
5
Tx
6
Unjustified
Transactions
Block Block Block
Current blocks
New
block
With tx4
New block
With tx4
New block
With tx5
Block candidates
nonce
|| 1.12.2014 16
Block & Transaction creation
Transaction
Tx
1
Tx
2
Tx
3
Tx
4
Tx
5
Tx
6
Unjustified
Transactions
Block Block Block
Current blocks
New
block
With tx4
Block candidates
“Is nonce correct?”
(easy work)
“Let’s check the validity of
each transactions”
nonce
|| 1.12.2014 17
Block & Transaction creation
Transaction
Tx
1
Tx
2
Tx
3
Tx
4
Tx
5
Tx
6
Unjustified
Transactions
Block Block Block
Current blocks
New
block
With tx4
Block candidates
“Correct!” ”I don’t give a shit”“Correct!” “Correct!”
4/5 agreed.
“I’m sure it’s
correct, huh”
|| 1.12.2014 18
Block & Transaction creation
Transaction
Tx
1
Tx
2
Tx
3
Tx
4
Tx
5
Tx
6
Unjustified
Transactions Current blocks
Block Block Block
New
block
With tx4
Every node updates their
block
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Once it gets accepted,
NO incentive for ignoring it
|| 1.12.2014 19
Block & Transaction creation
Transaction
Tx
1
Tx
2
Tx
3
Tx
4
Tx
5
Tx
6
Unjustified
Transactions
Block Block Block
Current blocks
New
block
With tx4
The block creator can get a bitcoin
This incident will be written on the new block
|| 1.12.2014 20
Blockchain security
Block Block Block
New
block
With tx4
 Let us recall…
how does blockchain cope with…
1. Double-Spending Problem ?
2. Coin robbery ?
|| 1.12.2014 21
Blockchain against Double-Spending Problem
1. Double-Spending Problem
 Each Transaction has coin’s hash
 Blockchain does not allow transactions to
have the same coin hash
 If same coin hash found in 2 transactions,
only one will be valid
Tx1
Previous
block
hash Integer
- Coin’s hash
- Sender ID
- Receiver ID
Transaction
In more detail…
- Coin’s hash: hash of previous tx
- Sender ID: Sender’s digital signature
- Receiver ID: Receiver’s public key
|| 1.12.2014 22
Blockchain against Coin robbery
2. Coin robbery
 He might change the
transaction arbitrarily
-> Actually, he can
 However…
A lot of Proof of Work are
waiting for him !
Tx1Previous
block
hash Nonce
Previous
block
I can modify the
transaction like:
Before:
Alice -> Bob:
100 Bitcoin
After:
AliceMe:
100 Bitcoin
|| 1.12.2014 23
Blockchain against Coin robbery
2. Coin robbery
 He might change the
transaction arbitrarily
-> Actually, he can
 However…
A lot of Proof of Work are
waiting for him !
 The modification for block
makes hash completely different
-> He needs to find the new nonce accordingly
-> 10 minutes work on average
Tx1Previous
block
hash Nonce
Previous
block
I can modify the
transaction like:
Before:
Alice -> Bob:
100 Bitcoin
After:
AliceMe:
100 Bitcoin
|| 1.12.2014 24
Can attacker catch up with the top block?
Block Block Block
Attacker is
modifying
Honest nodes
are creating
|| 1.12.2014 25
Can attacker catch up with the top block?
Block Block Block
Honest nodes
are creating
Attacker is
modifying
Block
|| 1.12.2014 26
Can attacker catch up with the top block?
Block Block Block
Honest nodes
are creating
Attacker is
modifying
Block
|| 1.12.2014 27
Can attacker catch up with the top block?
Block Block Block
Honest nodes
are creating
Attacker is
modifying
Block Block
He cannot catch up as long as majority of nodes are honest !
||
 Is it really impossible for attacker to modify the history?
 𝑝: 𝑃𝑟𝑜𝑏(Honest nodes can proceed to the next block)
 𝑞: 𝑃𝑟𝑜𝑏(Attacker nodes can proceed to the next block)
 𝑞𝑖: 𝑃𝑟𝑜𝑏(the attacker eventually can catch up from the position of i )
1.12.2014 28
Mathematical proof
Block Block Block
Attacker Honest nodes
are creatingZ blocks
||
 Let us focus on 𝑞𝑖
-> Gambler’s Ruining Problem (Binomial Random Walk)
 The gambler starts with money i to reach N
if i=0, gambler lose (cannot play anymore)
 𝑝: 𝑃𝑟𝑜𝑏(Honest majority can proceed to the next block)
 𝑞: 𝑃𝑟𝑜𝑏(Attacker majority can proceed to the next block)
 𝑞𝑖: 𝑃𝑟𝑜𝑏(the attacker eventually can catch up from the position of i )
(𝑞0= 0, 𝑞 𝑁 = 1)
1.12.2014 29
A H
𝑞𝑝
𝑖 𝑁
Mathematical proof
||
Mathematical proof
 𝑞𝑖: recurrence equation
 𝑞𝑖 = 𝑞 ∗ 𝑞𝑖−1 + 𝑝 ∗ 𝑞𝑖+1
…
∴ 𝑞𝑖 =
1 − (
𝑝
𝑞
)𝑖
1 − (
𝑝
𝑞
) 𝑁
𝑖
𝑁
1.12.2014 30
A H
𝑞𝑝
… 𝑝 ≠ 𝑞
… 𝑝 = 𝑞
𝑖 𝑁
||
Mathematical proof
 Worst case:
He tries to catch up for unlimited times
 ∴ lim
𝑖→∞
𝑞𝑖 =
1
(
𝑞
𝑝
) 𝑍
 We assume 𝑝 > 𝑞
Some people in majority can win the attacker
1.12.2014
The time to solve proof of
work 31
A
H𝑞𝑝
… 𝑝 ≤ 𝑞
𝑖 𝑁
… 𝑝 > 𝑞
vs
10min 1 day
|| 1.12.2014 32
Summary
 Block
 Nonce, Transactions
 Blockchain
 Sequence of blocks (current length: 513552 blocks)
 Long chain makes tampering difficult
-> An incentive is paid for the creator of new block
(Amount: 12.5 BTC =~106,416 CHF per block!!)
|| 1.12.2014 33
Disk space problem
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
 Block size easily gets super huge…
 # transactions = 304,134,203
 1 transaction size = 250 ~ 500 B [https://blockchain.info/]
 250B * 304,134,203 = 76TB !!!
 How do we compress the transaction?
|| 1.12.2014 34
Disk space problem
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
Bloc
k
Bloc
k
Bloc
k
New block
With tx4
 Block size easily gets super huge…
 # transactions = 304,134,203
 1 transaction size = 250 ~ 500 B [https://blockchain.info/]
 250B * 304,134,203 = 76TB !!!
 How do we compress the transaction?
-> Just remove the transaction !
||
 Some transactions: unnecessary!
 Only if the same coins in Tx A are spent
by another latest transactions Tx B,
Tx A will be unnecessary
 Merkle Tree “transforms”
sequential Tx into Root Hash
 If the coin in Tx0, 1, 2 is spent in
another newly created block…
1.12.2014 35
Disk space problem: Solution
Tx
1
Tx
3
Hash z
(Root Hash)
Hash
y
Hash
x
Hash
1
Hash
0
Hash
3
Hash
2
Tx
0
Tx
2
nonce
Prev
hash
Block header
Block
||
 Some transactions: unnecessary!
 Only if the same coins in Tx A are spent
by another latest transactions Tx B,
Tx A will be unnecessary
 Merkle Tree “transforms”
sequential Tx into Root Hash
 If the coin in Tx0, 1, 2 is spent in
another newly created block…
-> Tx0, 1, 2 gets removed.
Hashcodes still remain
1.12.2014 36
Disk space problem: Solution
Tx
3
Hash z
(Root Hash)
Hash
y
Hash
x
Hash
3
Hash
2
nonce
Prev
hash
Block header
Block
||
 Bitcoin: transaction history without 3rd party
 Block: Multiple transactions + previous hash + nonce
 Source of trust: Majority agreement with block
 Tampering of history:
It is difficult if the attacker starts from a few blocks behind,
unless the attackers occupy the majority of computational power
 Vulnerability to the malicious majority
 These days the mining is so competitive that they form some
groups (pool)
 What happens if they occupy half of the computational power ?
1.12.2014 37
Conclusions
Block Block Block
Blockchain presentation

More Related Content

What's hot

A research-oriented introduction to the cryptographic currencies (starting wi...
A research-oriented introduction to the cryptographic currencies (starting wi...A research-oriented introduction to the cryptographic currencies (starting wi...
A research-oriented introduction to the cryptographic currencies (starting wi...vpnmentor
 
Blockchain - a formal introduction
Blockchain - a formal introductionBlockchain - a formal introduction
Blockchain - a formal introductionSander Demeester
 
Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)Amir Rafati
 
gething started - ethereum & using the geth golang client
gething started - ethereum & using the geth golang clientgething started - ethereum & using the geth golang client
gething started - ethereum & using the geth golang clientSathish VJ
 
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 CypherpunksDavid Evans
 
create your own cryptocurrency
create your own cryptocurrencycreate your own cryptocurrency
create your own cryptocurrencyBellaj Badr
 
Fredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesFredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesAlex Akselrod
 
Bitcoin - Beyond the basics
Bitcoin - Beyond the basicsBitcoin - Beyond the basics
Bitcoin - Beyond the basicsChris DeRose
 
Mining pools and attacks
Mining pools and attacksMining pools and attacks
Mining pools and attacksvpnmentor
 
Introduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologiesIntroduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologiesPaweł Wacławczyk
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to EthereumArnold Pham
 
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?Jim Flynn
 
How Blockchain works?
How Blockchain works?How Blockchain works?
How Blockchain works?We2Blocks
 
Intro to Blockchain Slides
Intro to Blockchain SlidesIntro to Blockchain Slides
Intro to Blockchain SlidesShannon Wells
 
Introduction into blockchains and cryptocurrencies
Introduction into blockchains and cryptocurrenciesIntroduction into blockchains and cryptocurrencies
Introduction into blockchains and cryptocurrenciesSergey Ivliev
 
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad SarangNinad Sarang
 

What's hot (20)

Intro into blockchain
Intro into blockchainIntro into blockchain
Intro into blockchain
 
Blockchain - a basic overview
Blockchain - a basic overviewBlockchain - a basic overview
Blockchain - a basic overview
 
A research-oriented introduction to the cryptographic currencies (starting wi...
A research-oriented introduction to the cryptographic currencies (starting wi...A research-oriented introduction to the cryptographic currencies (starting wi...
A research-oriented introduction to the cryptographic currencies (starting wi...
 
Blockchain - a formal introduction
Blockchain - a formal introductionBlockchain - a formal introduction
Blockchain - a formal introduction
 
Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)
 
Bitcoin
Bitcoin Bitcoin
Bitcoin
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
gething started - ethereum & using the geth golang client
gething started - ethereum & using the geth golang clientgething started - ethereum & using the geth golang client
gething started - ethereum & using the geth golang client
 
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
 
create your own cryptocurrency
create your own cryptocurrencycreate your own cryptocurrency
create your own cryptocurrency
 
Fredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesFredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slides
 
Bitcoin - Beyond the basics
Bitcoin - Beyond the basicsBitcoin - Beyond the basics
Bitcoin - Beyond the basics
 
Mining pools and attacks
Mining pools and attacksMining pools and attacks
Mining pools and attacks
 
Introduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologiesIntroduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologies
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
 
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
 
How Blockchain works?
How Blockchain works?How Blockchain works?
How Blockchain works?
 
Intro to Blockchain Slides
Intro to Blockchain SlidesIntro to Blockchain Slides
Intro to Blockchain Slides
 
Introduction into blockchains and cryptocurrencies
Introduction into blockchains and cryptocurrenciesIntroduction into blockchains and cryptocurrencies
Introduction into blockchains and cryptocurrencies
 
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
 

Similar to Blockchain presentation

Upgrading the Bitcoin protocol - Simone Bronzini - Codemotion Rome 2018
Upgrading the Bitcoin protocol - Simone Bronzini - Codemotion Rome 2018Upgrading the Bitcoin protocol - Simone Bronzini - Codemotion Rome 2018
Upgrading the Bitcoin protocol - Simone Bronzini - Codemotion Rome 2018Codemotion
 
Bitcoin - Understanding and Assessing potential Opportunities
Bitcoin - Understanding and Assessing potential OpportunitiesBitcoin - Understanding and Assessing potential Opportunities
Bitcoin - Understanding and Assessing potential OpportunitiesQuasarVentures
 
The Bitcoin blockchain (en)
The Bitcoin blockchain (en)The Bitcoin blockchain (en)
The Bitcoin blockchain (en)Davide Carboni
 
CRYPTO CURRENCY-2022OD205.pdf
CRYPTO CURRENCY-2022OD205.pdfCRYPTO CURRENCY-2022OD205.pdf
CRYPTO CURRENCY-2022OD205.pdfJESUNPK
 
Blockchain and Bitcoin.pptx
Blockchain and Bitcoin.pptxBlockchain and Bitcoin.pptx
Blockchain and Bitcoin.pptxssuser3ab054
 
Blockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challengesBlockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challengesSébastien Tandel
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain TechnologyShubhAm RaWat
 
Bitcoin A Peer-to-Peer Electronic Cash System
Bitcoin A Peer-to-Peer Electronic Cash SystemBitcoin A Peer-to-Peer Electronic Cash System
Bitcoin A Peer-to-Peer Electronic Cash SystemFlavio Vit
 
IEEE ICDM 2018 Tutorial on Blockchain Data Analytics
IEEE ICDM 2018 Tutorial on Blockchain Data AnalyticsIEEE ICDM 2018 Tutorial on Blockchain Data Analytics
IEEE ICDM 2018 Tutorial on Blockchain Data AnalyticsCuneyt Gurcan Akcora
 
20190606 blockchain101
20190606 blockchain10120190606 blockchain101
20190606 blockchain101Hu Kenneth
 
Bitcoin Mining in decentralized blockchain networks
Bitcoin Mining in decentralized blockchain networksBitcoin Mining in decentralized blockchain networks
Bitcoin Mining in decentralized blockchain networkssendhilkumarks
 
Every thing bitcoin in baby language
Every thing bitcoin in baby languageEvery thing bitcoin in baby language
Every thing bitcoin in baby languageOssai Nduka
 
All you ever needed to know on bitcoin and blockchain
All you ever needed to know on bitcoin and blockchainAll you ever needed to know on bitcoin and blockchain
All you ever needed to know on bitcoin and blockchainMarco Hauff
 

Similar to Blockchain presentation (20)

Upgrading the Bitcoin protocol - Simone Bronzini - Codemotion Rome 2018
Upgrading the Bitcoin protocol - Simone Bronzini - Codemotion Rome 2018Upgrading the Bitcoin protocol - Simone Bronzini - Codemotion Rome 2018
Upgrading the Bitcoin protocol - Simone Bronzini - Codemotion Rome 2018
 
Bitcoin - Understanding and Assessing potential Opportunities
Bitcoin - Understanding and Assessing potential OpportunitiesBitcoin - Understanding and Assessing potential Opportunities
Bitcoin - Understanding and Assessing potential Opportunities
 
The Bitcoin blockchain (en)
The Bitcoin blockchain (en)The Bitcoin blockchain (en)
The Bitcoin blockchain (en)
 
CRYPTO CURRENCY-2022OD205.pdf
CRYPTO CURRENCY-2022OD205.pdfCRYPTO CURRENCY-2022OD205.pdf
CRYPTO CURRENCY-2022OD205.pdf
 
bitcoin
bitcoinbitcoin
bitcoin
 
15-Bitcoin.pptx
15-Bitcoin.pptx15-Bitcoin.pptx
15-Bitcoin.pptx
 
Blockchain and Bitcoin.pptx
Blockchain and Bitcoin.pptxBlockchain and Bitcoin.pptx
Blockchain and Bitcoin.pptx
 
Blockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challengesBlockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challenges
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
BLOCKCHAIN TECHNOLOGY
BLOCKCHAIN TECHNOLOGYBLOCKCHAIN TECHNOLOGY
BLOCKCHAIN TECHNOLOGY
 
Bitcoin A Peer-to-Peer Electronic Cash System
Bitcoin A Peer-to-Peer Electronic Cash SystemBitcoin A Peer-to-Peer Electronic Cash System
Bitcoin A Peer-to-Peer Electronic Cash System
 
Bitcoin MOOC Lecture 2.pptx
Bitcoin MOOC Lecture 2.pptxBitcoin MOOC Lecture 2.pptx
Bitcoin MOOC Lecture 2.pptx
 
IEEE ICDM 2018 Tutorial on Blockchain Data Analytics
IEEE ICDM 2018 Tutorial on Blockchain Data AnalyticsIEEE ICDM 2018 Tutorial on Blockchain Data Analytics
IEEE ICDM 2018 Tutorial on Blockchain Data Analytics
 
20190606 blockchain101
20190606 blockchain10120190606 blockchain101
20190606 blockchain101
 
Bitcoin Mining in decentralized blockchain networks
Bitcoin Mining in decentralized blockchain networksBitcoin Mining in decentralized blockchain networks
Bitcoin Mining in decentralized blockchain networks
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Every thing bitcoin in baby language
Every thing bitcoin in baby languageEvery thing bitcoin in baby language
Every thing bitcoin in baby language
 
Blockchain
BlockchainBlockchain
Blockchain
 
All you ever needed to know on bitcoin and blockchain
All you ever needed to know on bitcoin and blockchainAll you ever needed to know on bitcoin and blockchain
All you ever needed to know on bitcoin and blockchain
 
block chain.pptx
block chain.pptxblock chain.pptx
block chain.pptx
 

Recently uploaded

VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 

Recently uploaded (20)

VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 

Blockchain presentation

  • 1. || Presenter: Hang Tong 1.12.2014 1 Bitcoin: A Peer-to-Peer Electronic Cash System [Nakamoto, 2009]
  • 2. ||  Motivation of Bitcoin  Underlying data structure of Bitcoin  Accounting with Bitcoin  Mathematical background of Bitcoin security  Underlying data structure for efficiency 1.12.2014 2 Overview
  • 3. ||  ”Improve the existing electronic cash system”  Ecash [David Chaum, 1983]  Transaction with 3rd party  Rely on 3rd party  Subject to financial situation of bank  Problems  3rd party may bankrupt  Vulnerable to the financial crisis (Remember “Lehman shock”) 1.12.2014 3 The motivation of Bitcoin Existing electronic cash system (Trust based model)
  • 4. ||  ”Create new currency w/o central organization !”  How do we create currency?  Currency must be trusted by everyone spending it  Existing system  3rd party guarantees the value of currency -> How ? 1.12.2014 4 The motivation of Bitcoin: Eliminating 3rd party
  • 5. ||  Source of trust: transaction record  They know ALL the transaction history  Prevent mainly 2 things 1. Double-Spending Problem : To copy and pay same coin for different person 2. Coin robbery : To change the history of transaction and get someone’s coin 1.12.2014 5 How do 3rd parties guarantee the value? Existing electronic coin system (Trust based model) A -> B: 5 CHF D -> C: 100 CHF A -> C: 7 CHF …
  • 6. ||  They know ALL the transaction history  Prevents mainly 2 things 1. Double-Spending Problem To spend same coin for different payment. 1.12.2014 6 Double-Spending Problem Your successive transactions have same coin IDs. Payment Invalid. I wanna do Me -> A: 5 CHF Me -> B: 5 CHF at the same time with same coin,man.
  • 7. ||  They know ALL the transaction history  Prevents mainly 2 things 1. Double-Spending Problem 2. Coin robbery : To change the history of transaction and get someone’s coin 1.12.2014 7 Coin robbery A -> B: 5 CHF D -> C: 100 CHF A -> C: 7 CHF … I wanna change D -> C: 100 CHF Into D -> Me: 100CHF But I can’t…damn!
  • 8. ||  They know ALL the transaction history  Prevents mainly 2 things 1. Double-Spending Problem 2. Coin robbery : To change the history of transaction and get someone’s coin  How do we substitute 3rd party? -> Blockchain ! [Nakamoto, 2009] 1.12.2014 8 How do we eliminate the 3rd party?
  • 9. ||  Block: A group of transactions (transferring of currency)  Blockchain: A sequence of Blocks  Rule: The longest chain is always true 1.12.2014 9 Blockchain: New form of transaction record Tx Previous block hash Integer Tx A -> B: 10 CHF C -> D: 2 CHF
  • 10. ||  Everyone trusts the longest chain to be true history  Free to extend the chain, and the block will be verified by others  Once you get behind, it is really hard to catch up with the top block -> Why ? 1.12.2014 10 Blockchain: in P2P network P2P network
  • 11. ||  Proof of work  Meant to be time-consuming math problem -> Require about 10 minutes to solve  Block is created only after finding the nonce(integer) s.t. hash(nonce+other data) = 000…05fs2ce91a  If someone tries to change Tx1 -> They have to find another corresponding nonce -> Same work must be done for subsequent blocks 1.12.2014 11 Blockchain: Proof of Work Tx 1 Tx 2 Tx 3 Tx 4 Tx 5 Tx 6 Unjustified Transactions Tx1 Previous block hash nonce hash n
  • 12. || 1.12.2014 12 Blockchain: How does it get added? Transaction Tx 1 Tx 2 Tx 3 Tx 4 Tx 5 Tx 6 Unjustified Transactions Block Block Block Current blocks Finding a nonce cast Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block
  • 13. || 1.12.2014 13 Block & Transaction creation Transaction Tx 1 Tx 2 Tx 3 Tx 4 Tx 5 Tx 6 Unjustified Transactions Block Block Block Current blocks New block With tx4 New block With tx4 New block With tx5 Finding a nonce
  • 14. || 1.12.2014 14 Block & Transaction creation Transaction Tx 1 Tx 2 Tx 3 Tx 4 Tx 5 Tx 6 Unjustified Transactions Block Block Block Current blocks New block With tx4 New block With tx4 New block With tx5 “I found the answer!”
  • 15. || 1.12.2014 15 Block & Transaction creation Transaction Tx 1 Tx 2 Tx 3 Tx 4 Tx 5 Tx 6 Unjustified Transactions Block Block Block Current blocks New block With tx4 New block With tx4 New block With tx5 Block candidates nonce
  • 16. || 1.12.2014 16 Block & Transaction creation Transaction Tx 1 Tx 2 Tx 3 Tx 4 Tx 5 Tx 6 Unjustified Transactions Block Block Block Current blocks New block With tx4 Block candidates “Is nonce correct?” (easy work) “Let’s check the validity of each transactions” nonce
  • 17. || 1.12.2014 17 Block & Transaction creation Transaction Tx 1 Tx 2 Tx 3 Tx 4 Tx 5 Tx 6 Unjustified Transactions Block Block Block Current blocks New block With tx4 Block candidates “Correct!” ”I don’t give a shit”“Correct!” “Correct!” 4/5 agreed. “I’m sure it’s correct, huh”
  • 18. || 1.12.2014 18 Block & Transaction creation Transaction Tx 1 Tx 2 Tx 3 Tx 4 Tx 5 Tx 6 Unjustified Transactions Current blocks Block Block Block New block With tx4 Every node updates their block Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4 Once it gets accepted, NO incentive for ignoring it
  • 19. || 1.12.2014 19 Block & Transaction creation Transaction Tx 1 Tx 2 Tx 3 Tx 4 Tx 5 Tx 6 Unjustified Transactions Block Block Block Current blocks New block With tx4 The block creator can get a bitcoin This incident will be written on the new block
  • 20. || 1.12.2014 20 Blockchain security Block Block Block New block With tx4  Let us recall… how does blockchain cope with… 1. Double-Spending Problem ? 2. Coin robbery ?
  • 21. || 1.12.2014 21 Blockchain against Double-Spending Problem 1. Double-Spending Problem  Each Transaction has coin’s hash  Blockchain does not allow transactions to have the same coin hash  If same coin hash found in 2 transactions, only one will be valid Tx1 Previous block hash Integer - Coin’s hash - Sender ID - Receiver ID Transaction In more detail… - Coin’s hash: hash of previous tx - Sender ID: Sender’s digital signature - Receiver ID: Receiver’s public key
  • 22. || 1.12.2014 22 Blockchain against Coin robbery 2. Coin robbery  He might change the transaction arbitrarily -> Actually, he can  However… A lot of Proof of Work are waiting for him ! Tx1Previous block hash Nonce Previous block I can modify the transaction like: Before: Alice -> Bob: 100 Bitcoin After: AliceMe: 100 Bitcoin
  • 23. || 1.12.2014 23 Blockchain against Coin robbery 2. Coin robbery  He might change the transaction arbitrarily -> Actually, he can  However… A lot of Proof of Work are waiting for him !  The modification for block makes hash completely different -> He needs to find the new nonce accordingly -> 10 minutes work on average Tx1Previous block hash Nonce Previous block I can modify the transaction like: Before: Alice -> Bob: 100 Bitcoin After: AliceMe: 100 Bitcoin
  • 24. || 1.12.2014 24 Can attacker catch up with the top block? Block Block Block Attacker is modifying Honest nodes are creating
  • 25. || 1.12.2014 25 Can attacker catch up with the top block? Block Block Block Honest nodes are creating Attacker is modifying Block
  • 26. || 1.12.2014 26 Can attacker catch up with the top block? Block Block Block Honest nodes are creating Attacker is modifying Block
  • 27. || 1.12.2014 27 Can attacker catch up with the top block? Block Block Block Honest nodes are creating Attacker is modifying Block Block He cannot catch up as long as majority of nodes are honest !
  • 28. ||  Is it really impossible for attacker to modify the history?  𝑝: 𝑃𝑟𝑜𝑏(Honest nodes can proceed to the next block)  𝑞: 𝑃𝑟𝑜𝑏(Attacker nodes can proceed to the next block)  𝑞𝑖: 𝑃𝑟𝑜𝑏(the attacker eventually can catch up from the position of i ) 1.12.2014 28 Mathematical proof Block Block Block Attacker Honest nodes are creatingZ blocks
  • 29. ||  Let us focus on 𝑞𝑖 -> Gambler’s Ruining Problem (Binomial Random Walk)  The gambler starts with money i to reach N if i=0, gambler lose (cannot play anymore)  𝑝: 𝑃𝑟𝑜𝑏(Honest majority can proceed to the next block)  𝑞: 𝑃𝑟𝑜𝑏(Attacker majority can proceed to the next block)  𝑞𝑖: 𝑃𝑟𝑜𝑏(the attacker eventually can catch up from the position of i ) (𝑞0= 0, 𝑞 𝑁 = 1) 1.12.2014 29 A H 𝑞𝑝 𝑖 𝑁 Mathematical proof
  • 30. || Mathematical proof  𝑞𝑖: recurrence equation  𝑞𝑖 = 𝑞 ∗ 𝑞𝑖−1 + 𝑝 ∗ 𝑞𝑖+1 … ∴ 𝑞𝑖 = 1 − ( 𝑝 𝑞 )𝑖 1 − ( 𝑝 𝑞 ) 𝑁 𝑖 𝑁 1.12.2014 30 A H 𝑞𝑝 … 𝑝 ≠ 𝑞 … 𝑝 = 𝑞 𝑖 𝑁
  • 31. || Mathematical proof  Worst case: He tries to catch up for unlimited times  ∴ lim 𝑖→∞ 𝑞𝑖 = 1 ( 𝑞 𝑝 ) 𝑍  We assume 𝑝 > 𝑞 Some people in majority can win the attacker 1.12.2014 The time to solve proof of work 31 A H𝑞𝑝 … 𝑝 ≤ 𝑞 𝑖 𝑁 … 𝑝 > 𝑞 vs 10min 1 day
  • 32. || 1.12.2014 32 Summary  Block  Nonce, Transactions  Blockchain  Sequence of blocks (current length: 513552 blocks)  Long chain makes tampering difficult -> An incentive is paid for the creator of new block (Amount: 12.5 BTC =~106,416 CHF per block!!)
  • 33. || 1.12.2014 33 Disk space problem Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4  Block size easily gets super huge…  # transactions = 304,134,203  1 transaction size = 250 ~ 500 B [https://blockchain.info/]  250B * 304,134,203 = 76TB !!!  How do we compress the transaction?
  • 34. || 1.12.2014 34 Disk space problem Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4 Bloc k Bloc k Bloc k New block With tx4  Block size easily gets super huge…  # transactions = 304,134,203  1 transaction size = 250 ~ 500 B [https://blockchain.info/]  250B * 304,134,203 = 76TB !!!  How do we compress the transaction? -> Just remove the transaction !
  • 35. ||  Some transactions: unnecessary!  Only if the same coins in Tx A are spent by another latest transactions Tx B, Tx A will be unnecessary  Merkle Tree “transforms” sequential Tx into Root Hash  If the coin in Tx0, 1, 2 is spent in another newly created block… 1.12.2014 35 Disk space problem: Solution Tx 1 Tx 3 Hash z (Root Hash) Hash y Hash x Hash 1 Hash 0 Hash 3 Hash 2 Tx 0 Tx 2 nonce Prev hash Block header Block
  • 36. ||  Some transactions: unnecessary!  Only if the same coins in Tx A are spent by another latest transactions Tx B, Tx A will be unnecessary  Merkle Tree “transforms” sequential Tx into Root Hash  If the coin in Tx0, 1, 2 is spent in another newly created block… -> Tx0, 1, 2 gets removed. Hashcodes still remain 1.12.2014 36 Disk space problem: Solution Tx 3 Hash z (Root Hash) Hash y Hash x Hash 3 Hash 2 nonce Prev hash Block header Block
  • 37. ||  Bitcoin: transaction history without 3rd party  Block: Multiple transactions + previous hash + nonce  Source of trust: Majority agreement with block  Tampering of history: It is difficult if the attacker starts from a few blocks behind, unless the attackers occupy the majority of computational power  Vulnerability to the malicious majority  These days the mining is so competitive that they form some groups (pool)  What happens if they occupy half of the computational power ? 1.12.2014 37 Conclusions Block Block Block

Editor's Notes

  1. My talk is devided into 5 parts motivation of bitcoin, why its invented underlying data structure, blockchain transactions mathematical proof data structure for efficiency Then, next, finanly
  2. We already have some frameworks of electronic payment. One of them is the system called ecash. In this system, for the first, they exchange their physical money with virtual cash by paying for central organization. After that, they can pay online by using that virtual cash. This allows us to exchange our cash online, but all the transactions must go through the central bank, which means it relies on ... Of course, the problem is the risk of bankrupt of the company. If that happens, the virtual cash will no longer useful. And they are vulnerable to financial crisis like Lehman shock, which makes us doubtful of trust based currency model.
  3. To tackle with these problems, satoshi nakamoto tried to create … but, how do we create new currency? To go into the solution, let us refer to the existing system with 3rd party.
  4. One thing they have is the transaction of record (read the slide) for example, they have some database for storing all the transaction since the beginning. A payed 5 chf to B... So, this record is the source of trust. Thanks to keeping this record, it succeeds in preventing 2 things from happening. Double spending problem.
  5. For the first problem, the guy says like ... He executes the second transactions right after the first transactions. He expects both of the transactions get accepted somehow. However, the company definitely find that... This is not happening.
  6. For the coin robbery Repalace C with himself.
  7. It seems that cent.. plays an important role in having all the transaction records with them. But we are now trying to eliminate that central party. How do we do this??
  8. 6:37 solution is the blockchain. We define a block as a group of txs. It has several transaction data inside. They link these blocks to create very long chain. The reason of linking block is because it increases its security. I will talk about it soon but one thing im gonna stress is that hey contain the hash value of previous blocks. If someone changes the data of previous block, it will change the hash value of next block. So it is easy to detect the change.
  9. Anyways, our objective is to create a block and extend the chain with it. Everyone has chain with them in P2P network, and has the right to create the block. Once the block was created, it needs to be verified by at least half of the people. If verified, the chain will get longer, and it is recommended that everyone should catch up with the latest chain. Otherwise, once you get bihind, …
  10. This is because: creating block: takes long time. Because we have to solve some mathematical task. We call this proof of work. It is just meant to be… But why does it take so long time? Because it requires us to calculate the special integer called nonce. We have to find the nonce which makes the hash of nonce + other data contain n-digits of 0s in its top. Other data contains a number of transaction data. You know, the only way to find this nonce is just trying from 0. It is like brute force. Hash function outputs completely different number even if the input gets slightly changed. If I try to change previous transactions in this red block, the modification will change the hash in next block, so I have to find the another correspnding nonce again, which requires another 10 minutes of work. -- Proof of work is used ... Block is created only ... Finding the value called nonce, which makes first n-bit of hash code 0. Each blocks have several transactions inside, and the hashcode of previous block. In addition to these data N is chosen in a way that the calculation takes 10 min. If someone tries to change old blocks, he must calculate all the corresponding nonce for subsequent blocks
  11. OK, we already know that block is linked to form a chain, and to create the chain, we need to do proof of work. Here I wanna visualize the procedure of creating block. Lets say there are 5 pcs on p2p world, and transaction has just done and cast to transactions pool. In this pool, they have many unconfirmed transactions. Since this is P2P networks, they have same copy of blockchain on each computers. And some of them are off line. And three of them are trying to make new block. They have some copy locally
  12. After a while, 3 computers try to create a block, they can choose whatever txs they want. As I explained, they have to calculate the nonce to make the hash code followed by n-bits of 0s.
  13. In 10 minutes or so, the most powerful computer finds the nonce. He broadcasts about the finding to all the other computers.
  14. The newly creted block is cast into candidates pool and the loser stops creating their block.
  15. Another nodes will check the answer = newly found nonce, by calculating the hash of nonce+other data. They only calculates the hash code of (data and calculated nonce), which is quite simple work. So this verification process does not take so long
  16. If majority of the nodes agree….
  17. They update their blockchain with newly created block. There is some guy who does not agree on the block, and can continue creating his own block. But as I said, it is diff to catch up with the latest chain once you get behind. So he would choose to accept that block rather than sticking to his block.
  18. The strongest PC can get new bitcoin for the reward of creation of the block. This reward is also recorded as transaction, and added on the newly created block. This is how the coin gets created and added to its chain.
  19. So we have covered how the chain is created. If anything unclear, ask me later. And I want you to remember those 2 things. The challenging part of creating currency is … So lets see how does ...
  20. For the first, lets recall double spending problem. Double spending problem is that malicious guy copy the coin and pay for multiple person at the same time. In this block, each transaction contains coins hash. The transaction has SenderID, ReceiverID, coin’s hash. Coin’s hash is made of previous transactions, sender ID and receiver ID are created by the digital signature with their public key and private key like typical digital signature does. Anyway, the point is that blockchain only accepts unique coin hash. If transaction has same coin hash as the one used before, The later transaction will be invalid.
  21. Then, how about the coin robery? He was like…trying to illegaly get 100 francs instead of Bob. (He can replace the Bob with himself.) Actually, the attacker …
  22. So, the thing is, the change for transaction will also change the hash of the next block. He must calculate nonce accordingly. A lot of proof of work...
  23. Let us visualize what I said. Attacker starts to modify 3 blocks before the current block. While the majority is trying to calculate the nonce for the next block.
  24. Attacker can create the block earlier than the majority do, but…
  25. The chain will be extended If at least one of the majority finds the nonce.
  26. It is difficult for attacker to create the block by beating all the majority. That means he cannot catch up with the top.
  27. The paper also introduces mathematical background for the attacker’s disadvantage. The setting is like this. Attacker started modifying block which is Z block behind the newest one. He defines p, q, q_i. P is the probability that …
  28. This situation can be modeled as GRP, which is based on BRW Gamber starts playing casino game by betting one coin. He starts with money I and continue to play until he gets N money or he goes bunkrupt.
  29. We can find q_i by solving recursion equation. I will omit the details, and we can get the q_i.
  30. To be certain about the security, we have to consider the worst case here. The worst case is that attacker never gives up and tries to create his own block. That prob is given by considering the infinity of q_i. The probability of catching up decreases exponentially. Here we can assume p larger than q because it is hard for attacker to defeat all the majority. Besides, the time to … is distributed like this figure. Some guy takes less than 10 minutes, while some takes 1 day. Even if one attacker has an super smart computer, it is assumed that there will be someone who can solve the problem earlier than he does. So here we assume p is larger than q.
  31. To summarize the content so far, Block is composed of …, And block chain is the ... Long chain makes tampering difficult because it is hard to catch up with the top once you get behind. To stimulate this work of extension, the reward is given to the creator of the block.
  32. I wanna introduce another techniques that blockchain exploits. The transaction is usually 250 to 500 B of size. And for now, the number of transactions so far is three hundred millions. If we simply calculate the size of the whole blockchain … How do we manage to compress the transaction?
  33. The answer is, just to remove the unnecessary transactions.
  34. Actually, some of the past transactions are unnecessary. Let us say there is some past block with transaction A, if the coin from tx:A was spend by the recipient later on, The transaction A will be needless. By simply removing these transaction will change the hash of the data, so they just replace the transaction with corresponding hash value. By keeping each hash value, we use Merkle tree. If it contains 4 transactions, we conbine two hashes to create one hash, we repeat these process till we get only one hash called Root Hash. This figure shows the example of merkle tree. Lets say …
  35. Those transaction can be removed with keeping its hashcode. By doing this, we can save a lot of spaces.
  36. To sum up, we looked into the detail of bitcoin. Block is compsed of…. And it needs the agreement by majority to keep the reliability. The problem that ecently came up was it is … These days,... The largest party occupies more than 20 percent of the network computational power. What happens if they occupy… Even if they can do, the value of block chain will be lost for ever. So they dont have any motivations to do this, actually. The future work is how they deal with these potential risks Thank you all for listening.