SlideShare a Scribd company logo
1 of 32
Making Software. Better.
Simple solutions to big business problems.
How Blockchains and Bitcoin work
Ricardo Águas
Summary
● Basic cryptography
● Blockchains
● Bitcoin
Basic cryptography
Symmetric cryptography
Public-key cryptography
Hash Functions
Symmetric cryptography
Symmetric cryptography encrypts and decrypts data using the same key
● The key must be shared before any message is transmitted
○ Sharing the key through the network would render the key useless
● Extremely fast compared to public-key encryption (~1000x)
● Less secure due to speed and usually smaller keys
● Up to the 1970’s this was the only available form of encryption
● DES, 3DES, Blowfish, AES, ...
Public-key cryptography
Public-key or Asymmetric cryptography encrypts using one key and decrypts data
using a different but related key
● Both private and public keys are generated at the same time
○ One key is the inverse of the other
○ The public key can be available to the entire world
○ The strength of the algorithm relies on the fact that by knowing the public key it is extremely
hard to guess the private key
● Extremely slow compared to symmetric encryption (~1000x)
● More secure due to lack of speed and usually much bigger keys
● First algorithms were discovered in the 1970’s
● RSA is by far the most used algorithm
Public-key cryptography
● Confidentiality
○ Data is encrypted with the public key and consequently, can only be decrypted with the private
key
■ Only the holder of the private key will be able to decrypt the original message
○ Integrity is guaranteed because the smallest change in the encrypted data will fail to decrypt to
something meaningful
● Authentication
○ Data is encrypted with the private key and consequently, can only be decrypted with the public
key
■ Anyone can decrypt the data but only the holder of the private key could have encrypted
the data originally
● This means that the original payload was signed by the holder of the private key
○ Integrity is guaranteed because the smallest change in the encrypted data will fail to decrypt to
something meaningful
Public-key cryptography
● Communication
○ Because public-key algorithms are orders of magnitude slower than symmetric algorithms,
hybrid protocols are used in communications
i. A secret key is generated and shared using public-key algorithms
ii. Data is transmitted encrypted by a symmetric algorithm using the previously shared secret
key
iii. Cyclically, after a certain period of time, new secret keys are generated and shared
● This means that to get access to all the data the attacker would need to compromise
all the shared keys (or the private key)
Hash Functions
● Produce a message digest (or summary) of the payload
○ The digest always has the same length regardless of the original payload size
○ The same input always produces the same digest
● The smallest change in the payload produces a completely different result
(digest)
○ It is extremely difficult to produce a payload that produces the same result as another payload
i. Instead of using a public-key algorithm for signing an entire document, a message digest of
the document can be produced and only the digest needs to be signed using the public-key
algorithm
ii. SHA256 “Hello World”:
a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
iii. SHA256 “Hello World ”:
a2f63ad70f3e5c61e5eafa164e95cbe40c9689c304ddd9b74fddf4169e3e838b
● Extremely fast
● MDx (e.g. MD5), SHAn (e.g SHA256)
Blockchains
What are Blocks
What are Blockchains
Distributed Blockchains
Blockchain attacks
What are Blocks
Block Id <necessary for chains>
Data <the content of the Block>
Prev <previous block hash; necessary for chains>
Nonce <value to be mined in order for the Hash to follow a specific rule>
Hash <Block digest (Block Id + Data + Prev + Nonce)>
What are Blockchains
● The Previous field contains the hash of the previous Block
○ This implies a chain from the last Block up to the first Block
● The Nonce makes the Block calculation to take some time
○ If the Hash needs to follow a specific rule (like a pattern) then multiple calculations with different
Nonces must be executed until the rule is followed
○ This is Mining
Block Id 1
Data <d1>
Prev 0
Nonce <n1>
Hash <h1>
Block Id 2
Data <d2>
Prev <h1>
Nonce <n2>
Hash <h2>
Block Id 3
Data <d3>
Prev <h2>
Nonce <n3>
Hash <h3>
Block Id 4
Data <d4>
Prev <h3>
Nonce <n4>
Hash <h4>
What are Blockchains
● If someone changes the content of one Block
○ that Block’s Nonce becomes invalid and needs to be re-mined
○ that Block’s Hash will be different
○ the subsequent Blocks all become invalid and need to be re-mined as well
○ this makes Blockchains resistant to changes
Block Id 1
Data <d1>
Prev 0
Nonce <n1>
Hash <h1>
Block Id 2
Data <d2’>
Prev <h1>
Nonce <n2’>
Hash <h2’>
Block Id 3
Data <d3>
Prev <h2’>
Nonce <n3’>
Hash <h3’>
Block Id 4
Data <d4>
Prev <h3’>
Nonce <n4’>
Hash <h4’>
Distributed Blockchains
● All the nodes should have the exact same chain
○ it is only necessary to check the Id and the Hash of the last Block in all the nodes to be sure that
all contain the exact same chain
Block Id 1
Hash <h1>
Block Id 2
Hash <h2>
Block Id 3
Hash <h3>
Block Id 4
Hash <h4>
Node 1
Block Id 1
Hash <h1>
Block Id 2
Hash <h2>
Block Id 3
Hash <h3>
Block Id 4
Hash <h4>
Node 2
Block Id 1
Hash <h1>
Block Id 2
Hash <h2>
Block Id 3
Hash <h3>
Block Id 4
Hash <h4>
Node 3
Blockchain attacks
● If an attacker changes one Block in the chain
○ his chain will be different from that point until the end
○ because most of the nodes agree that <h4> is the hash of Block 4 and not <h4’>, the chain of
Node 2 is considered invalid
Block Id 1
Hash <h1>
Block Id 2
Hash <h2>
Block Id 3
Hash <h3>
Block Id 4
Hash <h4>
Node 1
Block Id 1
Hash <h1>
Block Id 2
Hash <h2’>
Block Id 3
Hash <h3’>
Block Id 4
Hash <h4’>
Node 2
Block Id 1
Hash <h1>
Block Id 2
Hash <h2>
Block Id 3
Hash <h3>
Block Id 4
Hash <h4>
Node 3
Bitcoin
Bitcoin is a Ledger
Public-key cryptography
Transactions
Lost Bitcoins
Anonymity
Transaction order challenges
Bitcoin Transaction order
Bitcoin double spend attack
Bitcoin generation
Bitcoin final considerations
Bitcoin is a Ledger
● Bitcoin is essentially a Ledger file
○ Each Block in the chain contains a list of transactions
○ Each computer in the Bitcoin network contains a copy of the chain since the first Block
○ Everyone knows about all transactions ever made
○ Designed so that no Trust is needed
○ Nodes receive transaction requests and forward that information to the other nodes
Public-key cryptography
● Relies on public-key cryptography
○ Public keys are the send-to (Outputs) addresses in transactions
■ When sending money, you send money to a public key
○ You prove you own money by signing (with your private key) an unspent transaction that was
sent to you.
■ With the signature, everyone can confirm that you allowed the transaction without
knowing your private key
■ Because the signature depends on the message, it will be different for every transaction
and cannot be reused
Transactions
● To make a transaction, the sender must reference unspent transactions that
belong to him and are marked as unspent
○ If the sum of the input transaction is greater than the value to be transferred, a second Output
must be added with the remainder with the sender as the destination
● This creates a chain of transactions up until the first Block
○ (this chain isn’t the Block chain)
Txn #20102
Inputs txn#11111
txn#12121
Outputs <Bob> 5.0
<Alice> 0.5
Txn #11111
Inputs txn#...
txn#...
Outputs Alice 3.0
Txn #12121
Inputs txn#...
txn#...
Outputs <Alice> 2.5
Transactions
● When Bitcoin wallet is installed it checks all the transactions since the first Block
○ This can take over 24 hours
○ Needs to be done only once
● Once a transaction is used it is marked as spent
○ preventing double spending
○ When checking a transaction, nodes check if it wasn’t already spent
○ There is an index of unspent transactions to speed this process
● To check your balance you need to go through every transaction ever made
Lost Bitcoins
● User mistakes can result in permanent loss of Bitcoins
○ If a user loses his private key, that money is lost permanently
○ There is no form of appeal
○ Those losses are from the global Bitcoin economy
● Over 2600 Bitcoins were lost once due to a malformed address
Anonymity
● If you access Bitcoin through an anonymizing network that hides your IP address
you will only reveal your public key
● You can generate a public key for every incoming transaction (receiving
addresses)
○ Different public keys can be associated together when they are used in the same transaction when
the sender proves that he owns the input transactions by signing them
● Public and Private key pair can be generated offline
○ Makes it really difficult to find who owns those public keys
Transaction order challenges
● Transactions are passed node by node
○ There is no guarantee that the order in which they are sent is the same in which they are received
○ Timestamps can easily be forged
○ Alice could create a transaction to Bob
■ Bob would ship the product
■ Alice would forge a transaction to herself with the same inputs as the transaction to Bob
■ If the last transaction is accepted, Bob will not receive the money and already has shipped
the product
Bitcoin Transaction order
● Transactions are placed in groups creating Blocks
○ Transactions in the same Block are considered to have happened at the same time
○ It is the Blockchain that orders transactions
○ Transactions not yet in a Block are called unconfirmed or unordered transactions
● Anyone can create a Block with a particular set of Transactions and propose it to
be the next Block in the chain
○ Because multiple people might have different proposals at the same time there should be an
agreement mechanism
Bitcoin Transaction order
● The solution is the Blockchain Nonce
○ On average the entire network will take 10 minutes to find the Nonce
■ A single computer would take years
○ The first person to mine a block will broadcast the block
■ His block is accepted as the next block in the chain
■ The probability of people finding the Nonce at the same time is very low
○ Why 10 minutes?
■ Shorter times lead to instability
■ Higher times delay confirmations
○ Every 2 weeks the Bitcoin software changes the rule for the Nonce so that it becomes harder to
solve to cope with computing power increase
Bitcoin Transaction order
● Occasionally there can be multiple options for the next Block
○ Having multiple blocks in different branches is even more unlikely
Node 1
Node 2
Node 3
Bitcoin Transaction order
● The tie is broken when someone computes the next Block for a branch
○ The longest branch always wins
Node 1
Node 2
Node 3
Bitcoin Transaction order
● Transactions in the dropped Blocks return to unconfirmed state and wait to
enter a next Block
○ The Blockchain quickly stabilizes
Node 1
Node 2
Node 3
Bitcoin double spend attack
● Alice sends money to Bob
○ Bob waits for the transaction to be confirmed
○ Bob sends the product to Alice
○ Alice creates a concurrent longer Branch and wins
■ Alice must win a race against the rest of the network to do this
○ Alice to Bob transaction will become invalid because it will be seen as a double spending
● It is very unlikely for Alice to win the race as she is competing against the rest of
the network
○ She would need 50% of the entire computing power to have a 50% chance
● As a consequence, transactions far back in the chain are more secure
○ It is recommended to wait several Blocks until assuming a transaction final
Bitcoin double spend attack
● People group together in mining pools
○ Steady income on mining rewards or fees
○ Some pools have more than 20% of the total computing power
○ BTC Guild solved 6 Blocks in a row by itself
■ Voluntarily limited his members
■ It is recommend to wait more than 6 Blocks to assume that a transaction is final
● On average each Block takes 10 minutes
● Only after 1h or 1h30m a Block can be assumed final
● A reward is given to who solves a Block
○ This is why Block solving is called Mining
● Every 4 years the reward is cut in half
○ Last Bitcoin will be in mined in 2140
○ Total possible Bitcoins: 21 Million
■ You can send 0.00000001 Bitcoins in transactions
● Transaction fees
○ To retain the incentives to mining
○ Mining in reality is the processing of transactions
○ Transactions with fees will probably be processed faster
○ Hopefully fees will be lower compared to other payment systems
Bitcoin Generation
● Used for illegal activities
○ WannaCry ransomware asked Bitcoins as ransom payment
● Mining uses a huge amount of energy
● Specialized hardware is being created for mining
○ GPUs are extremely well suited for Mining
■ Both AMD and Nvidia are working on special hardware, tuned hardware and specific drivers
for current products
■ There have been shortages of GPUs
● Main sources of information used in this talk and useful links
○ https://anders.com/blockchain/
○ https://www.youtube.com/watch?v=_160oMzblY8
○ http://www.fudzilla.com
Bitcoin final considerations
Thank You
Twitter
@EqualExperts
LinkedIn
linkedin.com/company/equal-experts
UNITED KINGDOM
+44 203 603 7830
helloUK@equalexperts.com
Equal Experts UK Ltd
30 Brock Street
London NW1 3FG
INDIA
+91 20 6607 7763
helloIndia@equalexperts.com
Equal Experts India Private Ltd
Office No. 4-C
Cerebrum IT Park No. B3
Kumar City, Kalyani Nagar
Pune, 411006
Web
www.equalexperts.com
CANADA
+1 403 775 4861
helloCanada@equalexperts.com
Equal Experts Devices Inc
205 - 279 Midpark way S.E.
T2X 1M2
Calgary, Alberta
PORTUGAL
+351 211 378 414
helloPortugal@equalexperts.com
Equal Experts Portugal
Avenida Dom João II, Nº35
Edificio Infante 11ºA
1990-083 Parque das Nações
Lisboa – Portugal
Thank You
USA
+1 866-943-9737
helloUSA@equalexperts.com
Equal Experts Inc
1460 Broadway
New York
NY 10036
 

More Related Content

What's hot

Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodGalin Dinkov
 
Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...I MT
 
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Codemotion
 
Blockchain - a formal introduction
Blockchain - a formal introductionBlockchain - a formal introduction
Blockchain - a formal introductionSander Demeester
 
Cryptocurrencies for Everyone (Dmytro Pershyn Technology Stream)
Cryptocurrencies for Everyone (Dmytro Pershyn Technology Stream)Cryptocurrencies for Everyone (Dmytro Pershyn Technology Stream)
Cryptocurrencies for Everyone (Dmytro Pershyn Technology Stream)IT Arena
 
Boolberry reduces blockchain bloat
Boolberry reduces blockchain bloatBoolberry reduces blockchain bloat
Boolberry reduces blockchain bloatboolberry
 
BitCoin explained
BitCoin explainedBitCoin explained
BitCoin explainedHarelc
 
Introduction to Blockchain & development
Introduction to Blockchain & developmentIntroduction to Blockchain & development
Introduction to Blockchain & developmentAbdullah Aziz
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, TechnicallyAlex Chepurnoy
 
Blockchain: life of a blockchain transaction
Blockchain: life of a blockchain transactionBlockchain: life of a blockchain transaction
Blockchain: life of a blockchain transactionErwan Alliaume
 
Intro to smart contract on blockchain en
Intro to smart contract on blockchain enIntro to smart contract on blockchain en
Intro to smart contract on blockchain enNicholas Lin
 
Introduction to Lightning Network
Introduction to Lightning NetworkIntroduction to Lightning Network
Introduction to Lightning NetworkAlan Carbery
 

What's hot (20)

Blockchain and bitcoin
Blockchain and bitcoinBlockchain and bitcoin
Blockchain and bitcoin
 
Blockchain Corporate Style
Blockchain Corporate StyleBlockchain Corporate Style
Blockchain Corporate Style
 
Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the Hood
 
Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...
 
Bitcoin Internal
Bitcoin InternalBitcoin Internal
Bitcoin Internal
 
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
 
Tmc mastering bitcoins ppt
Tmc mastering bitcoins pptTmc mastering bitcoins ppt
Tmc mastering bitcoins ppt
 
Blockchain - a formal introduction
Blockchain - a formal introductionBlockchain - a formal introduction
Blockchain - a formal introduction
 
Cryptocurrencies for Everyone (Dmytro Pershyn Technology Stream)
Cryptocurrencies for Everyone (Dmytro Pershyn Technology Stream)Cryptocurrencies for Everyone (Dmytro Pershyn Technology Stream)
Cryptocurrencies for Everyone (Dmytro Pershyn Technology Stream)
 
Boolberry reduces blockchain bloat
Boolberry reduces blockchain bloatBoolberry reduces blockchain bloat
Boolberry reduces blockchain bloat
 
bitcoin
bitcoinbitcoin
bitcoin
 
BLOCKCHAIN TECHNOLOGY
BLOCKCHAIN TECHNOLOGYBLOCKCHAIN TECHNOLOGY
BLOCKCHAIN TECHNOLOGY
 
BitCoin explained
BitCoin explainedBitCoin explained
BitCoin explained
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Introduction to Blockchain & development
Introduction to Blockchain & developmentIntroduction to Blockchain & development
Introduction to Blockchain & development
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, Technically
 
Blockchain: life of a blockchain transaction
Blockchain: life of a blockchain transactionBlockchain: life of a blockchain transaction
Blockchain: life of a blockchain transaction
 
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
 
Intro to smart contract on blockchain en
Intro to smart contract on blockchain enIntro to smart contract on blockchain en
Intro to smart contract on blockchain en
 
Introduction to Lightning Network
Introduction to Lightning NetworkIntroduction to Lightning Network
Introduction to Lightning Network
 

Similar to "How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 20170705

Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroTal Shmueli
 
Bitcoins: Application of blockchain technology
Bitcoins: Application of blockchain technologyBitcoins: Application of blockchain technology
Bitcoins: Application of blockchain technologyShiv Sahni
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101Oded Noam
 
Blockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBlockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBogdan Fiedur
 
Blockchain presentation.pptx
Blockchain presentation.pptxBlockchain presentation.pptx
Blockchain presentation.pptxSwarnaSLcse
 
Multi-Signature Deep Dive
Multi-Signature Deep DiveMulti-Signature Deep Dive
Multi-Signature Deep DiveBenedict Chan
 
Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Ido Green
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and BitcoinHugo Rodrigues
 
Blockchain-based shared ownership of City Platform Cooperatives
Blockchain-based shared ownership of City Platform CooperativesBlockchain-based shared ownership of City Platform Cooperatives
Blockchain-based shared ownership of City Platform CooperativesDigitalTown, Inc
 
Transaction Ordering System
Transaction Ordering SystemTransaction Ordering System
Transaction Ordering SystemJasonGilchrist3
 
Total privacy of transactions, Mimblewimble and Grin
Total privacy of transactions, Mimblewimble and GrinTotal privacy of transactions, Mimblewimble and Grin
Total privacy of transactions, Mimblewimble and GrinEugene Pavlenko
 
Blockchain-Presentation.pptx
Blockchain-Presentation.pptxBlockchain-Presentation.pptx
Blockchain-Presentation.pptxMeganaaGodhala
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and BitcoinKeenan Olsen
 
Blockchain Demystified
Blockchain DemystifiedBlockchain Demystified
Blockchain DemystifiedMahesh M Reddy
 

Similar to "How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 20170705 (20)

Ethereum overview
Ethereum overviewEthereum overview
Ethereum overview
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies Intro
 
Bitcoins: Application of blockchain technology
Bitcoins: Application of blockchain technologyBitcoins: Application of blockchain technology
Bitcoins: Application of blockchain technology
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
 
Blockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBlockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOs
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
 
Blockchain presentation.pptx
Blockchain presentation.pptxBlockchain presentation.pptx
Blockchain presentation.pptx
 
Multi-Signature Deep Dive
Multi-Signature Deep DiveMulti-Signature Deep Dive
Multi-Signature Deep Dive
 
Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]
 
Blockchain introduction
Blockchain introductionBlockchain introduction
Blockchain introduction
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and Bitcoin
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain-based shared ownership of City Platform Cooperatives
Blockchain-based shared ownership of City Platform CooperativesBlockchain-based shared ownership of City Platform Cooperatives
Blockchain-based shared ownership of City Platform Cooperatives
 
Blockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for DummiesBlockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for Dummies
 
Transaction Ordering System
Transaction Ordering SystemTransaction Ordering System
Transaction Ordering System
 
Total privacy of transactions, Mimblewimble and Grin
Total privacy of transactions, Mimblewimble and GrinTotal privacy of transactions, Mimblewimble and Grin
Total privacy of transactions, Mimblewimble and Grin
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Blockchain-Presentation.pptx
Blockchain-Presentation.pptxBlockchain-Presentation.pptx
Blockchain-Presentation.pptx
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and Bitcoin
 
Blockchain Demystified
Blockchain DemystifiedBlockchain Demystified
Blockchain Demystified
 

More from Equal Experts

TRUST Framework Talk 2023-03-10.pptx
TRUST Framework Talk 2023-03-10.pptxTRUST Framework Talk 2023-03-10.pptx
TRUST Framework Talk 2023-03-10.pptxEqual Experts
 
Will it matter if your child cannot code?
Will it matter if your child cannot code?Will it matter if your child cannot code?
Will it matter if your child cannot code?Equal Experts
 
Platform Security IRL: Busting Buzzwords & Building Better
Platform Security IRL:  Busting Buzzwords & Building BetterPlatform Security IRL:  Busting Buzzwords & Building Better
Platform Security IRL: Busting Buzzwords & Building BetterEqual Experts
 
Software development practices & Infrastructure as Code - how well do they wo...
Software development practices & Infrastructure as Code - how well do they wo...Software development practices & Infrastructure as Code - how well do they wo...
Software development practices & Infrastructure as Code - how well do they wo...Equal Experts
 
A Whole Team Approach to Quality in Continuous Delivery - Lisa Crispin
A Whole Team Approach to Quality in Continuous Delivery - Lisa CrispinA Whole Team Approach to Quality in Continuous Delivery - Lisa Crispin
A Whole Team Approach to Quality in Continuous Delivery - Lisa CrispinEqual Experts
 
Secure Continuous Delivery
Secure Continuous DeliverySecure Continuous Delivery
Secure Continuous DeliveryEqual Experts
 
Smoothing the continuous delivery path a tale of two architectures - expert...
Smoothing the continuous delivery path   a tale of two architectures - expert...Smoothing the continuous delivery path   a tale of two architectures - expert...
Smoothing the continuous delivery path a tale of two architectures - expert...Equal Experts
 
Embracing collaborative chaos (April 2020) by Lyndsay Prewer
Embracing collaborative chaos (April 2020) by Lyndsay PrewerEmbracing collaborative chaos (April 2020) by Lyndsay Prewer
Embracing collaborative chaos (April 2020) by Lyndsay PrewerEqual Experts
 
Design Systems: Designing out Waste, Designing in Consistency
Design Systems: Designing out Waste, Designing in ConsistencyDesign Systems: Designing out Waste, Designing in Consistency
Design Systems: Designing out Waste, Designing in ConsistencyEqual Experts
 
Growing Together - software development in the Developing world
Growing Together - software development in the Developing worldGrowing Together - software development in the Developing world
Growing Together - software development in the Developing worldEqual Experts
 
Infrastructure - a journey from datacentres to cloud
Infrastructure - a journey from datacentres to cloudInfrastructure - a journey from datacentres to cloud
Infrastructure - a journey from datacentres to cloudEqual Experts
 
Data Science In Action: Prenatal Screening for Down Syndrome
Data Science In Action: Prenatal Screening for Down SyndromeData Science In Action: Prenatal Screening for Down Syndrome
Data Science In Action: Prenatal Screening for Down SyndromeEqual Experts
 
The essentials of the IT industry or What I wish I was taught about at Univer...
The essentials of the IT industry or What I wish I was taught about at Univer...The essentials of the IT industry or What I wish I was taught about at Univer...
The essentials of the IT industry or What I wish I was taught about at Univer...Equal Experts
 
Secrets of an agile transformation
Secrets of an agile transformationSecrets of an agile transformation
Secrets of an agile transformationEqual Experts
 
Obstacles of Digital Transformation Evolution
Obstacles of Digital Transformation EvolutionObstacles of Digital Transformation Evolution
Obstacles of Digital Transformation EvolutionEqual Experts
 
Avoiding the security brick
Avoiding the security brickAvoiding the security brick
Avoiding the security brickEqual Experts
 
Embracing collaborative chaos
Embracing collaborative chaosEmbracing collaborative chaos
Embracing collaborative chaosEqual Experts
 
Organising for Continuous Delivery
Organising for Continuous DeliveryOrganising for Continuous Delivery
Organising for Continuous DeliveryEqual Experts
 
Cracking passwords via common topologies
Cracking passwords via common topologiesCracking passwords via common topologies
Cracking passwords via common topologiesEqual Experts
 

More from Equal Experts (20)

TRUST Framework Talk 2023-03-10.pptx
TRUST Framework Talk 2023-03-10.pptxTRUST Framework Talk 2023-03-10.pptx
TRUST Framework Talk 2023-03-10.pptx
 
Will it matter if your child cannot code?
Will it matter if your child cannot code?Will it matter if your child cannot code?
Will it matter if your child cannot code?
 
Platform Security IRL: Busting Buzzwords & Building Better
Platform Security IRL:  Busting Buzzwords & Building BetterPlatform Security IRL:  Busting Buzzwords & Building Better
Platform Security IRL: Busting Buzzwords & Building Better
 
Software development practices & Infrastructure as Code - how well do they wo...
Software development practices & Infrastructure as Code - how well do they wo...Software development practices & Infrastructure as Code - how well do they wo...
Software development practices & Infrastructure as Code - how well do they wo...
 
A Whole Team Approach to Quality in Continuous Delivery - Lisa Crispin
A Whole Team Approach to Quality in Continuous Delivery - Lisa CrispinA Whole Team Approach to Quality in Continuous Delivery - Lisa Crispin
A Whole Team Approach to Quality in Continuous Delivery - Lisa Crispin
 
Secure Continuous Delivery
Secure Continuous DeliverySecure Continuous Delivery
Secure Continuous Delivery
 
Smoothing the continuous delivery path a tale of two architectures - expert...
Smoothing the continuous delivery path   a tale of two architectures - expert...Smoothing the continuous delivery path   a tale of two architectures - expert...
Smoothing the continuous delivery path a tale of two architectures - expert...
 
Embracing collaborative chaos (April 2020) by Lyndsay Prewer
Embracing collaborative chaos (April 2020) by Lyndsay PrewerEmbracing collaborative chaos (April 2020) by Lyndsay Prewer
Embracing collaborative chaos (April 2020) by Lyndsay Prewer
 
Design Systems: Designing out Waste, Designing in Consistency
Design Systems: Designing out Waste, Designing in ConsistencyDesign Systems: Designing out Waste, Designing in Consistency
Design Systems: Designing out Waste, Designing in Consistency
 
Growing Together - software development in the Developing world
Growing Together - software development in the Developing worldGrowing Together - software development in the Developing world
Growing Together - software development in the Developing world
 
Infrastructure - a journey from datacentres to cloud
Infrastructure - a journey from datacentres to cloudInfrastructure - a journey from datacentres to cloud
Infrastructure - a journey from datacentres to cloud
 
Data Science In Action: Prenatal Screening for Down Syndrome
Data Science In Action: Prenatal Screening for Down SyndromeData Science In Action: Prenatal Screening for Down Syndrome
Data Science In Action: Prenatal Screening for Down Syndrome
 
The essentials of the IT industry or What I wish I was taught about at Univer...
The essentials of the IT industry or What I wish I was taught about at Univer...The essentials of the IT industry or What I wish I was taught about at Univer...
The essentials of the IT industry or What I wish I was taught about at Univer...
 
Secrets of an agile transformation
Secrets of an agile transformationSecrets of an agile transformation
Secrets of an agile transformation
 
Obstacles of Digital Transformation Evolution
Obstacles of Digital Transformation EvolutionObstacles of Digital Transformation Evolution
Obstacles of Digital Transformation Evolution
 
Avoiding the security brick
Avoiding the security brickAvoiding the security brick
Avoiding the security brick
 
Embracing collaborative chaos
Embracing collaborative chaosEmbracing collaborative chaos
Embracing collaborative chaos
 
Continuous Security
Continuous SecurityContinuous Security
Continuous Security
 
Organising for Continuous Delivery
Organising for Continuous DeliveryOrganising for Continuous Delivery
Organising for Continuous Delivery
 
Cracking passwords via common topologies
Cracking passwords via common topologiesCracking passwords via common topologies
Cracking passwords via common topologies
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

"How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 20170705

  • 1. Making Software. Better. Simple solutions to big business problems. How Blockchains and Bitcoin work Ricardo Águas
  • 2. Summary ● Basic cryptography ● Blockchains ● Bitcoin
  • 4. Symmetric cryptography Symmetric cryptography encrypts and decrypts data using the same key ● The key must be shared before any message is transmitted ○ Sharing the key through the network would render the key useless ● Extremely fast compared to public-key encryption (~1000x) ● Less secure due to speed and usually smaller keys ● Up to the 1970’s this was the only available form of encryption ● DES, 3DES, Blowfish, AES, ...
  • 5. Public-key cryptography Public-key or Asymmetric cryptography encrypts using one key and decrypts data using a different but related key ● Both private and public keys are generated at the same time ○ One key is the inverse of the other ○ The public key can be available to the entire world ○ The strength of the algorithm relies on the fact that by knowing the public key it is extremely hard to guess the private key ● Extremely slow compared to symmetric encryption (~1000x) ● More secure due to lack of speed and usually much bigger keys ● First algorithms were discovered in the 1970’s ● RSA is by far the most used algorithm
  • 6. Public-key cryptography ● Confidentiality ○ Data is encrypted with the public key and consequently, can only be decrypted with the private key ■ Only the holder of the private key will be able to decrypt the original message ○ Integrity is guaranteed because the smallest change in the encrypted data will fail to decrypt to something meaningful ● Authentication ○ Data is encrypted with the private key and consequently, can only be decrypted with the public key ■ Anyone can decrypt the data but only the holder of the private key could have encrypted the data originally ● This means that the original payload was signed by the holder of the private key ○ Integrity is guaranteed because the smallest change in the encrypted data will fail to decrypt to something meaningful
  • 7. Public-key cryptography ● Communication ○ Because public-key algorithms are orders of magnitude slower than symmetric algorithms, hybrid protocols are used in communications i. A secret key is generated and shared using public-key algorithms ii. Data is transmitted encrypted by a symmetric algorithm using the previously shared secret key iii. Cyclically, after a certain period of time, new secret keys are generated and shared ● This means that to get access to all the data the attacker would need to compromise all the shared keys (or the private key)
  • 8. Hash Functions ● Produce a message digest (or summary) of the payload ○ The digest always has the same length regardless of the original payload size ○ The same input always produces the same digest ● The smallest change in the payload produces a completely different result (digest) ○ It is extremely difficult to produce a payload that produces the same result as another payload i. Instead of using a public-key algorithm for signing an entire document, a message digest of the document can be produced and only the digest needs to be signed using the public-key algorithm ii. SHA256 “Hello World”: a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e iii. SHA256 “Hello World ”: a2f63ad70f3e5c61e5eafa164e95cbe40c9689c304ddd9b74fddf4169e3e838b ● Extremely fast ● MDx (e.g. MD5), SHAn (e.g SHA256)
  • 9. Blockchains What are Blocks What are Blockchains Distributed Blockchains Blockchain attacks
  • 10. What are Blocks Block Id <necessary for chains> Data <the content of the Block> Prev <previous block hash; necessary for chains> Nonce <value to be mined in order for the Hash to follow a specific rule> Hash <Block digest (Block Id + Data + Prev + Nonce)>
  • 11. What are Blockchains ● The Previous field contains the hash of the previous Block ○ This implies a chain from the last Block up to the first Block ● The Nonce makes the Block calculation to take some time ○ If the Hash needs to follow a specific rule (like a pattern) then multiple calculations with different Nonces must be executed until the rule is followed ○ This is Mining Block Id 1 Data <d1> Prev 0 Nonce <n1> Hash <h1> Block Id 2 Data <d2> Prev <h1> Nonce <n2> Hash <h2> Block Id 3 Data <d3> Prev <h2> Nonce <n3> Hash <h3> Block Id 4 Data <d4> Prev <h3> Nonce <n4> Hash <h4>
  • 12. What are Blockchains ● If someone changes the content of one Block ○ that Block’s Nonce becomes invalid and needs to be re-mined ○ that Block’s Hash will be different ○ the subsequent Blocks all become invalid and need to be re-mined as well ○ this makes Blockchains resistant to changes Block Id 1 Data <d1> Prev 0 Nonce <n1> Hash <h1> Block Id 2 Data <d2’> Prev <h1> Nonce <n2’> Hash <h2’> Block Id 3 Data <d3> Prev <h2’> Nonce <n3’> Hash <h3’> Block Id 4 Data <d4> Prev <h3’> Nonce <n4’> Hash <h4’>
  • 13. Distributed Blockchains ● All the nodes should have the exact same chain ○ it is only necessary to check the Id and the Hash of the last Block in all the nodes to be sure that all contain the exact same chain Block Id 1 Hash <h1> Block Id 2 Hash <h2> Block Id 3 Hash <h3> Block Id 4 Hash <h4> Node 1 Block Id 1 Hash <h1> Block Id 2 Hash <h2> Block Id 3 Hash <h3> Block Id 4 Hash <h4> Node 2 Block Id 1 Hash <h1> Block Id 2 Hash <h2> Block Id 3 Hash <h3> Block Id 4 Hash <h4> Node 3
  • 14. Blockchain attacks ● If an attacker changes one Block in the chain ○ his chain will be different from that point until the end ○ because most of the nodes agree that <h4> is the hash of Block 4 and not <h4’>, the chain of Node 2 is considered invalid Block Id 1 Hash <h1> Block Id 2 Hash <h2> Block Id 3 Hash <h3> Block Id 4 Hash <h4> Node 1 Block Id 1 Hash <h1> Block Id 2 Hash <h2’> Block Id 3 Hash <h3’> Block Id 4 Hash <h4’> Node 2 Block Id 1 Hash <h1> Block Id 2 Hash <h2> Block Id 3 Hash <h3> Block Id 4 Hash <h4> Node 3
  • 15. Bitcoin Bitcoin is a Ledger Public-key cryptography Transactions Lost Bitcoins Anonymity Transaction order challenges Bitcoin Transaction order Bitcoin double spend attack Bitcoin generation Bitcoin final considerations
  • 16. Bitcoin is a Ledger ● Bitcoin is essentially a Ledger file ○ Each Block in the chain contains a list of transactions ○ Each computer in the Bitcoin network contains a copy of the chain since the first Block ○ Everyone knows about all transactions ever made ○ Designed so that no Trust is needed ○ Nodes receive transaction requests and forward that information to the other nodes
  • 17. Public-key cryptography ● Relies on public-key cryptography ○ Public keys are the send-to (Outputs) addresses in transactions ■ When sending money, you send money to a public key ○ You prove you own money by signing (with your private key) an unspent transaction that was sent to you. ■ With the signature, everyone can confirm that you allowed the transaction without knowing your private key ■ Because the signature depends on the message, it will be different for every transaction and cannot be reused
  • 18. Transactions ● To make a transaction, the sender must reference unspent transactions that belong to him and are marked as unspent ○ If the sum of the input transaction is greater than the value to be transferred, a second Output must be added with the remainder with the sender as the destination ● This creates a chain of transactions up until the first Block ○ (this chain isn’t the Block chain) Txn #20102 Inputs txn#11111 txn#12121 Outputs <Bob> 5.0 <Alice> 0.5 Txn #11111 Inputs txn#... txn#... Outputs Alice 3.0 Txn #12121 Inputs txn#... txn#... Outputs <Alice> 2.5
  • 19. Transactions ● When Bitcoin wallet is installed it checks all the transactions since the first Block ○ This can take over 24 hours ○ Needs to be done only once ● Once a transaction is used it is marked as spent ○ preventing double spending ○ When checking a transaction, nodes check if it wasn’t already spent ○ There is an index of unspent transactions to speed this process ● To check your balance you need to go through every transaction ever made
  • 20. Lost Bitcoins ● User mistakes can result in permanent loss of Bitcoins ○ If a user loses his private key, that money is lost permanently ○ There is no form of appeal ○ Those losses are from the global Bitcoin economy ● Over 2600 Bitcoins were lost once due to a malformed address
  • 21. Anonymity ● If you access Bitcoin through an anonymizing network that hides your IP address you will only reveal your public key ● You can generate a public key for every incoming transaction (receiving addresses) ○ Different public keys can be associated together when they are used in the same transaction when the sender proves that he owns the input transactions by signing them ● Public and Private key pair can be generated offline ○ Makes it really difficult to find who owns those public keys
  • 22. Transaction order challenges ● Transactions are passed node by node ○ There is no guarantee that the order in which they are sent is the same in which they are received ○ Timestamps can easily be forged ○ Alice could create a transaction to Bob ■ Bob would ship the product ■ Alice would forge a transaction to herself with the same inputs as the transaction to Bob ■ If the last transaction is accepted, Bob will not receive the money and already has shipped the product
  • 23. Bitcoin Transaction order ● Transactions are placed in groups creating Blocks ○ Transactions in the same Block are considered to have happened at the same time ○ It is the Blockchain that orders transactions ○ Transactions not yet in a Block are called unconfirmed or unordered transactions ● Anyone can create a Block with a particular set of Transactions and propose it to be the next Block in the chain ○ Because multiple people might have different proposals at the same time there should be an agreement mechanism
  • 24. Bitcoin Transaction order ● The solution is the Blockchain Nonce ○ On average the entire network will take 10 minutes to find the Nonce ■ A single computer would take years ○ The first person to mine a block will broadcast the block ■ His block is accepted as the next block in the chain ■ The probability of people finding the Nonce at the same time is very low ○ Why 10 minutes? ■ Shorter times lead to instability ■ Higher times delay confirmations ○ Every 2 weeks the Bitcoin software changes the rule for the Nonce so that it becomes harder to solve to cope with computing power increase
  • 25. Bitcoin Transaction order ● Occasionally there can be multiple options for the next Block ○ Having multiple blocks in different branches is even more unlikely Node 1 Node 2 Node 3
  • 26. Bitcoin Transaction order ● The tie is broken when someone computes the next Block for a branch ○ The longest branch always wins Node 1 Node 2 Node 3
  • 27. Bitcoin Transaction order ● Transactions in the dropped Blocks return to unconfirmed state and wait to enter a next Block ○ The Blockchain quickly stabilizes Node 1 Node 2 Node 3
  • 28. Bitcoin double spend attack ● Alice sends money to Bob ○ Bob waits for the transaction to be confirmed ○ Bob sends the product to Alice ○ Alice creates a concurrent longer Branch and wins ■ Alice must win a race against the rest of the network to do this ○ Alice to Bob transaction will become invalid because it will be seen as a double spending ● It is very unlikely for Alice to win the race as she is competing against the rest of the network ○ She would need 50% of the entire computing power to have a 50% chance ● As a consequence, transactions far back in the chain are more secure ○ It is recommended to wait several Blocks until assuming a transaction final
  • 29. Bitcoin double spend attack ● People group together in mining pools ○ Steady income on mining rewards or fees ○ Some pools have more than 20% of the total computing power ○ BTC Guild solved 6 Blocks in a row by itself ■ Voluntarily limited his members ■ It is recommend to wait more than 6 Blocks to assume that a transaction is final ● On average each Block takes 10 minutes ● Only after 1h or 1h30m a Block can be assumed final
  • 30. ● A reward is given to who solves a Block ○ This is why Block solving is called Mining ● Every 4 years the reward is cut in half ○ Last Bitcoin will be in mined in 2140 ○ Total possible Bitcoins: 21 Million ■ You can send 0.00000001 Bitcoins in transactions ● Transaction fees ○ To retain the incentives to mining ○ Mining in reality is the processing of transactions ○ Transactions with fees will probably be processed faster ○ Hopefully fees will be lower compared to other payment systems Bitcoin Generation
  • 31. ● Used for illegal activities ○ WannaCry ransomware asked Bitcoins as ransom payment ● Mining uses a huge amount of energy ● Specialized hardware is being created for mining ○ GPUs are extremely well suited for Mining ■ Both AMD and Nvidia are working on special hardware, tuned hardware and specific drivers for current products ■ There have been shortages of GPUs ● Main sources of information used in this talk and useful links ○ https://anders.com/blockchain/ ○ https://www.youtube.com/watch?v=_160oMzblY8 ○ http://www.fudzilla.com Bitcoin final considerations
  • 32. Thank You Twitter @EqualExperts LinkedIn linkedin.com/company/equal-experts UNITED KINGDOM +44 203 603 7830 helloUK@equalexperts.com Equal Experts UK Ltd 30 Brock Street London NW1 3FG INDIA +91 20 6607 7763 helloIndia@equalexperts.com Equal Experts India Private Ltd Office No. 4-C Cerebrum IT Park No. B3 Kumar City, Kalyani Nagar Pune, 411006 Web www.equalexperts.com CANADA +1 403 775 4861 helloCanada@equalexperts.com Equal Experts Devices Inc 205 - 279 Midpark way S.E. T2X 1M2 Calgary, Alberta PORTUGAL +351 211 378 414 helloPortugal@equalexperts.com Equal Experts Portugal Avenida Dom João II, Nº35 Edificio Infante 11ºA 1990-083 Parque das Nações Lisboa – Portugal Thank You USA +1 866-943-9737 helloUSA@equalexperts.com Equal Experts Inc 1460 Broadway New York NY 10036