blockchain
play

BLOCKCHAIN The foundation behind Bitcoin Sourav Sen Gupta Indian - PowerPoint PPT Presentation

BLOCKCHAIN The foundation behind Bitcoin Sourav Sen Gupta Indian Statistical Institute, Kolkata CRYPTOGRAPHY Backbone of Blockchain Technology Component 1 : Cryptographic Hash Functions HASH FUNCTIONS Map variable-length input to


  1. BLOCKCHAIN The foundation behind Bitcoin Sourav Sen Gupta Indian Statistical Institute, Kolkata

  2. CRYPTOGRAPHY Backbone of Blockchain Technology

  3. Component 1 : Cryptographic Hash Functions

  4. HASH FUNCTIONS Map variable-length input to constant-length output. h x y 101011101011001…0010110100101 101110101001000110111100010101

  5. HASH FUNCTIONS Finding the pre-image of a given output is not easy . h ? y 101011101011001…0010110100101 101110101001000110111100010101

  6. HASH FUNCTIONS Finding a colliding twin of a given input is not easy . x 1 101011101011001…0010110100101 h y 101110101001000110111100010101 x 2 1100101001011001…110010100110

  7. HASH FUNCTIONS Finding any colliding pair of inputs is not easy . x 1 101011101011001…0010110100101 h y 101110101001000110111100010101 x 2 1100101001011001…110010100110 It is of course possible, but not easy.

  8. HASH FUNCTIONS Minor input- mismatch to major output- mismatch . y 1 x 1 101011101011001…0010110100101 101110101001000110111100010101 h y 2 x 2 101010101011001…0010110100101 110010100101100100110010100110

  9. CONSTRUCTIONS m n m 1 m 2 f f f IV h Merkle-Damgard Construction 
 Example : SHA 256 — used in Bitcoin

  10. CONSTRUCTIONS m 1 m 2 m n h 1 r f f f f c Sponge Construction 
 Example : SHA 3 — used in Ethereum

  11. 
 APPLICATIONS h r x y commit(x) : verify(c,r,x) : c = h(r || x) h(r || x) == c Provably secure scheme for Commitment 
 Random nonce r must have a high min-entropy for this scheme to be secure.

  12. 
 APPLICATIONS h x y record(x) : verify(c,x) : c = h(x) h(x) == c Provably secure scheme for tamper-detection 


  13. 
 DATA STRUCTURES addr(data) data h hash(data) Hash Pointer Tamper-evident data pointer = Hash Pointer 


  14. 
 DATA STRUCTURES data data h HP(block) HP(block) timestamp timestamp Block Block Tamper-evident linked data structure = Block 


  15. 
 DATA STRUCTURES data data data data data HP(block) HP(block) HP(block) HP(block) HP(block) timestamp timestamp timestamp timestamp timestamp Block Block Block Block Block Tamper-evident linked-list = Blockchain 


  16. 
 DATA STRUCTURES data data data data data HP(block) HP(block) HP(block) HP(block) HP(block) timestamp timestamp timestamp timestamp timestamp Block Block Block Block Block data data data data data HP(block) HP(block) HP(block) HP(block) HP(block) timestamp timestamp timestamp timestamp timestamp Block Block Block Block Block Tamper-evident linked-list = Blockchain 


  17. 
 DATA STRUCTURES HP(root) data HP(left) HP(right) timestamp Node data data HP(left) HP(right) HP(left) HP(right) timestamp timestamp Node Node data data HP(left) HP(right) HP(left) HP(right) timestamp timestamp Node Node Tamper-evident binary-tree = Merkle Tree 


  18. 
 DATA STRUCTURES HP(root) data HP(left) HP(right) timestamp Node data data HP(left) HP(right) HP(left) HP(right) timestamp timestamp Node Node data data HP(left) HP(right) HP(left) HP(right) timestamp timestamp Node Node Tamper-evident binary-tree = Merkle Tree 


  19. DATA STRUCTURES Blockchain Merkle Tree Merkle Trie Properties O(1) O(1) O(1) Size of Commitment O(1) O(log n) O(k) Append a Block/Node O(n) O(log n) O(k) Update a Block/Node O(n) O(log n) O(k) Proof of Membership List of Objects Set of Objects Set of (key, value) Structural Abstraction Bitcoin Bitcoin Ethereum Used for Construction

  20. QUESTIONS Can any pointer-based data structure 
 be efficiently converted into a 
 Hash-Pointer based data structure? Will such an exercise be at all useful in any use case? 
 Do these structures provide any additional advantage?

  21. Component 2 : Digital Signature Schemes

  22. 
 DIGITAL SIGNATURE ? s = sign( sk , m ) keygen( n ) verify( pk , m , s ) sk pk 2 1 3 Digital signature as a set of three algorithms 


  23. 
 DIGITAL SIGNATURE ? s = sign( sk , m ) keygen( n ) verify( pk , m , s ) sk pk ( sk , pk ) = keygen( n ) verify( pk , m ,sign( sk , m )) = True

  24. 
 DIGITAL SIGNATURE ? s = sign( sk , m ) keygen( n ) verify( pk , m , s ) sk pk Given pk and access to sign( m i ) as an oracle, an adversary should not be able to create a valid fresh message-signature pair ( m , s )

  25. CONSTRUCTION F p Q Elliptic Curve Digital Signature Algorithm (ECDSA) ECDSA on curve E ( F p ) : { ( x , y ) in F p x F p | y 2 = x 3 + 7 } 
 with base prime p = 2 256 - 2 32 - 2 9 - 2 8 - 2 7 - 2 6 - 2 4 - 1

  26. CONSTRUCTION Elliptic Curve group of size | E ( F p )| = q ~ p ~ 2 256 Parameters Format Range Bit-size sk random Z q 256 pk sk x G E ( F p ) 512 m hash( M ) Z q 256 Signature ( r , s ) Z q x Z q 512 ECDSA on curve E ( F p ) : { ( x , y ) in F p x F p | y 2 = x 3 + 7 } 
 with base prime p = 2 256 - 2 32 - 2 9 - 2 8 - 2 7 - 2 6 - 2 4 - 1

  27. 
 APPLICATION pk ? sk sk sk verify( pk , m ,sign( sk , m )) Publish the public key pk as your Identity 
 Use the secret key sk to prove your identity

  28. BITCOIN Blockchain in Practice

  29. 
 BITCOIN Ledger of Transactions 
 between 
 Pseudonymous Identities 
 Semi-Decentralised Publicly-Verifiable 
 Tamper-Resistant Eventually-Consistent

  30. NOT BITCOIN Economic Transaction 
 that we are familiar with Tx

  31. NOT BITCOIN Tx Centralised Account-based Ledger

  32. NOT BITCOIN Tx Decentralised Account-based Ledger

  33. NOT BITCOIN YET Tx Tx Tx Tx Tx Tx Tx Tx Decentralised Transaction-based Ledger

  34. TRANSACTION Tx Tx Signed by Network verifies the Signature

  35. TRANSACTION pk Tx Tx pk Signed by sk Network verifies the Signature

  36. TRANSACTION Input : Array of previous Transactions | Output : Array of recipient Addresses pk pk 1 R 1 Tx Recipient(s) Sender(s) pk pk 2 R 2 Tx Tx sk 1 sk 2 sk 3 pk 3 pk Tx R 3 Network verifies the Signature(s)

  37. TRANSACTION Input : Array of previous Transactions | Output : Array of recipient Addresses pk 1 Tx Tx Input Transactions pk 2 pk pk pk Tx Recipients R 1 R 2 R 3 pk 3 Signatures Tx sk 1 sk 2 sk 3 Network verifies the Signature(s)

  38. Metadata TRANSACTION Input(s) Output(s) Data obtained from blockchain.info

  39. LEDGER Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Decentralised Transaction-based Ledger

  40. BLOCK Data obtained from blockchain.info

  41. BLOCK Data obtained from blockchain.info

  42. BLOCK Data obtained from blockchain.info

  43. BLOCK Data obtained from blockchain.info

  44. BLOCK Data obtained from blockchain.info

  45. BITCOIN Tx Tx Tx Tx Transaction Mining

  46. MINING Tx Tx Tx Tx Transaction Computational Lottery (Puzzle) Find r such that hash( r || m ) < C Existing blocks Winner writes at a given time the next block

  47. MINING Data obtained from blockchain.info

  48. MINING Data obtained from blockchain.info

  49. MINING Data obtained from blockchain.info

  50. MINING Data obtained from blockchain.info

  51. MINING Data obtained from blockchain.info

  52. BITCOIN Tx Tx Tx Tx Transaction Mining

  53. BITCOIN Framework — Decentralised peer-to-peer collaborative network 
 Goal : All peers should agree on a sequence of transactions

  54. BITCOIN Publicly-Verifiable 
 as the complete ledger and the hash function is public

  55. BITCOIN Tamper-Evident / Tamper-Resistant 
 as the ledger is connected through a chain of hash pointers X X X X X X X

  56. BITCOIN Eventually-Consistent 
 as the longest chain eventually sustains as the main chain

  57. BITCOIN Data obtained from blockchain.info

  58. BITCOIN Data obtained from blockchain.info

  59. BITCOIN Data obtained from blockchain.info

  60. BITCOIN Semi-Decentralised 
 as the mining is dominated by computational power

  61. BITCOIN Data obtained from blockchain.info

  62. BITCOIN Data obtained from blockchain.info

  63. Robin Yao (BW), Wang Chun (F2Pool), Marshall Long (FinalHash), Pan Zhibiao (Bitmain) Liu Xiang Fu (Avalon), Sam Cole (KnCMiner) and Alex Petrov (BitFury)

  64. BITCOIN Semi-Decentralised Publicly-Verifiable 
 Tamper-Resistant Eventually-Consistent

  65. ECONOMICS The success story of Bitcoin

  66. BITCOIN Data obtained from blockchain.info

  67. BITCOIN Data obtained from blockchain.info

  68. BITCOIN Data obtained from blockchain.info

  69. BITCOIN Data obtained from blockchain.info

  70. BITCOIN Data obtained from blockchain.info

  71. BITCOIN Data obtained from blockchain.info

  72. SECURITY The threat from Bitcoin

  73. BITCOIN Transactions : Completely transparent and public 
 Identities : Opaque and pseudonymous addresses ~ 170 Million bitcoin addresses 
 ~ 150 Million bitcoin transactions 
 ~ 80 GB of compressed raw data 
 ~ 80% of transactions have < 2 inputs 
 ~ 90% of transactions have < 3 outputs

  74. BITCOIN

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend