manoranjan mohanty [email protected] · bitcoin is not blockchain 23/10/2019 5 blockchain is...
TRANSCRIPT
COMPSCI 316 (Network Security)
Blockchain
Manoranjan Mohanty
23/10/2019 1
SET Evaluation
23/10/2019 2
Next 12 Minutes: Please submit yourSET evaluation
Only 11 (out of 191) have submittedtheir SET score so far
We can do better!
Exam
23/10/2019 3
Total 50 multiple choice questions
38 questions from Week 7 – Week 12 (excludingguest lecture material!)
12 questions from Week 1 – Week 6
Calculators allowed
Blockchain Definition
23/10/2019 4
“A blockchain is a decentralized,distributed, and oftentimespublic, digital ledger that is usedto record transactions acrossmany computers so that anyinvolved record cannot bealtered retroactively, withoutthe alteration of all subsequentblocks.” – Wikipedia
https://www.signifytechnology.com/blog/2018/03/what-is-blockchain-by-klint-finley
Bitcoin is not Blockchain
23/10/2019 5
Blockchain is the technology behindbitcoin Bitcoin is the digital currency.
Blockchain used to keep track of whoowns bitcoin Blockchain can be used (for
providing trust) in other areas Health record, governance, Insurance,
etc.
Will discuss bitcoin blockchain
23/10/2019 6
Bitcoin a public, proof-of-work-based blockchain Blockchain is completely open and allows anyone to
participate (permissionless blockchain)
Private blockchain are also available In private blockchain, there is restriction on who is
allowed to participate and for what transactions(permissioned blockchain) These types of blockchain can suit enterprises
Blockchain Beyond Bitcoin
Motivation Behind Blockchain
23/10/2019 7
Transaction in Physical World
http
s://ww
w.tu
torialsp
oin
t.com
/blo
ckchain
/blo
ckchain
_qu
ick_gu
ide.h
tm
Lisa transfers the“ownership” of booksto Bob
Bob transfers the“ownership” of 10dollar to Lisa
Motivation Behind Blockchain Cont.
23/10/2019 8Transaction in Digital World
http
s://ww
w.tu
torialsp
oin
t.com
/blo
ckchain
/blo
ckchain
_qu
ick_gu
ide.h
tm
What is the problemwith it?
Motivation Behind Blockchain Cont.
23/10/2019 9Transaction in Digital World
http
s://ww
w.tu
torialsp
oin
t.com
/blo
ckchain
/blo
ckchain
_qu
ick_gu
ide.h
tm
What is the problemwith it?
Double spending
Motivation Behind Blockchain Cont.
23/10/2019 10
Transaction in Digital World
http
s://ww
w.tu
torialsp
oin
t.com
/blo
ckchain
/blo
ckchain
_qu
ick_gu
ide.h
tm
Digital transactionthrough trusted third-party (e.g., bank)
The third-party hasto be paid a fee
Motivation Behind Blockchain Cont.
23/10/2019 11
Transaction in Digital World
http
s://ww
w.tu
torialsp
oin
t.com
/blo
ckchain
/blo
ckchain
_qu
ick_gu
ide.h
tm
How to use technologyto provide trust andintegrity for transactionswithout a trusted third-party?
Basically, the ledger tobe managed usingtechnology withoutrequiring a third-party
Goal
Blockchain – Main Idea
23/10/2019 12
For providing trust and integrityto transactions
1. Group transactions into blocks2. Make changing a block
computationally expensive (hashpuzzle)
3. Chain the blocks so thatmodifying any block willinvalidate all subsequent blocks
4. (2) and (3) make modification ofblocks almost infeasible
https://objectcomputing.com/expertise/blockchain-solutions/what-to-share-with-board-of-directors-about-blockchain
Blockchain Data Structure
23/10/2019 13
Blockchain Basics: A Non-Technical Introduction in 25 Steps
Genesis Block
Head
A new block has to be added here by storing B2 in its header
Chain
Blockchain Data Structure
23/10/2019 14
Blockchain Basics: A Non-Technical Introduction in 25 Steps
Chain of Blocks: Block 2 has to be re-created if anything in Block 1 changes
Merkle Tree
23/10/2019 15
A hash of block is created by solving a “hash puzzle”so that the hash creation takes some time Find a hash with certain “difficulty level” (with certain
number of leading zeros) Example: B2 = Hash of Block header 2 should contain five
leading zeros
Hash Puzzle – Expensive Block Changing
B2 must be found using bruteforce method (Try1, Try2, ….Try1_million…)
23/10/2019 16
Hash Puzzle – Expensive Block Changing
N
Nonce that can change values with different tries
Goal: Find the value of nonce for which the hash having five leading zeros
Try Nonce Hash
1 1 FDEGH1211455
2 2 0AXI46445446A
1 million 1 million 00000ACDEG475
This process requires a lot ofcomputer resources – Blockchainmining
= B2
23/10/2019 17
Blockchain is based onpeer-to-peer networkWhen a new peer joins, it
gets a copy of all the blocks sothat it can create a localblockchain and also verify itsintegrity
Any peer node can proposeto add new transactions aspart of a new block
How Blockchain Works – Proof of Work
Transaction 3 and 4 to be added to existing blockchain data structure
23/10/2019 18
A Merkle tree from the newtransactions is created
Merkle tree from Transaction 3 and 4
How Blockchain Works – Proof of Work
23/10/2019 19
A new block header (whichcontain a reference to itspreceding header and theroot of the Merkle tree) forthe new transaction created
Block Header 2 created
How Blockchain Works – Proof of Work
23/10/2019 20
B2 is new Head
The Head of the wholeblockchain data structure isupdated with the hashreference of new block
How Blockchain Works – Proof of Work
23/10/2019 21
All peers are competing to add this new block. Theone who submits a quality (correct) block first, wins
How correctness is checked?When a peer submits a new blocks, other peers validate it
(by checking transactions and also block header) Consensus: When the peer gets “yes” by majority ofnetwork’s computing power, the submitted block isvalidated and the peer is rewarded
How Blockchain Works - Consensus
Slides are based on the following book and its accompanying slides Blockchain Basics: A Non-Technical Introduction in 25 Steps by
Daniel Drescher
Some images are taken from Google Images
Acknowledgement