Bitcoin and blockchain are not the same things, although they are related in that blockchain technology was first described and implemented in Bitcoin. Learn More about Blockchain:
4. 4
The Elements
Ledger - Domesday Book!!
(Winchester Roll or King’s Roll)
Ledger - 11th century England
Hashcash
Computational puzzle
Time stamping
Document timestamp - 1960s
5. 5
Hashcash
Hashcash is a proof-of-work system used to
limit email spam and denial-of-service attacks,
and more recently has become known for its
use in bitcoin (and other cryptocurrencies) as
part of the mining algorithm. Hashcash was
proposed in May 1997 by Adam Back
6. 6
Computational Puzzle
The basic idea — that solutions to
computational puzzles could be digital
objects that have some value — is pretty
old.
It was first proposed by cryptographers
Dwork and Naor as a potential solution to
email spam back in 1992.
7. 7
*Domesday Book had the final word – there was to be no appeal beyond it as evidence of
legal title to land. For many centuries Domesday was regarded as the authoritative register
regarding rightful possession and was used mainly for that purpose. It was called Domesday
by 1180. Before that it was known as the Winchester Roll or King’s Roll, and sometimes as the
Book of the Treasury.
Another key component of
Bitcoin is the block chain: a
ledger in which all Bitcoin
transactions are securely
recorded.
The Ledger (*Domesday Book)
8. 8
Time Stamping – Document signing & Linking
Secure timestamping of digital documents - timestamping
accurately conveys the order of creation of these documents
Haber and Stornetta paper in 1991:
Haber and Stornetta’s scheme signs a document together with the current time and as well as
a link or a pointer to the previous document, and issues a “certificate” with this information.
Secure
9. 9
Linked Timestamping Efficiency Improvement
Instead of linking documents individually, we can collect them into blocks and link blocks
together in a chain. Within each block, the documents would again be linked together, but in a
tree structure instead of linearly.
This data structure forms the skeleton of Bitcoin’s block chain
link blocks
11. 11
Digitally recorded "blocks" of data stored in a linear chain.
Each block in the chain contains data (e.g. bitcoin transaction),
is cryptographically hashed.
The blocks of hashed data draw upon the previous-block in
the chain, ensuring all data in the overall "blockchain" has not
been tampered with and remains unchanged.
Bitcoin Blockchain - Blocks
Source: http://www.blockchaintechnologies.com/blockchain-definition#sthash.R2xe5qpI.dpuf
12. 12
Bitcoin and blockchain are not the same things,
although they are related in that blockchain
technology was first
described and implemented in Bitcoin
13. 13
In essence, Bitcoin combines the
idea of using computational
puzzles to regulate the creation of
new currency units with the idea of
secure timestamping to record a
ledger of transactions and prevent
double spending.
What is Blockchain? – The underpinning Technology of bitcoin
records asset transfer between participants
Blockchain is a shared, replicated ledger technology
14. 14
Blockchain - Shared/Distributed Ledger
Records all transactions across business
network
Shared between participants
Participants have own copy through replication
(Permissioned*, so participants see only
appropriate transactions)
THE shared system of record
A shared ledger is essentially a database that keeps track of who owns a
financial, physical or electronic asset
*IBM blockchain technology
16. 16
How does Bitcoin Blockchain Work? - Mining
Mining: solving computational puzzles
Mining is the process of adding transaction records to
the public ledger by performing a computing task that
is costly to execute but easy to verify.
17. 17
The process of adding new blocks to the blockchain
(Bitcoin’s public ledger) and issuing new bitcoins with each
verified block
Confirms to the rest of the network that unique transactions have taken place
Bitcoin nodes use the blockchain to distinguish legitimate Bitcoin transactions
from attempts to re-spend coins that have already been spent elsewhere
Intentionally designed to be resource-intensive so that the number of blocks
found each day by miners remains steady
Individual blocks must contain a proof of work to be considered valid. This
proof of work is verified by other Bitcoin nodes each time they receive a block
What is Bitcoin Mining?
18. 18
The bitcoin blockchain, which uses ‘Proof-of-Work Mining’, is
the most publicly proven method used to achieve distributed
consensus.
Cryptographic proofs-of-work are required for new blocks to be
accepted.
Other forms of distributed ledger consensus exist such as
Ethereum1, Ripple2, Hyperledger, MultiChain, Eris, and other
private enterprise solutions
Mining - Consensus
Alternative blockchains (separate from the bitcoin blockchain) are often labeled Consensus Protocols or Consensus Platforms
1 Ethereum allows a network of peers to administer their own
‘smart contracts’ – short computer programs that execute
their instructions once certain criteria have been met..
2 Ripple’s distributed ledger are validated by consensus rather
than using a proof-of-work approach like Bitcoin because a level
of trust is assumed between the parties to a transactions
Not needed in Trusted Networks
19. 19
Mining hardware has progressed to specialized ASIC (Application-Specific Integrated Circuit) mining
- placing the SHA256 function directly on silicon chips -
Mining - Hardware
20. 20
Every two weeks the bitcoin network difficulty factor is
recalculated to make sure that blocks are found on
average every 10 minutes despite increasing hash rates
over time.
The difficulty almost always goes up which means it
becomes progressively harder to mine bitcoins. Bitcoin
has become so difficult to mine that the vast majority of
miners join a bitcoin mining pool.
Anyone mining bitcoins has a ‘Hash Rate’, a measurement of
how many math calculations your computer is doing per second
A mining pool is a way for bitcoin miners to work
together for a better chance at finding a bitcoin block
Difficulty factor is recalculated every
2,016 blocks ~ every 2 weeks
Mining – Solving the Hard Problem
Difficulty is a measure of how hard it is to find a hash
below the target value, a 256-bit number, during PoW
23. 23
Blockchain relies extensively on hashes and hash functions. A
hash (output) is the result of a transformation of the original
information (input).
A cryptographic hash function is characterized by its extreme
difficulty to revert, in other words, to recreate the input data
from its hash value alone.
Mining – Hashes and Hash Functions
A hash function is a mathematical algorithm that takes
an input and transforms it into an output of fixed length
A hash is usually a 64 character hexadecimal string that
represents a one way encryption of data, usually transactions
A measure of how difficult it is to find a hash below
the target value, a 256-bit number, during PoW
24. 24
#Hash - Bitcoin’s proof of work scheme
SHA-256
1. A reference to the previous block
2. Details of their candidate block of transactions
3. A special number called a ‘nonce’
1 32
Miners must demonstrate a proof of
work before their proposed block of
transactions is accepted by the network
With SHA256, the output is always 256 bits
long, regardless of the size of the input
25. 25
#Hash - Bitcoin’s proof of work scheme
Increment Nonce
and try again
Combine hash
with nonce
Mining reward !! (12.5 BTC)
Solved
the PoW
…mining difficulty
determines the target
value
New block propagated to the network
hash < target value?
• Bundle txns in a block (N+1)
• Verify txns are valid
• Select most recent block (N), insert into
new block (N+1) as a hash
26. 26
Bitcoin Blockchain Contains Two Different Hash Structures
The first is a hash chain of blocks that links the different blocks to one another
The second is internal to each block, a Merkle Tree of transactions within the blocks
28. 28
Bitcoin Blockchain - Keys
*Ownership of bitcoin is established through digital keys,
bitcoin addresses, and digital signatures.
The public key is calculated from the private key using elliptic curve multiplication, which is
irreversible
* Mastering Bitcoin: Unlocking Digital Cryptocurrencies 1st Edition
Practically
irreversible
The public key is used to receive bitcoins, and the private
key is used to sign transactions to spend those bitcoins.
Elliptical Curve Multiplication Hashing Function
29. 29
Bitcoin Blockchain – Bitcoin Address
A bitcoin address is derived from a public key
– the corresponding private key is stored in a
wallet.
Bitcoin users can create as many addresses
as they wish. A new address is encouraged
for every transaction to increase privacy.
When a new address is created, a
cryptographic key pair is created - a private
key that can be verified with a public key
(known to everyone).
A bitcoin address is not the same as a public key. Bitcoin
addresses are derived from a public key using a one-way function
31. 31
Bitcoin Blockchain - Wallets
The digital keys are not actually stored in the network, but are
instead created and stored by users in a file, or simple database,
called a wallet.
Wallets provide access to multiple bitcoin addresses
*Bitcoin wallets contain keys, not coins. Each user has a wallet containing keys.
Wallets are really keychains containing pairs of private/public keys.
Users sign transactions with the keys, thereby proving they own the transaction
outputs (their coins). The coins are stored on the blockchain in the form of
transaction-outputs. * Safari Books: Mastering Bitcoin
32. 32
Bitcoin Blockchain – Digital Signature
Introduction to Bitcoin and Decentralized Technology - https://app.pluralsight.com/library/courses/bitcoin-decentralized-technology/table-of-contents
34. 34
Bitcoin Blockchain – (Financial) Transactions
1. Bob (B) creates new bitcoin address
for Alice (A) to send payment to.
2. Alice’s (A) bitcoin client signs a
transaction (request) with private key
of address transferring bitcoin from.
3. Bob (B) can use the related public
key to verify transaction.
Transactions are data structures that encode the transfer of
value between participants in the bitcoin system.
To ensure the ownership of funds, the whole transaction file is digitally signed with a private
key by the user sending the funds
35. 35UBS - Global banks: Is FinTech a threat or an opportunity? – July 2016
5 BTC 2 BTC
3 BTC
* Change
AddrBob
AddrAlice
AddrAlice
* The process of unlocking and spending funds, you expose the private key – To preserve unused funds (BTC) the
client generates a new Bitcoin address, and sends the difference back to this address. This is known as change.
Bitcoin Blockchain – (Financial) Transactions
37. 37
Bitcoin Blockchain vs (IBM) Hyperledger Blockchain
The bitcoin blockchain uses ‘Proof-of-Work’ (mining or hashing)
consensus and generates a “currency” bitcoin, BTC.
Hyperledger uses Proof-of-Stake (blockchain network asks users to
prove ownership of a certain amount of an assets); in its current state
has no native currency.
The bitcoin blockchain ledger is unpermissioned —unpermissioned networks,
any act may join the network, while Hyperledger is permissioned, participants
see only appropriate transactions. —permissioned networks are described as those where
validating and non-validating nodes are run by known whitelisted organizations, and where actors on the network are granted an identity
from an issuing authority service on the network.
“The technology behind Bitcoin is open source and over 1000 Blockchains exist today…”
Simon Dixon, CEO of BnkToTheFuture
38. 38
The 3Ps of the Blockchain:
platforms, programs and protocols
https://en.wikipedia.org/wiki/Hashcash
Hashcash is a proof-of-work system used to limit email spam and denial-of-service attacks, and more recently has become known for its use in bitcoin (and other cryptocurrencies) as part of the mining algorithm. Hashcash was proposed in May 1997 by Adam Back.[1]
Bitcoin and Cryptocurrency Technologies
Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller, Steven Goldfeder
with a preface by Jeremy Clark Draft — Feb 9, 2016
http://www.nationalarchives.gov.uk/domesday/discover-domesday/
Domesday is our most famous and earliest surviving public record. It is a highly detailed survey and valuation of all the land held by the King and his chief tenants, along with all the resources that went with the land in late 11th century England. The survey was a massive enterprise, and the record of that survey, Domesday Book, was a remarkable achievement. There is nothing like it in England until the censuses of the 19th century
Another key component of Bitcoin is the block chain: a ledger in which all Bitcoin transactions are securely recorded. The ideas behind the block chain are again quite old, and trace back to a paper by Haber and Stornetta in 1991.
.
What this achieves is that each document’s certificate ensures the integrity of the contents of the previous document.
(Bitcoin and Cryptocurrency Technologies
Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller, Steven Goldfeder with a preface by Jeremy Clark Draft — Feb 9, 2016 )
pg 16 Fig 4, linked timestamping
https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdf
A later paper proposed an efficiency improvement: instead of linking documents individually, we can collect them into blocks and link blocks together in a chain. Within each block, the documents would again be linked together, but in a tree structure instead of linearly. This decreases the amount of checking needed to verify that a particular document appears at a particular point in the history of the system.
(Bitcoin and Cryptocurrency Technologies
Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller, Steven Goldfeder with a preface by Jeremy Clark Draft — Feb 9, 2016 )
pg 16 Figure 5: efficient linked timestamping
https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdf
The Bitcoin system is based on a shared public ledger (the blockchain), maintained
by a decentralised computer network (known as miners), which allows for digital
transactions of units (Bitcoins) in such a way that no trust in a central authority is
required, but only trust in the underlying cryptographic system that certifies each
block of transactions.
Key features of the Bitcoin system are:
Multiple transactions are grouped into "blocks" which form units of
validation/integrity in the system.
Most transactions are for transfers of Bitcoins from one owner to another.
Each transaction is cryptographically signed (using a secret key) by the
owner of the transaction to prove that they own the Bitcoins being
transferred and prevent modification of the request.
Each block has a unique identifier and each block contains the previous
block's hash, thus creating the "chain" in "blockchain" and preventing
previous block hash block ID
modification of prior blocks (because any modification would alter the
hash).
The cryptographic nonce is a "random" (or, more strictly, unpredictable
value) that, when hashed with the rest of the block's contents, generates a
hash value with a specified number of zero values at the beginning. 2Thus,
searching for a nonce that generates a hash with a specific pattern (in this
case a certain number of leading zeroes) can only be done by repeatedly
trying different random nonces combined with rest of the block contents,
until a solution is found. Once a solution is found, it is broadcast to the
other participants in the Bitcoin system, which can relatively easily verify
that the nonce (and hence the rest of the block) is valid, by repeating the
calculation. The process of generating a valid block is called "mining" and is
performed by multiple participants which race to produce a valid
nonce/hash combination, and claim the mining reward (see below) and
fees.
The first transaction in the block will normally be an additional transaction
added by the miner as a reward for mining the block (currently 12.5
Bitcoins) plus any optional transaction fees due from the other transactions.
All transactions transferring funds (except the mined "reward") are linked
together to prove the source of funds and to exclude the possibility of
double-spending. Miners are required to check transaction chains ahead of
them in the block.
The mining process is computationally expensive, and expensive in terms of
hardware and resource (primarily electricity) consumption. In Bitcoin,
anybody with the requisite resources can try to mine new blocks – there are
no barriers to entry other than having suitable hardware (the software
design of the whole system is open source).
The Bitcoin system is automatically tuned so that a new block can be
generated around every 10 minutes.
All requests for transactions to be applied to the blockchain, all changes to
the blockchain and all verifications of the blockchain are broadcast to all
participants in the Bitcoin system so that all transactions are in plain sight.
The hashing system, the linkage of blocks, and the public verification by
consensus all form a system that is considered to be computationally
infeasible to subvert. Strictly speaking it is considered that once six blocks
have been written that it would be infeasible to reverse a transaction, i.e.,
about an hour is required to be absolutely certain that a transaction could
not be reversed.
The Bitcoin system has, in blockchain, created the concept of a publicly maintained
ledger system with an immutable historical record secured using cryptographic
methods (crypto-ledger), without requiring trust in any central counterparty.
The Bitcoin system is based on a shared public ledger (the blockchain), maintained
by a decentralised computer network (known as miners), which allows for digital
transactions of units (Bitcoins) in such a way that no trust in a central authority is
required, but only trust in the underlying cryptographic system that certifies each
block of transactions.
Key features of the Bitcoin system are:
Multiple transactions are grouped into "blocks" which form units of
validation/integrity in the system.
Most transactions are for transfers of Bitcoins from one owner to another.
Each transaction is cryptographically signed (using a secret key) by the
owner of the transaction to prove that they own the Bitcoins being
transferred and prevent modification of the request.
Each block has a unique identifier and each block contains the previous
block's hash, thus creating the "chain" in "blockchain" and preventing
previous block hash block ID
modification of prior blocks (because any modification would alter the
hash).
The cryptographic nonce is a "random" (or, more strictly, unpredictable
value) that, when hashed with the rest of the block's contents, generates a
hash value with a specified number of zero values at the beginning. 2Thus,
searching for a nonce that generates a hash with a specific pattern (in this
case a certain number of leading zeroes) can only be done by repeatedly
trying different random nonces combined with rest of the block contents,
until a solution is found. Once a solution is found, it is broadcast to the
other participants in the Bitcoin system, which can relatively easily verify
that the nonce (and hence the rest of the block) is valid, by repeating the
calculation. The process of generating a valid block is called "mining" and is
performed by multiple participants which race to produce a valid
nonce/hash combination, and claim the mining reward (see below) and
fees.
The first transaction in the block will normally be an additional transaction
added by the miner as a reward for mining the block (currently 12.5
Bitcoins) plus any optional transaction fees due from the other transactions.
All transactions transferring funds (except the mined "reward") are linked
together to prove the source of funds and to exclude the possibility of
double-spending. Miners are required to check transaction chains ahead of
them in the block.
The mining process is computationally expensive, and expensive in terms of
hardware and resource (primarily electricity) consumption. In Bitcoin,
anybody with the requisite resources can try to mine new blocks – there are
no barriers to entry other than having suitable hardware (the software
design of the whole system is open source).
The Bitcoin system is automatically tuned so that a new block can be
generated around every 10 minutes.
All requests for transactions to be applied to the blockchain, all changes to
the blockchain and all verifications of the blockchain are broadcast to all
participants in the Bitcoin system so that all transactions are in plain sight.
The hashing system, the linkage of blocks, and the public verification by
consensus all form a system that is considered to be computationally
infeasible to subvert. Strictly speaking it is considered that once six blocks
have been written that it would be infeasible to reverse a transaction, i.e.,
about an hour is required to be absolutely certain that a transaction could
not be reversed.
The Bitcoin system has, in blockchain, created the concept of a publicly maintained
ledger system with an immutable historical record secured using cryptographic
methods (crypto-ledger), without requiring trust in any central counterparty.
Permissioned, so participants see only appropriate transactions
There is no longer the need for trusted servers; instead, events are recorded by a collection of untrusted nodes called “miners”. Every miner keeps track of blocks, rather than having to rely on regular users to do it. Anyone can become a miner by solving computational puzzles to create blocks. Bitcoin also gets rid of signatures, relying only on hash pointers to ensure the integrity of the data structure. Finally, the actual timestamps aren’t of much importance in Bitcoin, and the point of
16
the system is to record the relative ordering of transactions in a tamper-resistant way.
Bitcoin uses the hashcash proof-of-work function October 1, 2014 Blockchain Technology 40 http://codinginmysleep.com/bitcoin-mining-in-plain-english/
Bitcoin mining is an extremely competitive industry. The hashing power has increased exponentially every year of bitcoin’s existence.
(Bitcoin and Cryptocurrency Technologies
Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller, Steven Goldfeder with a preface by Jeremy Clark Draft — Feb 9, 2016 )
5.2 Mining Hardware; pg 145 Fig 5.10
https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdf
It’s like a formula or algorithm which takes the input data (any data, whether it’s the entire Encyclopedia Britannica, or just the number ‘1’) and turns it into an output of a fixed length, which represents the fingerprint of the data. There are many types of hash functions, and a common robust one is called SHA-256 (which stands for Secure Hash Algorithm – 256 bit)
Bitcoin miners must demonstrate a proof of work before their proposed block of transactions is accepted by the network.
The Bitcoin protocol requires that miners combine three inputs and feed them into a SHA-256 hash function:
• A reference to the previous block.
• Details of their candidate block of transactions.
• A special number called a ‘nonce’.
If the hash value produced is below a certain threshold, the proof of work is complete. If it is not, the miner must try again with another value for the nonce. Because there is no way to tell what value of the nonce, when combined with the other two inputs, will produce a satisfactory hash value, miners are forced to simply cycle through nonce values in trial and error
Bitcoin miners must demonstrate a proof of work before their proposed block of transactions is accepted by the network.
The Bitcoin protocol requires that miners combine three inputs and feed them into a SHA-256 hash function:
• A reference to the previous block.
• Details of their candidate block of transactions.
• A special number called a ‘nonce’.
If the hash value produced is below a certain threshold, the proof of work is complete. If it is not, the miner must try again with another value for the nonce. Because there is no way to tell what value of the nonce, when combined with the other two inputs, will produce a satisfactory hash value, miners are forced to simply cycle through nonce values in trial and error
The Bitcoin block chain contains two different hash structures.
The first is a hash chain of blocks that links the different blocks to one another.
The second is internal to each block and is a Merkle Tree of transactions within the blocks.
(Bitcoin and Cryptocurrency Technologies
Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller, Steven Goldfeder with a preface by Jeremy Clark Draft — Feb 9, 2016 )
3.4 Bitcoin blocks; pg 88 Fig 3.8
https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdf
A common conflict is when multiple miners create blocks at roughly the same time. Because blocks take time to be shared across the network, which one should count as the legit block?
with a more centralised or trusted blockchain network, you can make decisions by using a trusted, or senior validator to arbitrate in these cases.
a-gentle-introduction-to-blockchain-technology-web.pdf
An unpredictable (typically large and random) number is used to begin generation of an acceptable pair of keys suitable for use by an asymmetric key algorithm.
An an asymmetric key encryption scheme, anyone can encrypt messages using the public key, but only the holder of the paired private key can decrypt. Security depends on the secrecy of the private key.
Public key cryptography was invented in the 1970s and is a mathematical foundation for computer and information security.
Each BC address is a public key. A mathematically related private key is the “password” that lets you generate digital signatures to spend bitcoins
Figure 4-5. Public key to bitcoin address: conversion of a public key into a bitcoin address
https://www.safaribooksonline.com/library/view/mastering-bitcoin/9781491902639/ch04.html
Mastering Bitcoin
by Andreas M. Antonopoulos
Publisher: O'Reilly Media, Inc.
Release Date: December 2014
ISBN: 9781491902639
There are six various permutations that I’m seeing in this emerging landscape:
Bitcoin currency + bitcoin blockchain: Bitcoin. Yes, that’s the only one there, as it’s the reference point.
Bitcoin currency + non-bitcoin blockchain: Blockstream, Truthcoin. Side chains are used, and they are “pegged” the main bitcoin blockchain via various schemes.
Non-bitcoin currency + bitcoin blockchain: Factom, Mastercoin, Counterparty, Namecoin. In this case, the bitcoin blockchain is used, but a native currency fuels the operations of that other platform.
Non-bitcoin currency + non-bitcoin blockchain: Ethereum, BitShares, Truthcoin, Litecoin, PayCoin. This segment represents the ultimate in “bitcoin independence.”
Non-blockchain consensus: Ripple, Stellar, NXT, Hyperledger, Tendermint, Pebble, Open Transactions. These platforms implement decentralized consensus and decentralized trust without a blockchain construct as its nucleus.
Blockchain-neutral smart services: Eris Industries, PeerNova, Codius, SmartContract, SAE, Tezos, Tillit. This category will probably need to be divided further, as it is still developing, but it includes a mix of decentralized platforms and interesting smart contract services.
http://radar.oreilly.com/2015/01/the-3ps-of-the-blockchain-platforms-programs-and-protocols.html