An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug...

33
An Overview of Blockchain Technologies and Uses (Day 2) Andy Dolan • Computer Science Department • Colorado State University

Transcript of An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug...

Page 1: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

An Overview of Blockchain Technologies and Uses (Day 2)

Andy Dolan • Computer Science Department • Colorado State University

Page 2: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Last Time we Covered

● An Introduction to Bitcoin● The Core Features: What is a Blockchain?● Distributed Consensus

Image: Jay’s Brick Blog

Page 3: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Outline

● Identity in blockchain and anonymization● Smart contracts● Attacks against blockchain● Interesting (non-cryptocurrency) blockchain use cases

Image: Jay’s Brick Blog

Page 4: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Identity in Blockchain

How do we manage who’s who?

Page 5: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Identity in Public Blockchain

● Public key, associated private key○ If you have the private key, you have the

associated transactions

● Beyond that, what identity exists?○ Do you register for a Bitcoin account?○ Where might your information be revealed?

Page 6: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Is Blockchain Anonymous?

● Cryptocurrencies can be traced back through

the ledger● At some point, there is an exchange to a

product/service/currency○ These might require some identity information

● Is this a privacy risk?○ Or is this an advantage?

● Either way, users will want to make their

tokens anonymous

Page 7: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Token Tumbling

● Also called mixing, blending, cleaning● Third-party services that will “clean” your

“tainted” tokens for you● Put your tokens in a tumbler/mixer

○ This is still just a transaction○ Is there a risk in doing this?

● Get some other tokens out that aren’t linked

to you● Only misdirection, not true “cleaning”

Page 8: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Other Anonymization Efforts

● Use of zero-knowledge proofs to verify

transactions● Built into the protocol of the particular chain● Can end up being somewhat similar to mixing

○ Exchanging “real” coins for others

● Other implementations involve burning old

coins and then minting new ones○ Zcoin

Page 9: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Burning Tokens

● Some systems use the concept of

“destroying” tokens● Often dubbed “sending to an

impossible/unspendable address”● Control of currency supply● Proof of burn● Is there a risk here?

○ Is the address really unspendable?

Page 10: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Permissioned Blockchain

● Stronger concept of identity○ Use of PKI

● Only certain participants can join● Stronger trust model?● Advantages, disadvantages● Use cases

○ Supply chain in a particular market○ Record keeping between key stakeholders○ Public read-only, permissioned writes

Page 11: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Questions/Comments?

Page 12: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Introduction to Smart Contracts

Automated trust, or millions of costly bugs?

Page 13: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Smart Contracts

● Distributed pieces of code associated with

blockchain transactions● Executions that define how a transaction is

carried out● “Smart” because the contract is automatically

enforced by the system● Usually simple, sometimes complex● Now present in most blockchain

implementations

Page 14: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

A Simple Implementation: Bitcoin

● Every Bitcoin transaction has a script○ Written in Script

● Super, super simple● List of instructions for how the next person

wanting to spend coins can gain access to

them○ If the script returns TRUE, you have access to the

funds

● Can be just about anything

Page 15: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Typical Bitcoin Script

● Requires two things:● Public key that hashes to destination address

of transaction○ The recipient of coins

● Signature to prove ownership of the private

key corresponding to the public key○ The recipient provides this○ Only the owner of the right private key can get the

coins

Page 16: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

More Unique Bitcoin Scripts

● Freezing funds until a future date● Creating a mini proof-of-work puzzle that

anyone can solve● Incentivized finding of SHA1 hash collisions

○ Created in 2013, donation based○ Solved, reward claimed in February 2017 shortly

after SHA1 was broken○ A little over 2 bitcoin claimed

Page 17: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Ethereum and Smart Contracts

● Arguably the biggest smart contract platform● Turing-complete smart contract language:

Solidity● Opens up lots of different possibilities for

○ Applications○ Tokens (and how they operate)

● More complexity can be problematic

Page 18: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Where Smart Contracts go Wrong

● What problems can slip through with a more

complex smart contract?● The DAO attack

○ A bug in the code with huge consequences: hard

fork○ Creation of Ethereum Classic

● Updating a deployed contract can be…

complicated

Page 19: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Questions/Comments?

Page 20: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Security Aspects of Blockchain

Attacks against blockchain technologies

Page 21: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Additional Reading

Page 22: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Attacking Consensus

● Majority attacks○ Proof of Work○ Proof of Stake

● Compromised centralized “leader” in PBFT● Consensus delays● Selfish mining

○ Similar to majority attack○ Try to trick the network by maintaining a parallel

chain

Page 23: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Attacking the Network

● Traditional network attacks to mislead or

disable nodes● DDoS, DNS attacks, routing attacks● Spam transactions, slow/limited propagation● Limit availability

Page 24: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Questions/Comments?

Page 25: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Other Use Cases

Less cryptocurrency-centric applications of blockchain

Page 26: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Supply Chain

● A ledger of how supply changes ownership

throughout its lifecycle● BeefChain● Lettuce from Walmart● What issues are solved by blockchain?● How does this model differ from

cryptocurrencies?

Page 27: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Blockchain for IoT

● Improving security of IoT devices with a

blockchain platform● IoT device identity● IoT device and service permissions● Storage on an immutable ledger

Page 28: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

IoT for Blockchain

● IoTa: Ledger technologies built for IoT● Attempting to make blockchain more efficient

to be able to run on IoT devices at scale● Consensus algorithms optimized for

hardware● Network architecture to accommodate for IoT

capabilities

Page 29: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Storage??

● Again, this is really just a database● However, it’s append only● What about use cases that require a lot of

record changes?● Does it scale?

○ Bitcoin: about 200 GB total○ Ethereum: about 200 GB total

Page 30: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Voting, Elections

Page 31: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Other Questions?

Page 32: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Conclusion

● Blockchain is cool● But needs to be used carefully● Design is critical● It really isn’t the answer for most problems

Page 33: An Overview of Blockchain Technologies and Uses (Day 2) Presentation Day 2.pdfThe DAO attack A bug in the code with huge consequences: hard fork Creation of Ethereum Classic Updating

Thank you