Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Bitcoin’sBlockchain
fromhashestoescrow
andbeyond
Grzegorz Gawron
Arini Labs
marketics at arini.biz
AGENDA
- basic building blocks
- (cryptographic) hash functions
- hash pointers
- merkle tree
- digital signatures
- pract...
basicbuildingblocks
hashfunctions
● any size input
● fixed size output
● efficient computation
cryptographichashfunctions
● collision resistance
○ infeasible to find x,y with same hash output
○ what is guaranteed way ...
CryptoHashApplications
● message digests
● commitments
○ com = commit(msg, key)
○ ver = verify(com, msg, key)
● search puz...
MerkleTree
* 7/1/2016 wikipedia
Digital
Signatures
* 7/1/2016 wikimedia
Blockchain
* 7/1/2015 https://21.co/learn/bitcoin-mining/#the-merkle-root
digital
signatures
crypto hash
pointers
merkle t...
Transactions
* Bitcoin: A Peer-to-Peer Electronic Cash System, Satoshi Nakamoto
scriptPK
scriptSig
Transaction:combine/split
* Bitcoin: A Peer-to-Peer Electronic Cash System, Satoshi Nakamoto
Practicalities
Bootstrappingishard
security
healthy
mining
ecosystem
stable
value
ChangingtheProtocol
HARD FORKS
new client’s blocks
rejected by old
SOFT FORKS
new client’s blocks
accepted by old
51PercentAttack
● what an attacker can hope for?
○ steal?
○ suppress transactions?
○ change block reward?
○ destroy confid...
transactionscripts
Scripts
● pay to public key hash
● pay to script hash
○ multi signature
paytopublickeyhash
* https://en.bitcoin.it/wiki/Transaction
script to run = scriptSig scriptPubKey
scriptPubKey: OP_DUP OP...
paytoscript(m-of-nmultisignature)
* https://en.bitcoin.it/wiki/Transaction
script1 to validate = scriptSig scriptPubKey
sc...
Scripts’Applications
● escrow (alice, bob, 3rd party)
● green addresses (alice, bob, bank)
● efficient micro-payments (ali...
TRANSACTION
10 BTC
from Alice
to MULTISIG
(2 out of 3)
Escrow
Arbitrator
Alice
2x sign
Bob
sign
2x sign
1 2a
2c 2b
Bob
TRANSACTION
10 BTC
from Bank
to Bob
GreenAddresses
Alice
‘Bank’
1
sign
2
3
4
Bob
TRANSACTION B
<lock time>
1 BTC
from TRANS A
to Alice
Micropayments
Alice
2a
sign
TRANSACTION k
0.0001 BTC
from TRANS ...
References
- Bitcoin: A Peer-to-Peer Electronic Cash System, Satoshi
Nakamoto
https://bitcoin.org/bitcoin.pdf
- Princeton ...
ThankYou
Grzegorz Gawron
Arini Labs
marketics at arini.biz
Upcoming SlideShare
Loading in …5
×

Bitcoin’s blockchain - from hashes to Escrow and beyond

1,402 views

Published on

The second part of the 'Bitcoin and Friends' presentation. It goes into detail of blockchain building blocks then dives deeper into the transaction scripting functionality to finish off with simple applications: Escrow, Micropayments and Green Addresses.

Published in: Technology
  • Login to see the comments

  • Be the first to like this

Bitcoin’s blockchain - from hashes to Escrow and beyond

  1. 1. Bitcoin’sBlockchain fromhashestoescrow andbeyond Grzegorz Gawron Arini Labs marketics at arini.biz
  2. 2. AGENDA - basic building blocks - (cryptographic) hash functions - hash pointers - merkle tree - digital signatures - practicalities - bootstrapping - 51 pct attack - forking - beyond simple transactions - scripts - escrow, green addresses, micropayments
  3. 3. basicbuildingblocks
  4. 4. hashfunctions ● any size input ● fixed size output ● efficient computation
  5. 5. cryptographichashfunctions ● collision resistance ○ infeasible to find x,y with same hash output ○ what is guaranteed way of finding a collision? ○ what’s the time-cost? ● hiding ○ given hash it’s infeasible to find the message ○ example: coin flip? ○ with the ‘random’ nonce ● puzzle-friendliness ○ given a set of hashes it’s infeasible to find the message
  6. 6. CryptoHashApplications ● message digests ● commitments ○ com = commit(msg, key) ○ ver = verify(com, msg, key) ● search puzzle ○ for a set Y find x that H(x || r) belongs to Y
  7. 7. MerkleTree * 7/1/2016 wikipedia
  8. 8. Digital Signatures * 7/1/2016 wikimedia
  9. 9. Blockchain * 7/1/2015 https://21.co/learn/bitcoin-mining/#the-merkle-root digital signatures crypto hash pointers merkle tree
  10. 10. Transactions * Bitcoin: A Peer-to-Peer Electronic Cash System, Satoshi Nakamoto scriptPK scriptSig
  11. 11. Transaction:combine/split * Bitcoin: A Peer-to-Peer Electronic Cash System, Satoshi Nakamoto
  12. 12. Practicalities
  13. 13. Bootstrappingishard security healthy mining ecosystem stable value
  14. 14. ChangingtheProtocol HARD FORKS new client’s blocks rejected by old SOFT FORKS new client’s blocks accepted by old
  15. 15. 51PercentAttack ● what an attacker can hope for? ○ steal? ○ suppress transactions? ○ change block reward? ○ destroy confidence?
  16. 16. transactionscripts
  17. 17. Scripts ● pay to public key hash ● pay to script hash ○ multi signature
  18. 18. paytopublickeyhash * https://en.bitcoin.it/wiki/Transaction script to run = scriptSig scriptPubKey scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG scriptSig: <sig> <pubKey>
  19. 19. paytoscript(m-of-nmultisignature) * https://en.bitcoin.it/wiki/Transaction script1 to validate = scriptSig scriptPubKey script2 to run = <serialised script> scriptPubKey: OP_HASH160 <scriptHash> OP_EQUAL scriptSig: ...signatures... <serialized script> 0 <sig1> <sig2> ... <sigM> OP_m <pubKey1> ... OP_n OP_CHECKMULTISIG
  20. 20. Scripts’Applications ● escrow (alice, bob, 3rd party) ● green addresses (alice, bob, bank) ● efficient micro-payments (alice, bob)
  21. 21. TRANSACTION 10 BTC from Alice to MULTISIG (2 out of 3) Escrow Arbitrator Alice 2x sign Bob sign 2x sign 1 2a 2c 2b
  22. 22. Bob TRANSACTION 10 BTC from Bank to Bob GreenAddresses Alice ‘Bank’ 1 sign 2 3 4
  23. 23. Bob TRANSACTION B <lock time> 1 BTC from TRANS A to Alice Micropayments Alice 2a sign TRANSACTION k 0.0001 BTC from TRANS A to Bob TRANSACTION 2 0.0002 BTC from TRANS A to Bob TRANSACTION 3 0.0003 BTC from TRANS A to Bob TRANSACTION A 1 BTC from Alice to MULTISIG (2 out of 2) 1 sign sign 2b 3 sign sign sign 4 5 6
  24. 24. References - Bitcoin: A Peer-to-Peer Electronic Cash System, Satoshi Nakamoto https://bitcoin.org/bitcoin.pdf - Princeton University: ‘Bitcoin and cryptocurrency technologies’ https://www.coursera.org/course/bitcointech - https://bitcoin.org/en/developer-guide - https://en.bitcoin.it/wiki - https://21.co/learn/#reference-21-bitcoin-org - wiki*edia
  25. 25. ThankYou Grzegorz Gawron Arini Labs marketics at arini.biz

×