cs 683 security and privacy spring 2018
play

CS 683 - Security and Privacy Spring 2018 Instructor: Karim - PowerPoint PPT Presentation

CS 683 - Security and Privacy Spring 2018 Instructor: Karim Eldefrawy University of San Francisco http://www.cs.usfca.edu/~kelde frawy/teaching/spring2018/cs6 83/cs683_main.htm (https://goo.gl/t396Fw) 1 Ba Basi sics s of of Bl Bloc


  1. CS 683 - Security and Privacy Spring 2018 Instructor: Karim Eldefrawy University of San Francisco http://www.cs.usfca.edu/~kelde frawy/teaching/spring2018/cs6 83/cs683_main.htm (https://goo.gl/t396Fw) 1

  2. Ba Basi sics s of of Bl Bloc ockchain-bas based d Cr Cryptoc ocurr rrencies s and Systems

  3. A A good d so sour urce for more information Slides of this lecture are largely based on those presented in accompanying videos (for lectures 1 and 2) at: http://bitcoinbook.cs.princeton.edu/

  4. Crypto Back ckground: Hash Funct ctions, Hash Po Pointers, and Hash Po Pointer-ba based d Data Struct ctures

  5. Has Hash h Func Functio tions ns • Functional requirements: • Takes any string or arbitrary length as input • Fixed-size output (we will use 256 bits as an example) • Efficiently computable • Security requirements: • Collision-free • Hiding • Puzzle-friendly

  6. Pr Property 1 of Hash Functions: Collision-fr free • No adversary can find x and y such that x ≠ y and H(x) = H(y) X H(X) = H(y) Y

  7. Ho How w to find ind a a collis llisio ion? n? • Try 2 130 randomly chosen inputs (for a 256 bit hash output) • 99.8% chance two of them will collide This works no matter how H is constructed … but takes long to be a serious attack that matters

  8. Appl Application: n: ha hash sh as s messa ssage di digest

  9. Pr Property 2 of Hash Functions: Hiding

  10. Pr Property 2 of Has Hash h Func Functio tions ns: Hiding Hiding

  11. Appl Application: n: Co Commitment X Commit X Open

  12. Co Commi mmitme ment AP API 1/ 1/3

  13. Co Commi mmitme ment AP API 2/ 2/3

  14. Co Commi mmitme ment AP API 3/ 3/3

  15. Pr Property 3 3 of of H Hash F Function ons : : Pu Puzzle-fr friendly

  16. Appl Application: n: Search h puz puzzle

  17. SH SHA-256 256

  18. Has Hash h Poin inter ers

  19. Ka Kay Idea Utilize hash pointers to build efficient integrity ensuring data-structures

  20. Has Hash h po poin inter er chaining haining

  21. Has Hash h po poin inter er chaining haining

  22. Has Hash h po poin inter er chaining haining

  23. Tr Tree using hash pointers We have seen this before; in what context? Root Hash

  24. Adv Advantages s of f Merkel Trees

  25. Mo More generally … Can use hash pointer in any pointer-based data structure that has no cycles • Hash pointers will ensure integrity of information stored/used in the data structure

  26. Dig Digit ital S al Sig ignatures in in t the C Context o of Cr Cryp yptocurr rrencies

  27. Re Requirements of a digital signature scheme

  28. AP API for di digi gital si signa gnatur ures

  29. Re Requirements for signatures

  30. Se Securi rity game me for r a signature scheme me

  31. Se Securi rity game me for r a signature scheme me

  32. Se Securi rity game me for r a signature scheme me

  33. Se Securi rity game me for r a signature scheme me

  34. Se Securi rity game me for r a signature scheme me

  35. Addi Additiona nal issue ssues

  36. Wha What si signa gnatur ure sc sche heme is s use used d in n Bitcoin ECDSA is the elliptic curve version of the DSA standard which is similar to El-Gamal signature scheme.

  37. Us Useful l tr tric ick: use e public lic key as as an an id iden entity tity

  38. Ho How w to gener enerate e a a ne new w iden identity tity In practice: use H(pk) as identity as it is smaller than pk

  39. De Dece centraliz alized id identit ity m man anag agement

  40. Pr Privacy is complicate ated Addresses not directly connected to real-world identity. (Un)linkability: But observer can link together an address’s activity over time, and make inferences.

  41. Si Simp mple Examp mples of Cr Cryptocurr rrency Designs

  42. At Attempt #1: Goofy Coin

  43. Op Operation of f Goofy y Co Coin 1/3 Rule #1:

  44. Op Operation of f Goofy y Co Coin 2/3 Rule #2:

  45. Op Operation of f Goofy y Co Coin 3/ 3/3 Rule #3:

  46. Bi Big se securi rity y issu ssue with Goofy y Co Coin Double-Spending Double-spending is one of the hardest security challenges to solve when developing a cryptocurrency

  47. At Attempt #2: Scrooge Coin

  48. Op Operation of f Scrooge Co Coin 1/3

  49. Op Operation of f Scrooge Co Coin 2/ 2/3 Transaction Type #1:

  50. Op Operation of f Scrooge Co Coin 3/3 /3 Transaction Type #2:

  51. Im Immut utable able Coins ins

  52. Th The main problem with Scrooge Coin Crucial question: Can we descroogify the currency, and operates without any central, trusted party?

  53. Ho How w Bit itcoin in solv lves es the the dec decen entr traliz alizatio tion n is issue ue

  54. Bi Bitcoin’s s Peer-to to-Pe Peer Network • A peer-to-peer network without any “central” authority for ensuring integrity of transactions and keeping track of ownership of (Bit)coins (and minting them) • Ledger and history of ALL transactions are public and available for anyone to inspect

  55. Ce Centralizations s vs s Decentralizations • Competing paradigms that underlie many digital technologies Sir Tim Berners-Lee (inventor of the Web)

  56. De Dece centraliz alizatio ion is is n not all all-or or-no nothi hing ng • Email: Decentralized protocol, but dominated by centralized webmail services.

  57. Aspe Aspects s of f de decentralization n in n Bi Bitcoin • Who maintains the ledger? • Who has authority over which transactions are valid? • Who creates new bitcoins? • Who determines how the rules of the system change? • How do bitcoins acquire exchange value? • Beyond the protocol: Exchanges, wallet software, service providers …

  58. Aspe Aspects s of f de decentralization n in n Bi Bitcoin

  59. Bi Bitcoin’s s key y challenge: distri ributed conse sensu sus

  60. Wh Why y conse nsensus nsus pr protocols? s? • Traditional motivation: reliability in distributed systems. • Distributed key-value store enables various applications: DNS, public-key directory, stock trades, databases … etc. Good target for Altcoins!

  61. De Defin inin ing d dis istrib ibuted c consensus • Assume N servers/processors/processes. • The protocol terminates and all correct nodes decide on the same value (V). • The value V must have been proposed by some correct node. • Typically assume honest majority, e.g., less than N/3 or N/2 are misbehaving.

  62. Bi Bitcoin is s a peer-to to-peer peer system em Alice’s transaction is broadcast/flooded throughout the Bitcoin network coin’s history Note: Bob’s computer is not in the picture

  63. Ho How w cons nsens ensus us co could wo work in Bitcoin At any given time: • All nodes have a sequence of blocks of transactions they’ve reached consensus on • Each node has a set of outstanding transactions it’s heard about (but consensus has not happened for them yet)

  64. Ho How w cons nsens ensus us co could wo work in Bitcoin Consensus reached on these blocks

  65. How consensus could work in Bitcoin

  66. Ho How w cons nsens ensus us co could wo work in Bitcoin

  67. Ho How w cons nsens ensus us co could wo work in Bitcoin Consensus reached on these blocks The green block is chosen as a result of consensus and is added to the agreed-upon blockchain. This is close to how Bitcoin cloud work, but not exactly. Why?

  68. Wh Why y conse nsensus nsus is s ha hard No notion of global time!

  69. Ma Many imp mpossibility results • Byzantine generals problem: https://en.wikipedia.org/wiki/Byzantine_fault_tolerance#B yzantine_Generals'_Problem • Fischer-Lynch-Paterson (deterministic nodes): consensus impossible with a single faulty note

  70. So Some me well-kn known conse sensu sus s protocols http://www.cs.yale.edu/homes/aspnes/pinewiki/Paxos.html

  71. Un Under erstan andin ing im impossib ibility ility res esults lts

  72. Bi Bitcoin conse sensu sus: s: theory y vs s practice

  73. So Some me things Bi Bitcoin does differently Bitcoin does not solve the (large-scale) consensus problem in the general sense, but only in the context of a digital currency system.

  74. Wh Why y ide dentity? y? Why don’t Bitcoin nodes have identities? • Identity is hard in a P2P system – Sybil attack • Pseudonymity is a goal of Bitcoin

  75. We Weaker assumption: select random nodes

  76. Ke Key idea: implicit consensus

  77. Bi Bitcoin conse sensu sus s algori rithm m (si (simp mplifi fied)

  78. Wha What can n a malicious us no node de do do?

  79. Wha What can n a malicious us no node de do do?

  80. Wha What can n a malicious us no node de do do?

  81. Wha What can n a malicious us no node de do do?

  82. Wha What can n a malicious us no node de do do?

  83. Wha What can n a malicious us no node de do do? Honest nodes will extend the longest valid branch.

  84. Fr From Bob b the the mer erchan hant’s po poin int t of vie view

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