Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
March 20, 2018
InfoSecurity VIP ConferenceSan Juan
John Morales
MCS Grad Student
Blockchain Fundamentals
Outline
▪ What is a blockchain?
▪ Definition
▪ Concept Simplification
▪ Blockchain Internal
▪ Genesis block
▪ Transactions
▪ Merkle tree
▪ Blocks
▪ Proof-of-work
▪ Security
March 20 2018Blockchain Fundamentals 2
What is Blockchain?
• “The blockchain is an incorruptible digital ledger of economic transactions that can be programmed to record not just financial transactions but virtually everything of value and importance to humankind.”
-Don & Alex Tapscott, authors Blockchain Revolution (2016)
• Hashed digital recording structure that can keep track of any type of transactions.
3March 20 2018Blockchain Fundamentals
The Model that we Trust
$Bank$
Bob------$20 |
Dave
Carol
Alice
4March 20 2018Blockchain Fundamentals
The Model that we Trust
$Bank$
Bob------$20 |
Dave
CarolAlice
$10
5March 20 2018Blockchain Fundamentals
The Model that we Trust
$Bank$
Bob------$20 |
Dave
Carol
Alice------$10 |
$10
$10
$Fee
6March 20 2018Blockchain Fundamentals
Erase the Intermediary
$Bank$
Bob------$20 |
Dave
Carol
Alice------$10 |
7March 20 2018Blockchain Fundamentals
From To $
Bob Alice 10
Alice Carol 5
Open Ledger
Bob------$20 |
Dave
Alice------$10 |
$10
$5
Open Ledger
Carol------$5|
8March 20 2018Blockchain Fundamentals
Open Ledger
Bob------$20 |
Dave
Alice------$10 |
From To $
Bob Alice 10
Alice Carol 5
Carol Dave 10
$10
$5
Open Ledger
invalid
Carol------$5|
$10
9March 20 2018Blockchain Fundamentals
Open Distributed Ledger
$10
$5 $5
B D
C A
Need Validation
10March 20 2018Blockchain Fundamentals
Miners - Race
Transaction
11March 20 2018Blockchain Fundamentals
Miners - Race
Transaction
12March 20 2018Blockchain Fundamentals
Miners - Race
13March 20 2018Blockchain Fundamentals
Miners - Race
14March 20 2018Blockchain Fundamentals
Miners - Race
15March 20 2018Blockchain Fundamentals
From To $
Bob Dave 10
Dave Alice 5
Dave Carol 5
Transaction
Miners - Race
Valid!
16March 20 2018Blockchain Fundamentals
From To $
Bob Dave 10
Dave Alice 5
Dave Carol 10
Miners - Reward
Valid!
17March 20 2018Blockchain Fundamentals
Miners - Reward
18March 20 2018Blockchain Fundamentals
Miners - Reward
REWARD!
19March 20 2018Blockchain Fundamentals
Miners - Reward
WHAT!?
20March 20 2018Blockchain Fundamentals
Miners - Validation
Roles1. Validate Current transaction funds2. Find a valid key
21March 20 2018Blockchain Fundamentals
Miners - Validation
Roles1. Validate Current transaction funds2. Find a valid key
Enough Funds?
From To $
Bob Dave 10
Dave Alice 5
Dave Carol 5
10 – 5 = 5
5 > 0
22March 20 2018Blockchain Fundamentals
Miners - Validation
Computer PowerRandom GuessFind the Valid key
23March 20 2018Blockchain Fundamentals
Miners - Validation
Computer PowerFind the Valid key Random Guess
From To $
Bob Dave 10
Dave Alice 5
…ef5a288d0
…77d91171
…c8210b9be
24March 20 2018Blockchain Fundamentals
Miners - Validation
…ef5a288d0
…77d91171
…c8210b9be
SHA-256(133t) = 0000000 3541efaf32aabd3b5afe48a25fb4e533ed303664b31763a77d91171
Solve the Puzzle!
Must start with 0000000
Must end with 71
Find the Valid key Random Guess
25March 20 2018Blockchain Fundamentals
End of Concept
$10
$5 $5
B D
C A
Need ValidationValidated!
26March 20 2018Blockchain Fundamentals
At the beginning there was the block…
27March 20 2018Blockchain Fundamentals
https://commons.wikimedia.org/wiki/File:Thomas_Cole_The_Garden_of_Eden_detail_Amon_Carter_Museum.jpg
Genesis Block
28March 20 2018Blockchain Fundamentals https://en.bitcoin.it/wiki/Genesis_block
• The first block of the chain.
• Hardcoded into the chain.
• Does not reference a previous block.
• Contains the following message:
“The Times 03/Jan/2009 Chancellor on brink of second bailout for banks”
Blockchain Internals - Transactions
• Each user posses N numbers of Private Key and a Public Key.
• Public Keys are known as Address.
• Private Keys are use to sign the transactions.
Private Key Public Key Signature
31987497823598husd
hfjskdjfb0838r4
9234y32976yefi
ugsf40958ij
Faywdfbaw67db98713rtyfnp8732r8n2x37r23
12648t512ryglfdhgefhja
jdnaefugh3whry9qw3r
Akjdbh0912r843ur8woeuihfeoifhaljfbsuf3908349
Dave
From Satoshi White Paper
Possible Bitcoin addresses:1.46x1048 or 2160
Number of grains of sand on Earth:7.5x1018
29March 20 2018Blockchain Fundamentals
Blockchain Internals - Transactions
Txn: b4d736ca…
Inputtxn #0b25..
OutputDave 10.0
Txn: b4d736ca…
Input 10.0txn #0b25..
Output 10.0Dave 3d0r90…
Txn: b4d736ca…
Inputtxn #0b25..
OutputDave 10.0
Txn: 3d0r90 …
Input 10.0txn # b4d736ca…
Output 14cd3b… 5.0
Txn: b4d736ca…
Inputtxn #0b25..
OutputDave 10.0
Txn: 4cd3b …
Input 3.0txn # 3d0r90 …
Output…
Txn: b4d736ca…
Inputtxn #0b25..
OutputDave 10.0
Txn: e2vl8 …
Input 5.0txn # 3d0r90 …
Output 3.04cd3b …
30March 20 2018Blockchain Fundamentals
Blockchain Internals - Transactions
Transaction Pool
tx1 tx11
tx37
tx8
tx20tx200
tx5
• Transactions are sent to a Transaction pool
• The sum of transactions bytes in a Block must be less than 1MB
31March 20 2018Blockchain Fundamentals
Block1
tx1
tx5
Block1
tx1
tx5
tx8
Transaction Pool
tx1 tx11
tx37
tx8tx20
tx200
tx5
Blockchain Internals - Transactions
• Transactions are sent to a Transaction pool
• The sum of transactions bytes in a Block must be less than 1MB
Block1Block1
tx1
32March 20 2018Blockchain Fundamentals
Blockchain Internals – Merkle Tree
From Satoshi White Paper
• Save storage space• Block generate every 10min 8 bytes * 6 * 24 * 365 = 4.2 MB per year
33March 20 2018Blockchain Fundamentals
Blockchain Internals – Block
Block # 40319
Hash 000000008135b68…
Version 1
Nonce 32196448
Previous Block Hash 000000000683a4…
Merkle Root B4d736ca7483…
Timestamp 2010-02-14 23:27:53
Bits 486575299
Difficulty Target 1.82
.
.
.
Obtain Block Hash
34March 20 2018Blockchain Fundamentals
Blockchain Internals – Block
35March 20 2018Blockchain Fundamentals
https://blockchain.info/block/0000000000000000001f7892d81e70218830d2d00a1cafa8ca69e8957310d8f4
Blockchain Internals – Proof-of-Work
36March 20 2018Blockchain Fundamentals
https://en.bitcoin.it/wiki/Block_hashing_algorithm
Blockchain Internals - Security
• None honest node need to compete against the entire network.
VS
• Or control 51% of the machine power of the network.
• Byzantine Group Problem.
37March 20 2018Blockchain Fundamentals
Blockchain Internals - Security
38March 20 2018Blockchain Fundamentals
Genesis block
Attacker Target
New block
Questions?
39March 20 2018Blockchain Fundamentals
References
40March 20 2018Blockchain Fundamentals
Swimming Poolhttps://pixabay.com/en/swimming-pool-swimming-pool-ladder-149632/
Mario Tunnel CC0 Creative CommonsOpenClipart-Vectors / 27444 imageshttps://pixabay.com/en/super-mario-brothers-computer-game-147465/
Earth http://www.freepngimg.com/world/earth
Treasure chest openFree Clip art by YeKcimCC0 1.0 Universal (CC0 1.0)ID:135907https://www.1001freedownloads.com/free-clipart/chests-2
Treasure chest closeFree Clip art by YeKcimCC0 1.0 Universal (CC0 1.0)ID:135905https://www.1001freedownloads.com/free-clipart/chests
Servershttps://en.wikipedia.org/wiki/System_X_(computing)#/media/File:Virginia_tech_xserve_cluster.jpg
Magnifying glass
3dman_eu / 8698 imagesCC0 Creative Commonshttps://pixabay.com/en/search-to-find-internet-1013910/
Thinking manhttps://clipart.guru/images/clipart-99013.html
Ring of keyshopesterhttps://www.collectorsweekly.com/stories/62051-ring-of-keys
Rustic keyhttp://www.pngmart.com/image/tag/key
Antique Keyhttps://paragonsecurityny.com/wp-content/uploads/2016/01/Antique-Key.jpg
Skeleton key
Jayson Homehttp://clipart-library.com/clipart/6TyXx9xRc.htm
Pool of coinshttp://infocoin.net/en/2017/07/31/two-important-rules-to-get-ready-for-the-bitcoin-hard-fork/
References
41March 20 2018Blockchain Fundamentals
Minning Pickhttps://www.flaticon.com/free-icon/pick_208630
Pile of rockshttp://moziru.com/explore/Stone%20clipart%20rock%20pile/#go_post_4042_caol-clipart-pile-coal-20.jpg
Flaghttp://clipart-library.com/clipart/5cRKaAxKi.htm