29
KIT – The Research University in the Helmholtz Association INSTITUTE AIFB - WEB SCIENCE AND KNOWLEDGE MANAGEMENT www.kit.edu Decentralised Transactions and Accounts with Blockchain Andreas Harth 25.05.2016

Decentralised Transactions and Accounts with Blockchain

  • Upload
    aharth

  • View
    361

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Decentralised Transactions and Accounts with Blockchain

KIT – The Research University in the Helmholtz Association

INSTITUTE AIFB - WEB SCIENCE AND KNOWLEDGE MANAGEMENT

www.kit.edu

Decentralised Transactions and Accounts with BlockchainAndreas Harth25.05.2016

Page 2: Decentralised Transactions and Accounts with Blockchain

Institute AIFB2 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Outline

MotivationCryptographic BackgroundBlockchain TechnologyBlockchain without BitcoinConclusion

Page 3: Decentralised Transactions and Accounts with Blockchain

Institute AIFB3 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Centralised Transactions

Centralisation creates power structures and single points of failures (can enable fraud, manipulation, censorship)

Alice Bob

Bob sells Alice a Raspberry Pi computer

Alice transfers money into Bob‘s account

Bob can spend the money from his account

Central trusted instance processes transactions and maintains account balances

Page 4: Decentralised Transactions and Accounts with Blockchain

Institute AIFB4 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Decentralised Transactions

A centralised ledger tracks asset movements between institutions

A distributed ledger eliminates the centralised authority and puts the ledger into the hands of many institutions

Idea: can technology provide the functionality to process transactions, but in a distributed and decentralised fashion?

Bitcoin [Nakamoto 2008] provides a blockchain with a cryptocurrencyEthereum (ca. 2014) provides a blockchain platform with cryptocurrency and scripting

“Blockchain without bitcoin” (2016) from IBM, Hitachi, Fujitsu, Deutsche Börse, CME, ABN Amro, Wells Fargo…

Page 5: Decentralised Transactions and Accounts with Blockchain

Institute AIFB5 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Outline

MotivationCryptographic BackgroundBlockchain TechnologyBlockchain without BitcoinConclusion

Page 6: Decentralised Transactions and Accounts with Blockchain

Institute AIFB6 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Hash Functions

Takes a string as inputProduces fixed-sized outputEfficiently computable (moderatelyhard to generate, easy to check)

Security propertiesCollision-free: different inputs create different outputs, as few collisions as possibleHiding: input should not be visible in outputPuzzle-friendly

Secure Hash Algorithm (SHA)is widely used

SHA-256 Hash Function

SHA-256(„hello world“) = b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9SHA-256(„hello world.“) = 7ddb227315f423250fc67f3be69c544628dffe41752af91c50ae0a9c49faeb87

Page 7: Decentralised Transactions and Accounts with Blockchain

Institute AIFB7 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Trusted Timestamps

Take a hash of a block of items and a time ti

The hash can be published, e.g., in newspapers or Usenethash(block) includes the previous hash, forming a chainThe hash proves that an item must have existed at time ti

[Nakamoto 2008]

Page 8: Decentralised Transactions and Accounts with Blockchain

Institute AIFB8 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Alice generates a keypair, consisting of private/secret key (sk):and public key (pk):1Ez69SnzzmePmZX3WpEzMKTrcBF2gpNQ55

Digital Signatures1) (sk, pk) := generateKey(keySize)2) sig := sign(sk, message)3) isvalid := verify(pk, message, sig)

Alice generates signature of message with her private key

Bob can verify that the message has been signed by Alice using Alice‘s public key

Page 9: Decentralised Transactions and Accounts with Blockchain

Institute AIFB9 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Outline

MotivationCryptographic BackgroundBlockchain TechnologyBlockchain without BitcoinConclusion

Page 10: Decentralised Transactions and Accounts with Blockchain

Institute AIFB10 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Blockchain Core Idea

Requires addresses/accounts for people (identities)

Requires a transaction log that is tamper-proof

Requires incentives for someone to maintain the transaction log

Idea: can technology provide the functionality to process transactions, but in a distributed and decentralised fashion?

Page 11: Decentralised Transactions and Accounts with Blockchain

Institute AIFB11 02.05.2023

Identity and Wallets

Public keys (or hash of public key) can be used as addressesPublic key == identity; private key is in „wallet“

Any message signed that can be verified with the public key is from an actor that controls the associated private keyAnybody can create a keypair (decentralised identity management, anybody can make new identities)Nobody needs to know who you are (but your transactions, pattern of behaviour might point to you)

Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Public key: 1EBHA1ckUWzNKN7BMfDwGTx6GKEbADUozX

Public key: 1Ez69SnzzmePmZX3WpEzMKTrcBF2gpNQ55

Private key:

Private key:

Page 12: Decentralised Transactions and Accounts with Blockchain

Institute AIFB12 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Decentralised Transactions

Transaction is put into a public transaction log (the blockchain)

Transaction (Tx): Pay-to-Pubkey-Hash, Value 1From: 1Ez69SnzzmePmZX3WpEzMKTrcBF2gpNQ55To: 1EBHA1ckUWzNKN7BMfDwGTx6GKEbADUozXAlice’s signature: 48 30 45 02 21 00 F3 58 1E 19 72 ..

Alice Bob

Bob sells Alice a good or service

Alice transfers a token representing the desired value to Bob‘s address1EBHA1ckUWzNKN7BMfDwGTx6GKEbADUozX, signing the transaction with her private key

Bob can spend the token from his account using his private key

Page 13: Decentralised Transactions and Accounts with Blockchain

Institute AIFB13 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Public Transaction Log (Blockchain)

Transactions are put in a public transaction log that is shared via a peer-to-peer network

Sharing the blockchain is required to avoid double spendingTransfer can go to

a public key (Pay-to-Pubkey-Hash) or toa script (Pay-to-Script-Hash)

[Nakamoto 2008]

Page 14: Decentralised Transactions and Accounts with Blockchain

Institute AIFB14 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Scripting and Smart Contracts

A script specifies how the next person who wants to transfer an item can gain access

Bitcoin‘s language is simple, no loops, not Turing-completeEthereum‘s language is Turing-completeHyperledger‘s language is to be defined

“Smart Contracts” are applications for scriptingMultiparty signaturesEscrow transactionsGambling (e.g., bet on the hash value of blocks)Insurance/derivatives (e.g., crop insurance: pay at specified time if precipitation is below a given target value) …

Page 15: Decentralised Transactions and Accounts with Blockchain

Institute AIFB15 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Outline

MotivationCryptographic BackgroundBlockchain TechnologyBlockchain without BitcoinConclusion

Page 16: Decentralised Transactions and Accounts with Blockchain

Institute AIFB16 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

„Blockchain without Bitcoin“

http://hyperledger.org/

Page 17: Decentralised Transactions and Accounts with Blockchain

Institute AIFB17 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

„Blockchain without Bitcoin“

http://hyperledger.org/

Page 18: Decentralised Transactions and Accounts with Blockchain

Institute AIFB18 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Incentives

Who maintains the blockchain?Who provides computational resources to run the scripts?

Requires incentives for maintaining the blockchainRequires incentives to provide computational power to run scripts

A cryptocurrency can be use to create incentives and pay for computational resources

Public key: 1EBHA1ckUWzNKN7BMfDwGTx6GKEbADUozX

Public key: 1Ez69SnzzmePmZX3WpEzMKTrcBF2gpNQ55

Page 19: Decentralised Transactions and Accounts with Blockchain

Institute AIFB19 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Mining

How to create (fiat) money?

The hash of a new block is generated roughly every ten minutesRequires distributed consensus on who creates a new blockConsensus is based on proof-of-work puzzle:

hash(block) < target value (adjusted every two weeks)If hash(block) >= target value, increment the „nonce“ and try againNode that solves the puzzle gets a reward and can keep transaction fees

Reward for mining a block halves every 210k blocks (~4 years), currently at 25 BTCIssue rate decreases over time; around 2140 all ~21m BTC have been issued

Page 20: Decentralised Transactions and Accounts with Blockchain

Institute AIFB20 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Outline

MotivationCryptographic BackgroundBlockchain TechnologyApplications of Blockchain TechnologyConclusion

Page 21: Decentralised Transactions and Accounts with Blockchain

Institute AIFB21 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Summary and Conclusion

Blockchain technology can be used to maintain a decentralised transaction ledgerScripts add the capabilities for „smart contracts“Many new application areas possible, both in finance and outsideWhether blockchains work in practice without cryptocurrencies remains to be seenBlockchain fits well with the decentralised architecture of the internet

Page 22: Decentralised Transactions and Accounts with Blockchain

Institute AIFB22 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

References

Greg Irving and John Holden. How blockchain-timestamped protocols could improve the trustworthiness of medical science. F1000Research 2016, 5:222, http://f1000research.com/articles/5-222/v1 Satoshi Nakamoto, “Bitcoin: A Peer-to-Peer Electronic Cash System”, May 2008, https://bitcoin.org/bitcoin.pdfArvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller, Steven Goldfeder, “Bitcoin and Cryptocurrency Technologies”, textbook draft 2016-02-09, https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdfYonatan Sompolinsky, Aviv Zohar, “Accelerating Bitcoin’s Transaction Processing - Fast Money Grows on Trees, Not Chains”, Cryptology ePrint Archive, Report 2013/881, 2013.Nick Szabo, “Formalizing and Securing Relationships on Public Networks”, First Monday, Volume 2, Number 9, September 1997, http://firstmonday.org/ojs/index.php/fm/article/view/548

Page 23: Decentralised Transactions and Accounts with Blockchain

Institute AIFB23 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Image Credits

Title page: Google for “Vintage Men Working”, Economist (John Berkeley)Clearing house: Wall Street JournalSHA-256: [Narayanan et al.]Bitcoin logo: http://bitcoin.org/Ethereum logo: http://ethereum.org/

Page 24: Decentralised Transactions and Accounts with Blockchain

Institute AIFB24 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Bitcoin Price in USD, 2010-2016

Page 25: Decentralised Transactions and Accounts with Blockchain

Institute AIFB25 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Bitcoin Node Distribution

Page 26: Decentralised Transactions and Accounts with Blockchain

Institute AIFB26 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Block Propagation Times

The relation between the block size and the time it took to reach 25 % (red), 50 % (green), and 75 % (blue) of monitored nodes. [Sompolinsky and Zohar, 2013]

Page 27: Decentralised Transactions and Accounts with Blockchain

Institute AIFB27 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Page 28: Decentralised Transactions and Accounts with Blockchain

Institute AIFB28 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain

Page 29: Decentralised Transactions and Accounts with Blockchain

Institute AIFB29 02.05.2023 Andreas Harth - Dezentrale Transaktionen und Konten mit Blockchain