SlideShare a Scribd company logo
1 of 34
INTRODUCTIO
N TO
BLOCKCHAIN
2
AndyLily
Bill Lisa
3
Bill needs to pay £50 to Lily
Bill needs to pay £50 to Lisa
Lily needs to pay £50 to Andy
Lily needs to pay £50 to Andy
4
Bill needs to pay £50 to Lily
Bill needs to pay £50 to Lisa
Lily needs to pay £50 to Andy
Bill signed
Bill signed
Lily signed
…...
Digital Signature
6
Transaction Digital Signature
Bill needs to pay £50 to Lily signature1xxxx
Bill needs to pay £50 to Lisa signature2xxxx
Lily needs to pay £50 to Andy signature3xxxx
7
Transaction Digital Signature
Bill needs to pay £51 to Lily signature1xxxx
Bill needs to pay £50 to Lisa signature2xxxx
Lily needs to pay £50 to Andy signature3xxxx
8
SHA-256
secure hash algorithm
Digest::SHA256.hexdigest 'Bill
needs to pay £50 to Lily'
"1cbb5cb1831bbab61070b25341
ac3898fb5dcd40d607a7c50acd6
b63f9ed0e93"
9
Digest::SHA256.hexdigest 'Bill
needs to pay £50 to Lily'
"1cbb5cb1831bbab61070b25341
ac3898fb5dcd40d607a7c50acd6
b63f9ed0e93"
Digest::SHA256.hexdigest 'Bill
needs to pay £50 to Lily.'
"c04c79682b701328dd2ac96bd9
be282763a18319ffa3e6e70e64f6
56e538508a"
Digest::SHA256.hexdigest 'Bill
needs to pay £50 to Lisa'
"7c8e0549760456d0030ec2ff78a
b1289af0e7be71e3aa22b215bad
c8a9348c8"
10
Transaction Digital Signature
Bill needs to pay £50 to Lily SHA256(Bill needs to pay £50 to
Lily)
Bill needs to pay £50 to Lisa SHA256(Bill needs to pay £50 to
Lisa)
Lily needs to pay £50 to Andy SHA256(Lily needs to pay £50 to
Andy)
Identifiability?
Public-key
cryptography
12
2
5201314
Encrypt
7423536
2
Decrypt
5201314
13
Private
key5201314
Encrypt
1150641
3127484
2252621
6519612
Public
key
Decrypt
5201314
Public-key
cryptography
14
Bill’s Private
key
SHA256(Bill
needs to
pay £50 to
Lily)
Encrypt
1150641
3127484
2252621
6519612
Bill’s Public key
Decrypt
SHA256(Bill
needs to
pay £50 to
Lily)
Original
message
Hash1
SHA256(Receive
message)
Hash2
If Hash1 == Hash2
Signature is specifically
for this record
The signature is Bill’s
The original message is
the same as received
one
15
Transaction Digital Signature
Bill needs to pay £50 to Lily Bill’s private-key
encrypt[SHA256(Bill needs to pay
£50 to Lily)]
Bill needs to pay £50 to Lisa Bill’s private-key
encrypt[SHA256(Bill needs to pay
£50 to Lisa)]
Lily needs to pay £50 to Andy Lily’s private-key
encrypt[SHA256(Lily needs to pay
£50 to Andy)]
Bitcoin
“Bitcoin: Peer to Peer
Electronic Cash System”
- Satoshi Nakamoto
(November, 2008)
17
18
£
19
Immediately
Issue: How to check
Bill has enough
funds
Lily needs to pay £50 to
Andy
Lily paid BTC50 to Andy
20
Transaction Digital Signature
Bill paid BTC50 to Lily Bill’s private-key
encrypt[SHA256(Bill paid BTC50
to Lily)]
Bill paid BTC50 to Lisa Bill’s private-key
encrypt[SHA256(Bill paid BTC50
to Lisa)]
Bill paid BTC50 to Lily -> Lily paid
BTC50 to Andy
Lily’s private-key
encrypt[SHA256(Bill paid BTC50
to Lily -> Lily paid BTC50 to Andy)]
When Andy is receiving
BTC50 >= BTC50
SHA256(the message) = Hash1
Use Lily’s public-key
decrypt[record signature] =
Hash2
Hash1 == Hash2
21
When Lily is paying
The message:
Bill paid BTC50 to Lily -> Lily paid
BTC50 to Andy
Record signature:
Lily’s private-key
encrypt[SHA256(Bill paid BTC50
to Lily -> Lily paid BTC50 to
Andy)]
Payee publick-key:
Lily’s public-key
22
Transaction Digital Signature
Bill’s UID paid BTC50 to Lily’s
UID
Bill’s private-key
encrypt[SHA256(Bill’s UID paid
BTC50 to Lily)]
Bill’s UID paid BTC50 to Lisa’s
UID
Bill’s private-key
encrypt[SHA256(Bill’s UID paid
BTC50 to Lisa’s UID)]
Bill’s UID paid BTC50 to Lily’s
UID -> Lily’s UID paid BTC50 to
Andy’s UID
Lily’s private-key
encrypt[SHA256(Bill’s UID paid
BTC50 to Lily’s UID -> Lily’s UID
paid BTC50 to Andy’s UID)]
Peer-to-Peer &
Blockchain
24
Three consensus
problems:
1. Synchronisation
2. Manipulation
3. Double spend
25
Blockchain:
Block
0
Block
1
Block
2
The last
Block
All the transactions are recorded in the block.
The whole BTC network maintains only ONE blockchain
New block with new transactions will be appended to the
chain
Transaction A
26
New block:
Transaction B
Transaction C
…………...
Created by the miner
27
There are many miners so there are many new blocks
generated
Solution:
By requiring the miners to complete a math task before
broadcasting to the network. The task is complicated so that in
every ten minutes there’s only one miner can solve it in the
entire network. It limits the amount of new blocks in an interval
time period.
28
Task step 1:
Get a string A derived from (SHA256 of the previous block +
new block metadata + all transactions in the new block)
The SHA256 of the previous block means the output of
SHA256(all the information of the previous block)
In Blockchain, every block has its previous block’s SHA256.
Blockchain is using the previous block’s SHA256 to link all
blocks as a unique chian.
Task step 2:
Find a RANDOM number (called Nonce, number used once),
append this number to the end of the step 1 string A as a new
string B.
SHA256(string B) outputs a 256-bit binary numbers, if the
leading 72 bits are all 0s, this random number is right and task
completed.Otherwise, try another random number.
It requires on average 2**72 times of calculation in order to find
the correct number.
29
30
Created by the miner
Add the Nonce to the new
block
All nodes on the network
validate the new block:
SHA256(SHA256 of the
previous block + new block
metadata + all transactions in
the new block + the Nonce)
31
The better machines miners
have the better chance to find
the Nonce.
32
Three consensus problems:
1. Synchronisation
a. The entire network maintains only the longest blockchain
b. When BitcoinWallet is connected to the network, automatically
requests the missing blocks, validate then add to own
blockchain
2. Manipulation
a. Any change to any block, the SHA256 of the block is changed
so the chain is broken.
b. Hacker could create a new longest chain only if the hacker has
the computing capacity to defeat more than 50% of the entire
network.
3. Double spend
a. Check if the BTC is used in the previous transactions
Blockchain usages
33
User profile data. Stores in blockchain,
customers to control what to sell/share,
how much they worth. All the trusted
information.
IoT to collect data, Blockchain to
transfer trusted data, AI to process the
data
34
Thanks!

More Related Content

Similar to Blockchain

Similar to Blockchain (20)

Anatomy of a Bitcoin transaction
Anatomy of a Bitcoin transactionAnatomy of a Bitcoin transaction
Anatomy of a Bitcoin transaction
 
Bitcoin
Bitcoin Bitcoin
Bitcoin
 
Bitcoin and Blockchain 101
Bitcoin and Blockchain 101Bitcoin and Blockchain 101
Bitcoin and Blockchain 101
 
Blockchain explained (Technology running Bitcoin)
Blockchain explained (Technology running Bitcoin)Blockchain explained (Technology running Bitcoin)
Blockchain explained (Technology running Bitcoin)
 
Intro to Bitcoin
Intro to BitcoinIntro to Bitcoin
Intro to Bitcoin
 
Smart contracts and applications part I
Smart contracts and applications   part ISmart contracts and applications   part I
Smart contracts and applications part I
 
notes.pdf
notes.pdfnotes.pdf
notes.pdf
 
Blockchain mechanics
Blockchain mechanicsBlockchain mechanics
Blockchain mechanics
 
Study on Bitcoin
Study on Bitcoin Study on Bitcoin
Study on Bitcoin
 
PRESENTATION.pptx
PRESENTATION.pptxPRESENTATION.pptx
PRESENTATION.pptx
 
sfrontori-bitcoin-technical intro-meetup2014
sfrontori-bitcoin-technical intro-meetup2014sfrontori-bitcoin-technical intro-meetup2014
sfrontori-bitcoin-technical intro-meetup2014
 
Intro. to Lightning Network (Bitcoin/Litecoin) - Blockchain Developers Malaysia
Intro. to Lightning Network (Bitcoin/Litecoin) - Blockchain Developers MalaysiaIntro. to Lightning Network (Bitcoin/Litecoin) - Blockchain Developers Malaysia
Intro. to Lightning Network (Bitcoin/Litecoin) - Blockchain Developers Malaysia
 
Tutorial blockchain technical overview-ss
Tutorial blockchain technical overview-ssTutorial blockchain technical overview-ss
Tutorial blockchain technical overview-ss
 
20170620 MEETUP intro to blockchain and smart contracts (1)
20170620 MEETUP intro to blockchain and smart contracts (1)20170620 MEETUP intro to blockchain and smart contracts (1)
20170620 MEETUP intro to blockchain and smart contracts (1)
 
BlockChain_and _cryptocurrency_technology (1).ppt
BlockChain_and _cryptocurrency_technology (1).pptBlockChain_and _cryptocurrency_technology (1).ppt
BlockChain_and _cryptocurrency_technology (1).ppt
 
Blockchain
BlockchainBlockchain
Blockchain
 
Bitcoin - Understanding and Assessing potential Opportunities
Bitcoin - Understanding and Assessing potential OpportunitiesBitcoin - Understanding and Assessing potential Opportunities
Bitcoin - Understanding and Assessing potential Opportunities
 
A primer on Bitcoin Technology
A primer on Bitcoin TechnologyA primer on Bitcoin Technology
A primer on Bitcoin Technology
 
Blockchain, Bitcoin, Mining - My Product School Presentation
Blockchain, Bitcoin, Mining - My Product School Presentation Blockchain, Bitcoin, Mining - My Product School Presentation
Blockchain, Bitcoin, Mining - My Product School Presentation
 
Bitcoin (Cryptocurrency)
Bitcoin (Cryptocurrency)Bitcoin (Cryptocurrency)
Bitcoin (Cryptocurrency)
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Recently uploaded (20)

TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 

Blockchain

  • 3. 3 Bill needs to pay £50 to Lily Bill needs to pay £50 to Lisa Lily needs to pay £50 to Andy Lily needs to pay £50 to Andy
  • 4. 4 Bill needs to pay £50 to Lily Bill needs to pay £50 to Lisa Lily needs to pay £50 to Andy Bill signed Bill signed Lily signed …...
  • 6. 6 Transaction Digital Signature Bill needs to pay £50 to Lily signature1xxxx Bill needs to pay £50 to Lisa signature2xxxx Lily needs to pay £50 to Andy signature3xxxx
  • 7. 7 Transaction Digital Signature Bill needs to pay £51 to Lily signature1xxxx Bill needs to pay £50 to Lisa signature2xxxx Lily needs to pay £50 to Andy signature3xxxx
  • 8. 8 SHA-256 secure hash algorithm Digest::SHA256.hexdigest 'Bill needs to pay £50 to Lily' "1cbb5cb1831bbab61070b25341 ac3898fb5dcd40d607a7c50acd6 b63f9ed0e93"
  • 9. 9 Digest::SHA256.hexdigest 'Bill needs to pay £50 to Lily' "1cbb5cb1831bbab61070b25341 ac3898fb5dcd40d607a7c50acd6 b63f9ed0e93" Digest::SHA256.hexdigest 'Bill needs to pay £50 to Lily.' "c04c79682b701328dd2ac96bd9 be282763a18319ffa3e6e70e64f6 56e538508a" Digest::SHA256.hexdigest 'Bill needs to pay £50 to Lisa' "7c8e0549760456d0030ec2ff78a b1289af0e7be71e3aa22b215bad c8a9348c8"
  • 10. 10 Transaction Digital Signature Bill needs to pay £50 to Lily SHA256(Bill needs to pay £50 to Lily) Bill needs to pay £50 to Lisa SHA256(Bill needs to pay £50 to Lisa) Lily needs to pay £50 to Andy SHA256(Lily needs to pay £50 to Andy) Identifiability?
  • 14. 14 Bill’s Private key SHA256(Bill needs to pay £50 to Lily) Encrypt 1150641 3127484 2252621 6519612 Bill’s Public key Decrypt SHA256(Bill needs to pay £50 to Lily) Original message Hash1 SHA256(Receive message) Hash2 If Hash1 == Hash2 Signature is specifically for this record The signature is Bill’s The original message is the same as received one
  • 15. 15 Transaction Digital Signature Bill needs to pay £50 to Lily Bill’s private-key encrypt[SHA256(Bill needs to pay £50 to Lily)] Bill needs to pay £50 to Lisa Bill’s private-key encrypt[SHA256(Bill needs to pay £50 to Lisa)] Lily needs to pay £50 to Andy Lily’s private-key encrypt[SHA256(Lily needs to pay £50 to Andy)]
  • 17. “Bitcoin: Peer to Peer Electronic Cash System” - Satoshi Nakamoto (November, 2008) 17
  • 18. 18 £
  • 19. 19 Immediately Issue: How to check Bill has enough funds Lily needs to pay £50 to Andy Lily paid BTC50 to Andy
  • 20. 20 Transaction Digital Signature Bill paid BTC50 to Lily Bill’s private-key encrypt[SHA256(Bill paid BTC50 to Lily)] Bill paid BTC50 to Lisa Bill’s private-key encrypt[SHA256(Bill paid BTC50 to Lisa)] Bill paid BTC50 to Lily -> Lily paid BTC50 to Andy Lily’s private-key encrypt[SHA256(Bill paid BTC50 to Lily -> Lily paid BTC50 to Andy)]
  • 21. When Andy is receiving BTC50 >= BTC50 SHA256(the message) = Hash1 Use Lily’s public-key decrypt[record signature] = Hash2 Hash1 == Hash2 21 When Lily is paying The message: Bill paid BTC50 to Lily -> Lily paid BTC50 to Andy Record signature: Lily’s private-key encrypt[SHA256(Bill paid BTC50 to Lily -> Lily paid BTC50 to Andy)] Payee publick-key: Lily’s public-key
  • 22. 22 Transaction Digital Signature Bill’s UID paid BTC50 to Lily’s UID Bill’s private-key encrypt[SHA256(Bill’s UID paid BTC50 to Lily)] Bill’s UID paid BTC50 to Lisa’s UID Bill’s private-key encrypt[SHA256(Bill’s UID paid BTC50 to Lisa’s UID)] Bill’s UID paid BTC50 to Lily’s UID -> Lily’s UID paid BTC50 to Andy’s UID Lily’s private-key encrypt[SHA256(Bill’s UID paid BTC50 to Lily’s UID -> Lily’s UID paid BTC50 to Andy’s UID)]
  • 25. 25 Blockchain: Block 0 Block 1 Block 2 The last Block All the transactions are recorded in the block. The whole BTC network maintains only ONE blockchain New block with new transactions will be appended to the chain
  • 26. Transaction A 26 New block: Transaction B Transaction C …………... Created by the miner
  • 27. 27 There are many miners so there are many new blocks generated Solution: By requiring the miners to complete a math task before broadcasting to the network. The task is complicated so that in every ten minutes there’s only one miner can solve it in the entire network. It limits the amount of new blocks in an interval time period.
  • 28. 28 Task step 1: Get a string A derived from (SHA256 of the previous block + new block metadata + all transactions in the new block) The SHA256 of the previous block means the output of SHA256(all the information of the previous block) In Blockchain, every block has its previous block’s SHA256. Blockchain is using the previous block’s SHA256 to link all blocks as a unique chian.
  • 29. Task step 2: Find a RANDOM number (called Nonce, number used once), append this number to the end of the step 1 string A as a new string B. SHA256(string B) outputs a 256-bit binary numbers, if the leading 72 bits are all 0s, this random number is right and task completed.Otherwise, try another random number. It requires on average 2**72 times of calculation in order to find the correct number. 29
  • 30. 30 Created by the miner Add the Nonce to the new block All nodes on the network validate the new block: SHA256(SHA256 of the previous block + new block metadata + all transactions in the new block + the Nonce)
  • 31. 31 The better machines miners have the better chance to find the Nonce.
  • 32. 32 Three consensus problems: 1. Synchronisation a. The entire network maintains only the longest blockchain b. When BitcoinWallet is connected to the network, automatically requests the missing blocks, validate then add to own blockchain 2. Manipulation a. Any change to any block, the SHA256 of the block is changed so the chain is broken. b. Hacker could create a new longest chain only if the hacker has the computing capacity to defeat more than 50% of the entire network. 3. Double spend a. Check if the BTC is used in the previous transactions
  • 33. Blockchain usages 33 User profile data. Stores in blockchain, customers to control what to sell/share, how much they worth. All the trusted information. IoT to collect data, Blockchain to transfer trusted data, AI to process the data

Editor's Notes

  1. Why would miners are willing to upgrade the devices, validate the transactions? The whole world comes for profit Reward BTC 12.5 if the new block is added The transaction fee in the block is BTC 1-4 On average each new block miner awards 14.5 BTC, total xxx