SlideShare a Scribd company logo
1 of 39
BLOCKCHAIN and BITCOIN
Hugo Rodrigues | KB Samaha
November, 2016
The concept
• Bitcoin is a distributed
• peer-to-peer
• digital currency that can be transferred instantly
and securely between any two people in the
world.
• It's like electronic cash that you can use to pay
friends or merchants.
What Is Bitcoin?
Bitcoin Whitepaper – 2008.10.31*
* Halloween
Bitcoin Video
https://www.youtube.com/watch?v=Gc2en3nHxA4#action=share
Why does it have value?
•The worth of a thing
•is the price it will bring
Rai Stones of Yap
How much Bitcoin worth ?
As of today 11/10/16 ?
Bitcoin : Currency and technology
• Mining
• 21 million
• Volatile value
• >50% in hands of 880 individuals
• Litecoin, Ripple, Zerocoin
Currency
“Satoshi Nakamoto”
2009
• Blockchain
• Distributed shared ledger
• Cryptograhy (SHA‐256, PKI)
• Consensus model
• Smart contracts
Technology
8
Blockchain Defined
Simply defined a Blockchain is little more than a:
• Distributed
• Secure
• Logfile - ledger
A digital currency was in a lot of ways the first demonstrable use
4 key concepts of blockchain
Distributedshared ledger Cryptography
Consensus Smart contracts
Distributed shared ledgers
• Group of replicated logs/databases (nodes)
• Transactions distributed in blocks
• All nodes hold all transactions
• Parties identified with public key (= anonymised)
• Accessibility of transactions depending on blockchain implementation
• Resilient for failure of one or more nodes
• Group of nodes operate tamper proof
Network Evolution
Cryptography
Hashing functions
Creation of a bit string (digest) representingintegrityof content other string. Changing one character in the original string results in complete different has.
Changing multiple characters in original string that results in the same hash requireslarge amount of processing power for a long period of time.
13
Public & private keys and wallets
Two large prime numbers that have a mathematical relation with each other.A string encrypted with one key can only be decrypted with the other. One
key needs to be kept private,the other one can be made publicly known so that it can be used by other parties to exchange data with you in a secure
manner. Private keys need to be storedthat it is accessible only for owner. This can be done on personal devices(PC, smart card, USB stick, phone, …)or
remotelywith a service provider (cold and hot wallets).
Encryption
Scrambling of clear text withthe public key of the recipient so that the holder of that private key is the only one that can descramble the message. This is
used to guarantee the confidentiality of the data exchanged.
Digital signature
Encryption of hash representingof original data to be secured with the private key of the sender (called digital signature) that is decrypted by the recipient
with the public of the sender.If the decryptedhash matches the content of the original data it implies two things. First, the encryption can only be
performedwith the private key corresponding with public key and secondly, the original data can’t be tamperedwith.
Consensus
• Consensus = Majority of nodes agree on validity of transactions
• Includes validation on double‐spending
• Permissionless (public) vs. permissioned (private) blockchain setup
• Proof‐of‐work / proof‐of‐stake the proof validity of node
(only applicable for permissionless network)
14
Smart Contracts
• Business logic that can be assigned to a transaction on the blockchain
• Acts as a ‘notary’ of blockchain transactions
• Holds conditions under which specific actions can/must be perfomed
• Facilitates escrow services
• Can’t be modified without predefined permissions
15
Potential of blockchain extends across a wide
range of application areas
Financial Services
• Payments
• Securities registration & processing
• Lending
Governmental services
• Voting
• Registrations (passports, driving license)
• Permits
Trade
• Document exchange
• Asset exchange
• Escrow services
• Trade agreements
• Property
• Real estate
• Intellectual property
• Cars
• Identification & Security
• Party/device registration
• Authentication
• Access control
• Internet of Things (IoT)
• Autonomous devices, such as
• Cars
• Drones
• Robots
Technology principles
Sending Bitcoins - example
I’LL send 0.1
Bitcoin to Bob.
Alice
$ F T
Protocol: sending BTC
1. Craft a transaction.
2. Give it to your
computer.
Protocol: participating
On valid transactions:
1. Update ledger
2. Relay transaction
Addresses are like Accounts
• The wallet listens for transactions addressed to any of its public keys
• In theory - is the only node that is able to decrypt and accept the transfer
• “Coins” are “sent” by broadcasting the transaction to the network
which are verified to be viable and then added to a block
• Keys can represent a MULTI-SIG address that requires a N of M private
keys in order to decrypt the message
• N private keys
• M keys
19
A 2of3 multisig address can be created by following these steps:
1.Gather (or generate) 3 bitcoin addresses, on whichever machines will be participating, using getnewaddress or
getaccountaddress RPC commands (or copy and paste from the GUI).
2.Get their public keys using the validateaddress RPC command 3 times.
3.Then create a 2-of-3 multisig address using addmultisigaddress;
e.g.
addmultisigaddress returns the multisignature address
 Public keys are raw hexadecimal and don't contain checksums like bitcoin addresses do.
 Send funds into that 2-of-3 transaction using the normal sendtoaddress/sendmany RPC commands
Creating a Multisignature Address
bitcoind addmultisigaddress 2
'["044322868cb17d64dcc22185ae2d4493111d73244c3668f8ac79ecc79c0ba8d30a6756d0fa20157
709af3281cc721c7f53321a8cabda29b77900b7e4fe0174b114","..second pubkey..","..third pubkey.."]’
Assuring Pseudo Anonymity
• Using public key cryptography, specifically:
Elliptic Curve Cryptography due to its
• Key strength
• Shorter keys
• Transactions are sent to public key “addresses” eg:
1AjYPi8qryPCJu6xgdJuQzVnWFXLmxq9s3
1Give4dbry2pyJihnpqV6Urq2SGEhpz3K
21
Example - https://blockchain.info/
Blocks
A block 𝐵 contains
 RH(𝐵′) for another block 𝐵′,
 a list of transactions,
 and an arbitrary number
“nonce”.
Block 𝐵 is valid if the
first 𝑑 = 5 digits of the
hash of 𝐵 are all zero.
8046465385222
0000031105830
0000077326777
RH
=
A Tree of Blocks
If we have a block, with a
bit of work, we can find a
“next block”…
...and yet another “next
block”…
…or a block which
continues here…
… and so on.
Random Hash Function
In practice, we hope that SHA256 behaves “like a random oracle”.
SHA256: TextFiles → 0, … , 2256
− 1
Calculation:
If we made all computers on the world compute SHA256…
It takes ~“40 × 14 ⋅ 109
years” to find 𝑥1 ≠ 𝑥2 s.t.
SHA256 𝑥1 = SHA256 𝑥2 .
• We need a protocol to agree on a transaction.
• “Consensus protocols”. Studied since 1980, starting
with Pease, Shostak, Lamport.
• Main idea for protocols:
Consensus Protocols
What transaction
are you using?
Protocols work if (say) >
70% of the computers
follow the protocol.
The Protocol - for Finding Blocks
Protocol: finding blocks
1. Take the longest chain you
can find.
2. Collect transactions.
3. Find a new valid block here.
4. Publish it.
The Protocol - for Participants
Protocol: To know who owns BTC
1. Take the longest chain you
can find.
2. Process the transactions in
this chain in order
“proof of work” - node generating a block needs to prove that it has put
enough computing resources to solve a mathematical puzzle.
Transaction order protection
Mathematical race to protect transactions
Why work to find blocks?
Many people are trying to find blocks, which uses a lot of resources…
A real lot!
This is called “mining”
“What is Bitcoin Mining” – Video
http://www.bitcoinmining.com
34
Risks
Double Spending
I can exploit this!
Black Hat
Alice
Bob
: Give BTC from Black Hat to Alice
: Give BTC from Black Hat to Bob
Black Hat prepares
two transactions:
These transactions
spend previously
spent bitcoins!
Thanks
!
Thanks
!
Build an Alternate Chain?
The more RH-calls are
devoted to a chain, the
faster it grows.
Thus, intuitively: to
build a chain as fast as
the rest, you need as
many RH-calls as the
rest.
Maybe I should
build another
chain?
Distributed Denial of Service Attacks (DDoS)
If I cannot cheat bitcoin,
maybe I can mess it up!
Interesting idea…
…and while Bitcoin
incorporates many,
many rules to handle
this…
…people still try!
• Using computing power of third parties to achieve faster mining
performance (without knowledge and consent of the third party)
• The 51% cartel attack
• A Goldfinger attack (Sabatoge: "Losing" Bitcoins)
Mining problems
Improving Bitcoin: Open Problem
• Computing SHA256 around 2 × 1017 times per
second seems like a big waste of energy.
• Back of the envelope calculation gives a daily energy
use of 5.000.000+ kWh (> $500.000+)
• Can we improve the situation?
(There is previous work which studies this).

More Related Content

What's hot

What's hot (20)

Understanding Blockchain
Understanding BlockchainUnderstanding Blockchain
Understanding Blockchain
 
Cryptocurrency for Dummies
Cryptocurrency for DummiesCryptocurrency for Dummies
Cryptocurrency for Dummies
 
Blockchain Security Issues and Challenges
Blockchain Security Issues and Challenges Blockchain Security Issues and Challenges
Blockchain Security Issues and Challenges
 
Blockchain
BlockchainBlockchain
Blockchain
 
Cryptocurrency
CryptocurrencyCryptocurrency
Cryptocurrency
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Blockchain in Banking, Business and Beyond
Blockchain in Banking, Business and BeyondBlockchain in Banking, Business and Beyond
Blockchain in Banking, Business and Beyond
 
what is bitcoin, its history and detail
what is bitcoin, its history and detailwhat is bitcoin, its history and detail
what is bitcoin, its history and detail
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Blockchain concepts
Blockchain conceptsBlockchain concepts
Blockchain concepts
 
Blockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for DummiesBlockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for Dummies
 
Blockchain Technology And Cryptocurrency
Blockchain Technology And CryptocurrencyBlockchain Technology And Cryptocurrency
Blockchain Technology And Cryptocurrency
 
A Secure Model of IoT Using Blockchain
A Secure Model of IoT Using BlockchainA Secure Model of IoT Using Blockchain
A Secure Model of IoT Using Blockchain
 
Types of blockchain
Types of blockchainTypes of blockchain
Types of blockchain
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain Introduction Presentation
Blockchain Introduction PresentationBlockchain Introduction Presentation
Blockchain Introduction Presentation
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts
 

Viewers also liked

Introduction to Bitcoin and ECDSA
Introduction to Bitcoin and ECDSAIntroduction to Bitcoin and ECDSA
Introduction to Bitcoin and ECDSA
Nikesh Mistry
 

Viewers also liked (6)

Bitcoin 101: The Currency, The Network, The Community
Bitcoin 101: The Currency, The Network, The CommunityBitcoin 101: The Currency, The Network, The Community
Bitcoin 101: The Currency, The Network, The Community
 
Demysitifying Bitcoin and Blockchain
Demysitifying Bitcoin and Blockchain Demysitifying Bitcoin and Blockchain
Demysitifying Bitcoin and Blockchain
 
Blockchain Vision
Blockchain VisionBlockchain Vision
Blockchain Vision
 
Introduction to Bitcoin and ECDSA
Introduction to Bitcoin and ECDSAIntroduction to Bitcoin and ECDSA
Introduction to Bitcoin and ECDSA
 
Concept of BlockChain & Decentralized Application
Concept of BlockChain & Decentralized ApplicationConcept of BlockChain & Decentralized Application
Concept of BlockChain & Decentralized Application
 
Blockchain: The Information Technology of the Future
Blockchain: The Information Technology of the FutureBlockchain: The Information Technology of the Future
Blockchain: The Information Technology of the Future
 

Similar to Blockchain and Bitcoin

Similar to Blockchain and Bitcoin (20)

Blockchain.pptx
Blockchain.pptxBlockchain.pptx
Blockchain.pptx
 
Bitcoin, Banking and the Blockchain
Bitcoin, Banking and the BlockchainBitcoin, Banking and the Blockchain
Bitcoin, Banking and the Blockchain
 
Crypto currency - a digital asset
Crypto currency - a digital asset Crypto currency - a digital asset
Crypto currency - a digital asset
 
Blockchain External.pdf
Blockchain External.pdfBlockchain External.pdf
Blockchain External.pdf
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Block chain introduction
Block chain introductionBlock chain introduction
Block chain introduction
 
Cryptocurrencies.pptx
Cryptocurrencies.pptxCryptocurrencies.pptx
Cryptocurrencies.pptx
 
Cryptocurrency-Bitcoin
Cryptocurrency-BitcoinCryptocurrency-Bitcoin
Cryptocurrency-Bitcoin
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain & crypto
Blockchain & cryptoBlockchain & crypto
Blockchain & crypto
 
Trading-CryptoCurrency-Advanced-Trading-Strategies.pdf
Trading-CryptoCurrency-Advanced-Trading-Strategies.pdfTrading-CryptoCurrency-Advanced-Trading-Strategies.pdf
Trading-CryptoCurrency-Advanced-Trading-Strategies.pdf
 
Trading-CryptoCurrency-Advanced-Trading-Strategies.pdf
Trading-CryptoCurrency-Advanced-Trading-Strategies.pdfTrading-CryptoCurrency-Advanced-Trading-Strategies.pdf
Trading-CryptoCurrency-Advanced-Trading-Strategies.pdf
 
Bitcoin Cryptocurrency
Bitcoin CryptocurrencyBitcoin Cryptocurrency
Bitcoin Cryptocurrency
 
CRYPTO CURRENCY.pptx
CRYPTO CURRENCY.pptxCRYPTO CURRENCY.pptx
CRYPTO CURRENCY.pptx
 
Bitcoin 101 - Certified Bitcoin Professional Training Session
Bitcoin 101 - Certified Bitcoin Professional Training SessionBitcoin 101 - Certified Bitcoin Professional Training Session
Bitcoin 101 - Certified Bitcoin Professional Training Session
 
Blockchain meetup
Blockchain meetupBlockchain meetup
Blockchain meetup
 
Blockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBlockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOs
 
Introduction to Blockchain and Cryptocurrencies
Introduction to Blockchain and CryptocurrenciesIntroduction to Blockchain and Cryptocurrencies
Introduction to Blockchain and Cryptocurrencies
 
An in depth presentation of Cryptocurrency.
An in depth presentation of Cryptocurrency.An in depth presentation of Cryptocurrency.
An in depth presentation of Cryptocurrency.
 
Blockchain - Presentacion Betabeers Galicia 10/12/2014
Blockchain - Presentacion Betabeers Galicia 10/12/2014Blockchain - Presentacion Betabeers Galicia 10/12/2014
Blockchain - Presentacion Betabeers Galicia 10/12/2014
 

More from Hugo Rodrigues

Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
Hugo Rodrigues
 

More from Hugo Rodrigues (15)

Evolution security controls towards Cloud Services
Evolution security controls towards Cloud ServicesEvolution security controls towards Cloud Services
Evolution security controls towards Cloud Services
 
Paper: Crypto Currency Mining
Paper: Crypto Currency MiningPaper: Crypto Currency Mining
Paper: Crypto Currency Mining
 
Alibaba goes India
Alibaba goes IndiaAlibaba goes India
Alibaba goes India
 
RISE AND FALL ON CORPORATE UNCERTAINTY
RISE AND FALL ON CORPORATE UNCERTAINTYRISE AND FALL ON CORPORATE UNCERTAINTY
RISE AND FALL ON CORPORATE UNCERTAINTY
 
Apresentação Produtividade e Desempenho
Apresentação Produtividade e DesempenhoApresentação Produtividade e Desempenho
Apresentação Produtividade e Desempenho
 
Relatório candidatura QREN
Relatório candidatura QRENRelatório candidatura QREN
Relatório candidatura QREN
 
Modelo de segmentação de Clientes
Modelo de segmentação de ClientesModelo de segmentação de Clientes
Modelo de segmentação de Clientes
 
TAEG: nominal - real- efectiva
TAEG: nominal - real- efectivaTAEG: nominal - real- efectiva
TAEG: nominal - real- efectiva
 
Investigação Operacional // How to raise up to 80% gross margin based in effi...
Investigação Operacional // How to raise up to 80% gross margin based in effi...Investigação Operacional // How to raise up to 80% gross margin based in effi...
Investigação Operacional // How to raise up to 80% gross margin based in effi...
 
Projeto de Controlo de Silo para Parqueamento
Projeto de Controlo de Silo para ParqueamentoProjeto de Controlo de Silo para Parqueamento
Projeto de Controlo de Silo para Parqueamento
 
Rede Social // Social Network for Kids #Concept
Rede Social // Social Network for Kids #ConceptRede Social // Social Network for Kids #Concept
Rede Social // Social Network for Kids #Concept
 
SOA - Service Oriented Architecture
SOA - Service Oriented ArchitectureSOA - Service Oriented Architecture
SOA - Service Oriented Architecture
 
Análise Organizacional Zack
Análise Organizacional ZackAnálise Organizacional Zack
Análise Organizacional Zack
 
Soluções Sector Financeiro
Soluções Sector FinanceiroSoluções Sector Financeiro
Soluções Sector Financeiro
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Blockchain and Bitcoin

  • 1. BLOCKCHAIN and BITCOIN Hugo Rodrigues | KB Samaha November, 2016
  • 3. • Bitcoin is a distributed • peer-to-peer • digital currency that can be transferred instantly and securely between any two people in the world. • It's like electronic cash that you can use to pay friends or merchants. What Is Bitcoin?
  • 4. Bitcoin Whitepaper – 2008.10.31* * Halloween
  • 6. Why does it have value? •The worth of a thing •is the price it will bring Rai Stones of Yap
  • 7. How much Bitcoin worth ? As of today 11/10/16 ?
  • 8. Bitcoin : Currency and technology • Mining • 21 million • Volatile value • >50% in hands of 880 individuals • Litecoin, Ripple, Zerocoin Currency “Satoshi Nakamoto” 2009 • Blockchain • Distributed shared ledger • Cryptograhy (SHA‐256, PKI) • Consensus model • Smart contracts Technology 8
  • 9. Blockchain Defined Simply defined a Blockchain is little more than a: • Distributed • Secure • Logfile - ledger A digital currency was in a lot of ways the first demonstrable use
  • 10. 4 key concepts of blockchain Distributedshared ledger Cryptography Consensus Smart contracts
  • 11. Distributed shared ledgers • Group of replicated logs/databases (nodes) • Transactions distributed in blocks • All nodes hold all transactions • Parties identified with public key (= anonymised) • Accessibility of transactions depending on blockchain implementation • Resilient for failure of one or more nodes • Group of nodes operate tamper proof
  • 13. Cryptography Hashing functions Creation of a bit string (digest) representingintegrityof content other string. Changing one character in the original string results in complete different has. Changing multiple characters in original string that results in the same hash requireslarge amount of processing power for a long period of time. 13 Public & private keys and wallets Two large prime numbers that have a mathematical relation with each other.A string encrypted with one key can only be decrypted with the other. One key needs to be kept private,the other one can be made publicly known so that it can be used by other parties to exchange data with you in a secure manner. Private keys need to be storedthat it is accessible only for owner. This can be done on personal devices(PC, smart card, USB stick, phone, …)or remotelywith a service provider (cold and hot wallets). Encryption Scrambling of clear text withthe public key of the recipient so that the holder of that private key is the only one that can descramble the message. This is used to guarantee the confidentiality of the data exchanged. Digital signature Encryption of hash representingof original data to be secured with the private key of the sender (called digital signature) that is decrypted by the recipient with the public of the sender.If the decryptedhash matches the content of the original data it implies two things. First, the encryption can only be performedwith the private key corresponding with public key and secondly, the original data can’t be tamperedwith.
  • 14. Consensus • Consensus = Majority of nodes agree on validity of transactions • Includes validation on double‐spending • Permissionless (public) vs. permissioned (private) blockchain setup • Proof‐of‐work / proof‐of‐stake the proof validity of node (only applicable for permissionless network) 14
  • 15. Smart Contracts • Business logic that can be assigned to a transaction on the blockchain • Acts as a ‘notary’ of blockchain transactions • Holds conditions under which specific actions can/must be perfomed • Facilitates escrow services • Can’t be modified without predefined permissions 15
  • 16. Potential of blockchain extends across a wide range of application areas Financial Services • Payments • Securities registration & processing • Lending Governmental services • Voting • Registrations (passports, driving license) • Permits Trade • Document exchange • Asset exchange • Escrow services • Trade agreements • Property • Real estate • Intellectual property • Cars • Identification & Security • Party/device registration • Authentication • Access control • Internet of Things (IoT) • Autonomous devices, such as • Cars • Drones • Robots
  • 18. Sending Bitcoins - example I’LL send 0.1 Bitcoin to Bob. Alice $ F T Protocol: sending BTC 1. Craft a transaction. 2. Give it to your computer. Protocol: participating On valid transactions: 1. Update ledger 2. Relay transaction
  • 19. Addresses are like Accounts • The wallet listens for transactions addressed to any of its public keys • In theory - is the only node that is able to decrypt and accept the transfer • “Coins” are “sent” by broadcasting the transaction to the network which are verified to be viable and then added to a block • Keys can represent a MULTI-SIG address that requires a N of M private keys in order to decrypt the message • N private keys • M keys 19
  • 20. A 2of3 multisig address can be created by following these steps: 1.Gather (or generate) 3 bitcoin addresses, on whichever machines will be participating, using getnewaddress or getaccountaddress RPC commands (or copy and paste from the GUI). 2.Get their public keys using the validateaddress RPC command 3 times. 3.Then create a 2-of-3 multisig address using addmultisigaddress; e.g. addmultisigaddress returns the multisignature address  Public keys are raw hexadecimal and don't contain checksums like bitcoin addresses do.  Send funds into that 2-of-3 transaction using the normal sendtoaddress/sendmany RPC commands Creating a Multisignature Address bitcoind addmultisigaddress 2 '["044322868cb17d64dcc22185ae2d4493111d73244c3668f8ac79ecc79c0ba8d30a6756d0fa20157 709af3281cc721c7f53321a8cabda29b77900b7e4fe0174b114","..second pubkey..","..third pubkey.."]’
  • 21. Assuring Pseudo Anonymity • Using public key cryptography, specifically: Elliptic Curve Cryptography due to its • Key strength • Shorter keys • Transactions are sent to public key “addresses” eg: 1AjYPi8qryPCJu6xgdJuQzVnWFXLmxq9s3 1Give4dbry2pyJihnpqV6Urq2SGEhpz3K 21
  • 23. Blocks A block 𝐵 contains  RH(𝐵′) for another block 𝐵′,  a list of transactions,  and an arbitrary number “nonce”. Block 𝐵 is valid if the first 𝑑 = 5 digits of the hash of 𝐵 are all zero. 8046465385222 0000031105830 0000077326777 RH
  • 24. = A Tree of Blocks If we have a block, with a bit of work, we can find a “next block”… ...and yet another “next block”… …or a block which continues here… … and so on.
  • 25. Random Hash Function In practice, we hope that SHA256 behaves “like a random oracle”. SHA256: TextFiles → 0, … , 2256 − 1 Calculation: If we made all computers on the world compute SHA256… It takes ~“40 × 14 ⋅ 109 years” to find 𝑥1 ≠ 𝑥2 s.t. SHA256 𝑥1 = SHA256 𝑥2 .
  • 26. • We need a protocol to agree on a transaction. • “Consensus protocols”. Studied since 1980, starting with Pease, Shostak, Lamport. • Main idea for protocols: Consensus Protocols What transaction are you using? Protocols work if (say) > 70% of the computers follow the protocol.
  • 27. The Protocol - for Finding Blocks Protocol: finding blocks 1. Take the longest chain you can find. 2. Collect transactions. 3. Find a new valid block here. 4. Publish it.
  • 28. The Protocol - for Participants Protocol: To know who owns BTC 1. Take the longest chain you can find. 2. Process the transactions in this chain in order
  • 29.
  • 30. “proof of work” - node generating a block needs to prove that it has put enough computing resources to solve a mathematical puzzle. Transaction order protection
  • 31. Mathematical race to protect transactions
  • 32. Why work to find blocks? Many people are trying to find blocks, which uses a lot of resources… A real lot! This is called “mining”
  • 33. “What is Bitcoin Mining” – Video http://www.bitcoinmining.com 34
  • 34. Risks
  • 35. Double Spending I can exploit this! Black Hat Alice Bob : Give BTC from Black Hat to Alice : Give BTC from Black Hat to Bob Black Hat prepares two transactions: These transactions spend previously spent bitcoins! Thanks ! Thanks !
  • 36. Build an Alternate Chain? The more RH-calls are devoted to a chain, the faster it grows. Thus, intuitively: to build a chain as fast as the rest, you need as many RH-calls as the rest. Maybe I should build another chain?
  • 37. Distributed Denial of Service Attacks (DDoS) If I cannot cheat bitcoin, maybe I can mess it up! Interesting idea… …and while Bitcoin incorporates many, many rules to handle this… …people still try!
  • 38. • Using computing power of third parties to achieve faster mining performance (without knowledge and consent of the third party) • The 51% cartel attack • A Goldfinger attack (Sabatoge: "Losing" Bitcoins) Mining problems
  • 39. Improving Bitcoin: Open Problem • Computing SHA256 around 2 × 1017 times per second seems like a big waste of energy. • Back of the envelope calculation gives a daily energy use of 5.000.000+ kWh (> $500.000+) • Can we improve the situation? (There is previous work which studies this).