SlideShare a Scribd company logo
2018-02 Daniel Lilliehöök
1 BTC
Daniel Lilliehöök:
• Ph.D. theoretical physics 2000
– Post doc at MIT and Oxford University
• In IT-architecture since 2003
– Chief IT-architect at Eniro, Riksbyggen
• Co-founder of Innovate Security 2015
– Information security and architecture
– 10 employees 2017
• Heard about ”Bitmoney-something” 2013...
2018-02 Daniel Lilliehöök
What is bitcoin?
1. An independent
currency
2. A digital peer-to-
peer payment
network
2018-02 Daniel Lilliehöök
How to send or receive bitcoin
2018-02 Daniel Lilliehöök
What’s new?
• International currency
– Not tied to any country
• Not controlled by any central authority
– No central bank
– No bank account needed
• Total amount of bitcoins is fixed
– Known and unchangeable internal inflation
• Transactions are irreversible
– No one can undo a transaction for you
2018-02 Daniel Lilliehöök
What’s the value?
• Exchange rate is set in
a free market
– Have to exchange with
someone who owns
bitcoin
• Exchange sites
matches trade orders
– Coinbase, Kraken,
Bitstamp, LocalBitcoins…
2018-02 Daniel Lilliehöök
Background
”Bit-money”-something (2013)
2018-02 Daniel Lilliehöök
What is a blockchain?
2018-02 Daniel Lilliehöök
What is a blockchain, really?
2018-02 Daniel Lilliehöök
A chain of blocks
…
What’s a block?
• A collection of data/text
• Numbered and chained together
2018-02 Daniel Lilliehöök
……………………....
………………………
………………………
…………………………
……………………
…………………………
………………….....
..……
……………………....
………………………
………………………
…………………………
……………………
…………………………
………………….....
..……
……………………....
………………………
………………………
…………………………
……………………
…………………………
………………….....
..……
119 120 121
Blocks are also:
• Validated by a set of rules
• Distributed freely among peers
2018-02 Daniel Lilliehöök
……………………....
………………………
………………………
…………………………
……………………
…………………………
………………….....
..……
……………………....
………………………
………………………
…………………………
……………………
…………………………
………………….....
..……
……………………....
………………………
………………………
…………………………
……………………
…………………………
………………….....
..……
119 120 121
Client-server network
2018-02 Daniel Lilliehöök
Traditional: one server, many clients
Peer-to-peer network
Peer-to-peer: no central server or authority
2018-02 Daniel Lilliehöök
The bitcoin blockchain
Blocks contain transactions
between liability accounts
2018-02 Daniel Lilliehöök
Transaction id Account nr Debit Credit Verification nr
2566 1111111-1 1,21 1234
2566 2222222-2 1,20
2566 3333333-3 0,01
The bitcoin blockchain
Blocks contain transactions
between liability accounts
2018-02 Daniel Lilliehöök
Transaction id Account Nr Debit Credit Verification nr
2566 1111111-1 1,21 #####
2566 2222222-2 1,20
2566 3333333-3 0,01
Bitcoin address Input Output Digital signature
bitcoin
terminology
Nothing new yet
• Any part (company, bank etc) can issue
and administer an accounts book
• BUT then:
– Users have to apply to get an account
– Have to trust the issuer
2018-02 Daniel Lilliehöök
Two mathematical tricks
• Hash-functions
• Digital signatures
2018-02 Daniel Lilliehöök
Hash functions
2018-02 Daniel Lilliehöök
Input data
…………………
…………………
…………………
…………….
Hash value
Input data of any length
Fixed length hash value
Hash
function
Hash function: SHA-256
2018-02 Daniel Lilliehöök
fox
SHA-256
The quick
brown fox
jumps over
the lazy dog
d7a8fbb307d78094
69ca9abcb0082e4f
8d5651e46d3cdb76
2d02d0bf37c9e592
SHA-256
The quick
brown fox
jumps ouer
the lazy dog
SHA-256
776cb326ab0cd5f0
a974c1b9606044d8
485201f2db19cf8e
3749bdee5f36e200
1f74feeeff32873c
2dcef987ff8fb8b8
becefef4ead58eb0
407d439c19f92b32
Swedish social security numbers
2018-02 Daniel Lilliehöök
Luhn hash
function
840101-971 9 Control digit
9
Private- and public keys
2018-02 Daniel Lilliehöök
Private key Public key
A * B = C
Digital signatures
2018-02 Daniel Lilliehöök
Message
…………………
…………………
…………………
…………….
Hash value
=
?
Signature
function
Verification
function
Hash value
Signature
Bitcoin addresses
• Generate a private and public key-pair
• Bitcoin address is the hash (of the hash) of
the public key
2018-02 Daniel Lilliehöök
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
Public key
Bitcoin wallets
• Generates new bitcoin
addresses
• Stores your private key(s)
• Listens to transactions on the
network
• Can generate and post
signed transactions
2018-02 Daniel Lilliehöök
Problem: double-spending
2018-02 Daniel Lilliehöök
1 BTC
1 BTC
1 BTC
Double-spending: traditional
solution
2018-02 Daniel Lilliehöök
1 BTC
1 BTC
1 BTC
0 BTC
Traditional solution:
one trusted central part
Double-spending: New solution
Satoshi Nakamoto:
üProof-of-Work
üBlock rewards
2018-02 Daniel Lilliehöök
Block rewards
• One special transaction allowed on each
block:
• All initial balances come from these
• Incitement for many to submit new blocks!
2018-02 Daniel Lilliehöök
Transaction id Bitcoin address Input Output Digital signature
2582 ????????? 12,5 [N/A]
Proof-of-Work
• Must be difficult to submit a new block:
– Add a meaningless but hard mathematical puzzle
for each block
– Adjust the difficulty of the puzzle depending on
how many are trying
2018-02 Daniel Lilliehöök
Proof-of-work
Bloch hash must be smaller than a target number
2018-02 Daniel Lilliehöök
Block 118
Previous hash
Timestamp
Nonce
Block hash
117
Nonce
Block hash
119
Previous hash
Timestamp
Adjust difficulty every 2 weeks
2018-02 Daniel Lilliehöök
!"# $%&'"$ = )*+ $%&'"$ ∗
$-." )/ *%0$ 2016 5*)670
2 #""70
Rule: block reward declines
• The block reward is cut in half every 4
years (every 210’000 block)
2018-02 Daniel Lilliehöök
Blockchain rules:
• Anyone can request and verify blocks
• Anyone can submit new blocks
• Valid blocks requires a proof-of-work
hash
• Miners collect transactions, and try to
compose new valid blocks
• Miners and users trust the longest chain
2018-02 Daniel Lilliehöök
What miners do – startup
• Request and verify first
block(s)
• Verify transactions
• Keep track of unspent
outputs
• Repeat with next block(s)…
2018-02 Daniel Lilliehöök
Unspent
outputs
What miners do – continually
• Collect new transactions from network
– Check signatures
– Verify and update unspent outputs
– Add my own address as recipient of the transaction fees
• Construct a suggested next block
– with the block reward and fees given to my own address
• Try to find a nonce so that block-hash is less than
target difficulty
– If I find a nonce that makes the block valid, post it to all
other peers
– If someone else posts a new valid block, process it and
start working on the next block
2018-02 Daniel Lilliehöök
Immutability of the blockchain
• To “cheat” the blockchain, an attacker
needs to control more than 50% of the
hash-power in the network
• More miners => higher security
• Higher security => higher value
• Higher value => more miners…
2018-02 Daniel Lilliehöök
What’s a hard fork?
• As long as all peers agree on the same rules,
only one version of the chain will grow.
• If community is divided in two different sets of
rules, the chain will split in two separate
branches.
2018-02 Daniel Lilliehöök
Summary
• The bitcoin blockchain is an immutable
distributed ledger of credit balances on
bitcoin addresses
• Miners bookkeep transactions and are
rewarded newly created bitcoins for their
efforts
• A large number of independent miners
ensure that no single party can manipulate
data recorded on the blockchain
2018-02 Daniel Lilliehöök
Contact
Daniel Lilliehöök
Chief Architect
www.innovatesecurity.se
2018-02 Daniel Lilliehöök

More Related Content

What's hot

Blockchain for IoT Security and Privacy: The Case Study of a Smart Home
Blockchain for IoT Security and Privacy: The Case Study of a Smart HomeBlockchain for IoT Security and Privacy: The Case Study of a Smart Home
Blockchain for IoT Security and Privacy: The Case Study of a Smart Home
Kishor Datta Gupta
 
What to expect from Blockchain in 2019?
What to expect from Blockchain in 2019?What to expect from Blockchain in 2019?
What to expect from Blockchain in 2019?
PECB
 
How to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on EthereumHow to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on Ethereum
DEV Cafe
 
From C to Q one event at a time: Event Sourcing illustrated
From C to Q one event at a time: Event Sourcing illustratedFrom C to Q one event at a time: Event Sourcing illustrated
From C to Q one event at a time: Event Sourcing illustrated
Lorenzo Nicora
 
Bitcoin Forensics
Bitcoin ForensicsBitcoin Forensics
Bitcoin Forensics
Apurv Singh Gautam
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
Aayt Bahaa
 
Confidential Computing - Analysing Data Without Seeing Data
Confidential Computing - Analysing Data Without Seeing DataConfidential Computing - Analysing Data Without Seeing Data
Confidential Computing - Analysing Data Without Seeing Data
Maximilian Ott
 
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Ingo Weber
 
Modern problems in backend engineering, Siim Kaspar Uustalu
Modern problems in backend engineering, Siim Kaspar UustaluModern problems in backend engineering, Siim Kaspar Uustalu
Modern problems in backend engineering, Siim Kaspar Uustalu
MobileMonday Estonia
 
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
Ingo Weber
 
Dmitri Reshetov. Distributed Ledger Technologies for Internet of Things #spbl...
Dmitri Reshetov. Distributed Ledger Technologies for Internet of Things #spbl...Dmitri Reshetov. Distributed Ledger Technologies for Internet of Things #spbl...
Dmitri Reshetov. Distributed Ledger Technologies for Internet of Things #spbl...
Дмитрий Плахов
 
The Missing Feature: Blockchain contracts
The Missing Feature: Blockchain contractsThe Missing Feature: Blockchain contracts
The Missing Feature: Blockchain contracts
Aeshan Wijetunge
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
Rashi Singh
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
Nikhil Priya
 
Blockchain and Security : A Virtuous Circle?
Blockchain and Security : A Virtuous Circle?Blockchain and Security : A Virtuous Circle?
Blockchain and Security : A Virtuous Circle?
ITU
 
Grokking TechTalk #17: Introduction to blockchain
Grokking TechTalk #17: Introduction to blockchainGrokking TechTalk #17: Introduction to blockchain
Grokking TechTalk #17: Introduction to blockchain
Grokking VN
 
Blockchain: The New Technology of Trust
Blockchain: The New Technology of TrustBlockchain: The New Technology of Trust
Blockchain: The New Technology of Trust
Macha Pujitha
 
Introduction to blockchain Session @ Tie Pune
Introduction to blockchain Session @ Tie Pune Introduction to blockchain Session @ Tie Pune
Introduction to blockchain Session @ Tie Pune
Uday Kothari
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
AIMDek Technologies
 
Introduction to blockchains
Introduction to blockchainsIntroduction to blockchains
Introduction to blockchains
Adri Jovin
 

What's hot (20)

Blockchain for IoT Security and Privacy: The Case Study of a Smart Home
Blockchain for IoT Security and Privacy: The Case Study of a Smart HomeBlockchain for IoT Security and Privacy: The Case Study of a Smart Home
Blockchain for IoT Security and Privacy: The Case Study of a Smart Home
 
What to expect from Blockchain in 2019?
What to expect from Blockchain in 2019?What to expect from Blockchain in 2019?
What to expect from Blockchain in 2019?
 
How to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on EthereumHow to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on Ethereum
 
From C to Q one event at a time: Event Sourcing illustrated
From C to Q one event at a time: Event Sourcing illustratedFrom C to Q one event at a time: Event Sourcing illustrated
From C to Q one event at a time: Event Sourcing illustrated
 
Bitcoin Forensics
Bitcoin ForensicsBitcoin Forensics
Bitcoin Forensics
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
 
Confidential Computing - Analysing Data Without Seeing Data
Confidential Computing - Analysing Data Without Seeing DataConfidential Computing - Analysing Data Without Seeing Data
Confidential Computing - Analysing Data Without Seeing Data
 
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020
 
Modern problems in backend engineering, Siim Kaspar Uustalu
Modern problems in backend engineering, Siim Kaspar UustaluModern problems in backend engineering, Siim Kaspar Uustalu
Modern problems in backend engineering, Siim Kaspar Uustalu
 
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
 
Dmitri Reshetov. Distributed Ledger Technologies for Internet of Things #spbl...
Dmitri Reshetov. Distributed Ledger Technologies for Internet of Things #spbl...Dmitri Reshetov. Distributed Ledger Technologies for Internet of Things #spbl...
Dmitri Reshetov. Distributed Ledger Technologies for Internet of Things #spbl...
 
The Missing Feature: Blockchain contracts
The Missing Feature: Blockchain contractsThe Missing Feature: Blockchain contracts
The Missing Feature: Blockchain contracts
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
 
Blockchain and Security : A Virtuous Circle?
Blockchain and Security : A Virtuous Circle?Blockchain and Security : A Virtuous Circle?
Blockchain and Security : A Virtuous Circle?
 
Grokking TechTalk #17: Introduction to blockchain
Grokking TechTalk #17: Introduction to blockchainGrokking TechTalk #17: Introduction to blockchain
Grokking TechTalk #17: Introduction to blockchain
 
Blockchain: The New Technology of Trust
Blockchain: The New Technology of TrustBlockchain: The New Technology of Trust
Blockchain: The New Technology of Trust
 
Introduction to blockchain Session @ Tie Pune
Introduction to blockchain Session @ Tie Pune Introduction to blockchain Session @ Tie Pune
Introduction to blockchain Session @ Tie Pune
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Introduction to blockchains
Introduction to blockchainsIntroduction to blockchains
Introduction to blockchains
 

Similar to How bitcoin and blockchains really work

Blockchain Fundamentals - Day 3 - PoW consensus and ICOs (new style)
Blockchain Fundamentals - Day 3 -  PoW consensus and ICOs (new style)Blockchain Fundamentals - Day 3 -  PoW consensus and ICOs (new style)
Blockchain Fundamentals - Day 3 - PoW consensus and ICOs (new style)
Chhay Lin Lim
 
Blockchain explained (Technology running Bitcoin)
Blockchain explained (Technology running Bitcoin)Blockchain explained (Technology running Bitcoin)
Blockchain explained (Technology running Bitcoin)
Qais Ammari
 
Block Chain as a Platform February 2015 - LERNER Consulting
Block Chain as a Platform February 2015 - LERNER ConsultingBlock Chain as a Platform February 2015 - LERNER Consulting
Block Chain as a Platform February 2015 - LERNER Consulting
LERNER Consulting
 
An in depth presentation of Cryptocurrency.
An in depth presentation of Cryptocurrency.An in depth presentation of Cryptocurrency.
An in depth presentation of Cryptocurrency.
SanjeebSamanta1
 
J.burke HackMiami6
J.burke HackMiami6J.burke HackMiami6
J.burke HackMiami6
Jesse Burke
 
Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)
Amir Rafati
 
Blockchain technology bitcoin & beyond
Blockchain technology bitcoin & beyondBlockchain technology bitcoin & beyond
Blockchain technology bitcoin & beyond
Judythbell
 
Shape APAC Blockchain Workshop
Shape APAC Blockchain WorkshopShape APAC Blockchain Workshop
Shape APAC Blockchain Workshop
Nichanan Kesonpat
 
Week 2 - Blockchain and Cryptocurrencies: Key Technical (and Historical) Conc...
Week 2 - Blockchain and Cryptocurrencies: Key Technical (and Historical) Conc...Week 2 - Blockchain and Cryptocurrencies: Key Technical (and Historical) Conc...
Week 2 - Blockchain and Cryptocurrencies: Key Technical (and Historical) Conc...
Roger Royse
 
bitcoin
bitcoinbitcoin
bitcoin
AasimRasheed3
 
Blockchain and Bitcoin.pptx
Blockchain and Bitcoin.pptxBlockchain and Bitcoin.pptx
Blockchain and Bitcoin.pptx
ssuser3ab054
 
15-Bitcoin.pptx
15-Bitcoin.pptx15-Bitcoin.pptx
15-Bitcoin.pptx
ANKITKUMARNATH1
 
Module-2-Introduction-to-Cryptocurrencies.pdf
Module-2-Introduction-to-Cryptocurrencies.pdfModule-2-Introduction-to-Cryptocurrencies.pdf
Module-2-Introduction-to-Cryptocurrencies.pdf
reddoors14
 
Bitcoin I.pptx
Bitcoin I.pptxBitcoin I.pptx
Bitcoin I.pptx
AseemBhube1
 
Blockchain mechanics
Blockchain mechanicsBlockchain mechanics
Blockchain mechanics
minaminotakachi
 
Blockchain mechanics
Blockchain mechanicsBlockchain mechanics
Blockchain mechanics
Mauricio Morales
 
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
Lisa Cheng
 
Bitcoin Mining in decentralized blockchain networks
Bitcoin Mining in decentralized blockchain networksBitcoin Mining in decentralized blockchain networks
Bitcoin Mining in decentralized blockchain networks
sendhilkumarks
 
Blockchain Essentials - Harnessing the Technology for Banking Industry
Blockchain Essentials - Harnessing the Technology for Banking IndustryBlockchain Essentials - Harnessing the Technology for Banking Industry
Blockchain Essentials - Harnessing the Technology for Banking Industry
Goutama Bachtiar
 
Study on Bitcoin - Technical & Legal Aspects (Presentation at Cyber Cell Gurg...
Study on Bitcoin - Technical & Legal Aspects (Presentation at Cyber Cell Gurg...Study on Bitcoin - Technical & Legal Aspects (Presentation at Cyber Cell Gurg...
Study on Bitcoin - Technical & Legal Aspects (Presentation at Cyber Cell Gurg...Lovey Jain
 

Similar to How bitcoin and blockchains really work (20)

Blockchain Fundamentals - Day 3 - PoW consensus and ICOs (new style)
Blockchain Fundamentals - Day 3 -  PoW consensus and ICOs (new style)Blockchain Fundamentals - Day 3 -  PoW consensus and ICOs (new style)
Blockchain Fundamentals - Day 3 - PoW consensus and ICOs (new style)
 
Blockchain explained (Technology running Bitcoin)
Blockchain explained (Technology running Bitcoin)Blockchain explained (Technology running Bitcoin)
Blockchain explained (Technology running Bitcoin)
 
Block Chain as a Platform February 2015 - LERNER Consulting
Block Chain as a Platform February 2015 - LERNER ConsultingBlock Chain as a Platform February 2015 - LERNER Consulting
Block Chain as a Platform February 2015 - LERNER Consulting
 
An in depth presentation of Cryptocurrency.
An in depth presentation of Cryptocurrency.An in depth presentation of Cryptocurrency.
An in depth presentation of Cryptocurrency.
 
J.burke HackMiami6
J.burke HackMiami6J.burke HackMiami6
J.burke HackMiami6
 
Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)
 
Blockchain technology bitcoin & beyond
Blockchain technology bitcoin & beyondBlockchain technology bitcoin & beyond
Blockchain technology bitcoin & beyond
 
Shape APAC Blockchain Workshop
Shape APAC Blockchain WorkshopShape APAC Blockchain Workshop
Shape APAC Blockchain Workshop
 
Week 2 - Blockchain and Cryptocurrencies: Key Technical (and Historical) Conc...
Week 2 - Blockchain and Cryptocurrencies: Key Technical (and Historical) Conc...Week 2 - Blockchain and Cryptocurrencies: Key Technical (and Historical) Conc...
Week 2 - Blockchain and Cryptocurrencies: Key Technical (and Historical) Conc...
 
bitcoin
bitcoinbitcoin
bitcoin
 
Blockchain and Bitcoin.pptx
Blockchain and Bitcoin.pptxBlockchain and Bitcoin.pptx
Blockchain and Bitcoin.pptx
 
15-Bitcoin.pptx
15-Bitcoin.pptx15-Bitcoin.pptx
15-Bitcoin.pptx
 
Module-2-Introduction-to-Cryptocurrencies.pdf
Module-2-Introduction-to-Cryptocurrencies.pdfModule-2-Introduction-to-Cryptocurrencies.pdf
Module-2-Introduction-to-Cryptocurrencies.pdf
 
Bitcoin I.pptx
Bitcoin I.pptxBitcoin I.pptx
Bitcoin I.pptx
 
Blockchain mechanics
Blockchain mechanicsBlockchain mechanics
Blockchain mechanics
 
Blockchain mechanics
Blockchain mechanicsBlockchain mechanics
Blockchain mechanics
 
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
 
Bitcoin Mining in decentralized blockchain networks
Bitcoin Mining in decentralized blockchain networksBitcoin Mining in decentralized blockchain networks
Bitcoin Mining in decentralized blockchain networks
 
Blockchain Essentials - Harnessing the Technology for Banking Industry
Blockchain Essentials - Harnessing the Technology for Banking IndustryBlockchain Essentials - Harnessing the Technology for Banking Industry
Blockchain Essentials - Harnessing the Technology for Banking Industry
 
Study on Bitcoin - Technical & Legal Aspects (Presentation at Cyber Cell Gurg...
Study on Bitcoin - Technical & Legal Aspects (Presentation at Cyber Cell Gurg...Study on Bitcoin - Technical & Legal Aspects (Presentation at Cyber Cell Gurg...
Study on Bitcoin - Technical & Legal Aspects (Presentation at Cyber Cell Gurg...
 

Recently uploaded

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 

Recently uploaded (20)

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 

How bitcoin and blockchains really work

  • 2. Daniel Lilliehöök: • Ph.D. theoretical physics 2000 – Post doc at MIT and Oxford University • In IT-architecture since 2003 – Chief IT-architect at Eniro, Riksbyggen • Co-founder of Innovate Security 2015 – Information security and architecture – 10 employees 2017 • Heard about ”Bitmoney-something” 2013... 2018-02 Daniel Lilliehöök
  • 3. What is bitcoin? 1. An independent currency 2. A digital peer-to- peer payment network 2018-02 Daniel Lilliehöök
  • 4. How to send or receive bitcoin 2018-02 Daniel Lilliehöök
  • 5. What’s new? • International currency – Not tied to any country • Not controlled by any central authority – No central bank – No bank account needed • Total amount of bitcoins is fixed – Known and unchangeable internal inflation • Transactions are irreversible – No one can undo a transaction for you 2018-02 Daniel Lilliehöök
  • 6. What’s the value? • Exchange rate is set in a free market – Have to exchange with someone who owns bitcoin • Exchange sites matches trade orders – Coinbase, Kraken, Bitstamp, LocalBitcoins… 2018-02 Daniel Lilliehöök
  • 8. What is a blockchain? 2018-02 Daniel Lilliehöök
  • 9. What is a blockchain, really? 2018-02 Daniel Lilliehöök A chain of blocks …
  • 10. What’s a block? • A collection of data/text • Numbered and chained together 2018-02 Daniel Lilliehöök …………………….... ……………………… ……………………… ………………………… …………………… ………………………… …………………..... ..…… …………………….... ……………………… ……………………… ………………………… …………………… ………………………… …………………..... ..…… …………………….... ……………………… ……………………… ………………………… …………………… ………………………… …………………..... ..…… 119 120 121
  • 11. Blocks are also: • Validated by a set of rules • Distributed freely among peers 2018-02 Daniel Lilliehöök …………………….... ……………………… ……………………… ………………………… …………………… ………………………… …………………..... ..…… …………………….... ……………………… ……………………… ………………………… …………………… ………………………… …………………..... ..…… …………………….... ……………………… ……………………… ………………………… …………………… ………………………… …………………..... ..…… 119 120 121
  • 12. Client-server network 2018-02 Daniel Lilliehöök Traditional: one server, many clients
  • 13. Peer-to-peer network Peer-to-peer: no central server or authority 2018-02 Daniel Lilliehöök
  • 14. The bitcoin blockchain Blocks contain transactions between liability accounts 2018-02 Daniel Lilliehöök Transaction id Account nr Debit Credit Verification nr 2566 1111111-1 1,21 1234 2566 2222222-2 1,20 2566 3333333-3 0,01
  • 15. The bitcoin blockchain Blocks contain transactions between liability accounts 2018-02 Daniel Lilliehöök Transaction id Account Nr Debit Credit Verification nr 2566 1111111-1 1,21 ##### 2566 2222222-2 1,20 2566 3333333-3 0,01 Bitcoin address Input Output Digital signature bitcoin terminology
  • 16. Nothing new yet • Any part (company, bank etc) can issue and administer an accounts book • BUT then: – Users have to apply to get an account – Have to trust the issuer 2018-02 Daniel Lilliehöök
  • 17. Two mathematical tricks • Hash-functions • Digital signatures 2018-02 Daniel Lilliehöök
  • 18. Hash functions 2018-02 Daniel Lilliehöök Input data ………………… ………………… ………………… ……………. Hash value Input data of any length Fixed length hash value Hash function
  • 19. Hash function: SHA-256 2018-02 Daniel Lilliehöök fox SHA-256 The quick brown fox jumps over the lazy dog d7a8fbb307d78094 69ca9abcb0082e4f 8d5651e46d3cdb76 2d02d0bf37c9e592 SHA-256 The quick brown fox jumps ouer the lazy dog SHA-256 776cb326ab0cd5f0 a974c1b9606044d8 485201f2db19cf8e 3749bdee5f36e200 1f74feeeff32873c 2dcef987ff8fb8b8 becefef4ead58eb0 407d439c19f92b32
  • 20. Swedish social security numbers 2018-02 Daniel Lilliehöök Luhn hash function 840101-971 9 Control digit 9
  • 21. Private- and public keys 2018-02 Daniel Lilliehöök Private key Public key A * B = C
  • 22. Digital signatures 2018-02 Daniel Lilliehöök Message ………………… ………………… ………………… ……………. Hash value = ? Signature function Verification function Hash value Signature
  • 23. Bitcoin addresses • Generate a private and public key-pair • Bitcoin address is the hash (of the hash) of the public key 2018-02 Daniel Lilliehöök 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa Public key
  • 24. Bitcoin wallets • Generates new bitcoin addresses • Stores your private key(s) • Listens to transactions on the network • Can generate and post signed transactions 2018-02 Daniel Lilliehöök
  • 25. Problem: double-spending 2018-02 Daniel Lilliehöök 1 BTC 1 BTC 1 BTC
  • 26. Double-spending: traditional solution 2018-02 Daniel Lilliehöök 1 BTC 1 BTC 1 BTC 0 BTC Traditional solution: one trusted central part
  • 27. Double-spending: New solution Satoshi Nakamoto: üProof-of-Work üBlock rewards 2018-02 Daniel Lilliehöök
  • 28. Block rewards • One special transaction allowed on each block: • All initial balances come from these • Incitement for many to submit new blocks! 2018-02 Daniel Lilliehöök Transaction id Bitcoin address Input Output Digital signature 2582 ????????? 12,5 [N/A]
  • 29. Proof-of-Work • Must be difficult to submit a new block: – Add a meaningless but hard mathematical puzzle for each block – Adjust the difficulty of the puzzle depending on how many are trying 2018-02 Daniel Lilliehöök
  • 30. Proof-of-work Bloch hash must be smaller than a target number 2018-02 Daniel Lilliehöök Block 118 Previous hash Timestamp Nonce Block hash 117 Nonce Block hash 119 Previous hash Timestamp
  • 31. Adjust difficulty every 2 weeks 2018-02 Daniel Lilliehöök !"# $%&'"$ = )*+ $%&'"$ ∗ $-." )/ *%0$ 2016 5*)670 2 #""70
  • 32. Rule: block reward declines • The block reward is cut in half every 4 years (every 210’000 block) 2018-02 Daniel Lilliehöök
  • 33. Blockchain rules: • Anyone can request and verify blocks • Anyone can submit new blocks • Valid blocks requires a proof-of-work hash • Miners collect transactions, and try to compose new valid blocks • Miners and users trust the longest chain 2018-02 Daniel Lilliehöök
  • 34. What miners do – startup • Request and verify first block(s) • Verify transactions • Keep track of unspent outputs • Repeat with next block(s)… 2018-02 Daniel Lilliehöök Unspent outputs
  • 35. What miners do – continually • Collect new transactions from network – Check signatures – Verify and update unspent outputs – Add my own address as recipient of the transaction fees • Construct a suggested next block – with the block reward and fees given to my own address • Try to find a nonce so that block-hash is less than target difficulty – If I find a nonce that makes the block valid, post it to all other peers – If someone else posts a new valid block, process it and start working on the next block 2018-02 Daniel Lilliehöök
  • 36. Immutability of the blockchain • To “cheat” the blockchain, an attacker needs to control more than 50% of the hash-power in the network • More miners => higher security • Higher security => higher value • Higher value => more miners… 2018-02 Daniel Lilliehöök
  • 37. What’s a hard fork? • As long as all peers agree on the same rules, only one version of the chain will grow. • If community is divided in two different sets of rules, the chain will split in two separate branches. 2018-02 Daniel Lilliehöök
  • 38. Summary • The bitcoin blockchain is an immutable distributed ledger of credit balances on bitcoin addresses • Miners bookkeep transactions and are rewarded newly created bitcoins for their efforts • A large number of independent miners ensure that no single party can manipulate data recorded on the blockchain 2018-02 Daniel Lilliehöök