![Page 1: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/1.jpg)
March 20, 2018
InfoSecurity VIP ConferenceSan Juan
John Morales
MCS Grad Student
Blockchain Fundamentals
![Page 2: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/2.jpg)
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
![Page 3: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/3.jpg)
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
![Page 4: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/4.jpg)
The Model that we Trust
$Bank$
Bob------$20 |
Dave
Carol
Alice
4March 20 2018Blockchain Fundamentals
![Page 5: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/5.jpg)
The Model that we Trust
$Bank$
Bob------$20 |
Dave
CarolAlice
$10
5March 20 2018Blockchain Fundamentals
![Page 6: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/6.jpg)
The Model that we Trust
$Bank$
Bob------$20 |
Dave
Carol
Alice------$10 |
$10
$10
$Fee
6March 20 2018Blockchain Fundamentals
![Page 7: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/7.jpg)
Erase the Intermediary
$Bank$
Bob------$20 |
Dave
Carol
Alice------$10 |
7March 20 2018Blockchain Fundamentals
![Page 8: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/8.jpg)
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
![Page 9: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/9.jpg)
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
![Page 10: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/10.jpg)
Open Distributed Ledger
$10
$5 $5
B D
C A
Need Validation
10March 20 2018Blockchain Fundamentals
![Page 11: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/11.jpg)
Miners - Race
Transaction
11March 20 2018Blockchain Fundamentals
![Page 12: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/12.jpg)
Miners - Race
Transaction
12March 20 2018Blockchain Fundamentals
![Page 13: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/13.jpg)
Miners - Race
13March 20 2018Blockchain Fundamentals
![Page 14: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/14.jpg)
Miners - Race
14March 20 2018Blockchain Fundamentals
![Page 15: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/15.jpg)
Miners - Race
15March 20 2018Blockchain Fundamentals
![Page 16: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/16.jpg)
From To $
Bob Dave 10
Dave Alice 5
Dave Carol 5
Transaction
Miners - Race
Valid!
16March 20 2018Blockchain Fundamentals
![Page 17: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/17.jpg)
From To $
Bob Dave 10
Dave Alice 5
Dave Carol 10
Miners - Reward
Valid!
17March 20 2018Blockchain Fundamentals
![Page 18: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/18.jpg)
Miners - Reward
18March 20 2018Blockchain Fundamentals
![Page 19: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/19.jpg)
Miners - Reward
REWARD!
19March 20 2018Blockchain Fundamentals
![Page 20: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/20.jpg)
Miners - Reward
WHAT!?
20March 20 2018Blockchain Fundamentals
![Page 21: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/21.jpg)
Miners - Validation
Roles1. Validate Current transaction funds2. Find a valid key
21March 20 2018Blockchain Fundamentals
![Page 22: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/22.jpg)
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
![Page 23: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/23.jpg)
Miners - Validation
Computer PowerRandom GuessFind the Valid key
23March 20 2018Blockchain Fundamentals
![Page 24: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/24.jpg)
Miners - Validation
Computer PowerFind the Valid key Random Guess
From To $
Bob Dave 10
Dave Alice 5
…ef5a288d0
…77d91171
…c8210b9be
24March 20 2018Blockchain Fundamentals
![Page 25: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/25.jpg)
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
![Page 26: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/26.jpg)
End of Concept
$10
$5 $5
B D
C A
Need ValidationValidated!
26March 20 2018Blockchain Fundamentals
![Page 27: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/27.jpg)
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
![Page 28: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/28.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”
![Page 29: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/29.jpg)
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
![Page 30: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/30.jpg)
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
![Page 31: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/31.jpg)
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
![Page 32: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/32.jpg)
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
![Page 33: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/33.jpg)
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
![Page 34: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/34.jpg)
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
![Page 35: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/35.jpg)
Blockchain Internals – Block
35March 20 2018Blockchain Fundamentals
https://blockchain.info/block/0000000000000000001f7892d81e70218830d2d00a1cafa8ca69e8957310d8f4
![Page 36: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/36.jpg)
Blockchain Internals – Proof-of-Work
36March 20 2018Blockchain Fundamentals
https://en.bitcoin.it/wiki/Block_hashing_algorithm
![Page 37: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/37.jpg)
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
![Page 38: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/38.jpg)
Blockchain Internals - Security
38March 20 2018Blockchain Fundamentals
Genesis block
Attacker Target
New block
![Page 39: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/39.jpg)
Questions?
39March 20 2018Blockchain Fundamentals
![Page 40: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/40.jpg)
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/
![Page 41: Blockchain Fundamentals - INFOSECURITY VIP · Blockchain Internals - Transactions • Each user posses N numbers of Private Key and a Public Key. • Public Keys are known as Address](https://reader033.vdocuments.net/reader033/viewer/2022050519/5fa31363810c5870e46e15a2/html5/thumbnails/41.jpg)
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