introduction to cryptocurrencies and blockchain technologymorozov/il1-en/il1en-7.pdf ·...

52
Introduction to Cryptocurrencies and Blockchain Technology [email protected] [email protected] Prof. Mario Larangeira Input Output Cryptocurrency Collaborative Research Chair

Upload: others

Post on 12-Jun-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Introduction to Cryptocurrencies and Blockchain Technology

[email protected]@iohk.io

Prof. Mario Larangeira

Input Output Cryptocurrency Collaborative Research Chair

Page 2: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Fintech News

Remittance using cryptocurrencies

Page 3: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Fintech News

Mobile and CryptocurrenciesBank of America 3,000,000,000 USD investment in Cryptocurrencies

Page 4: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Fintech News

Governments are investing in Fintech

“Megabanks" are investing in Fintech

Page 5: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Fintech News

Page 6: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Uniqlo and Bic CameraBusiness > Consumers

April 5, 2017 2:00 am JST

Japanese retailers quickly embracingbitcoin paymentsVirtual currency may be accepted at 260,000 shops by this summer

A sushi restaurant in Tokyo with a bitcoin ATM installed.

TOKYO -- Two Japanese retailing groups soon will accept bitcoin payments,a move that is likely to promote wider use of the virtual currency amongdomestic consumers.

Electronics chain Bic Camera is teaming up with Tokyo-based bitFlyer, whichruns the largest Japanese bitcoin exchange. This Friday, they will begin atrial run of bitFlyer's bitcoin payment system at Bic Camera's flagship shopin Tokyo's Yurakucho district and at Bicqlo Bic Camera, the hybrid outletwith Uniqlo located in Shinjuku.

Customers are allowed to pay up to 100,000 yen ($904) using thecryptocurrency, and they will also get reward points at the same rate as forcash payments. Bic Camera may introduce the payment system at otherlocations based on usage trends at the two Tokyo stores.

Recruit Lifestyle, the retail support arm of human resources conglomerateRecruit Holdings, is partnering with another Tokyo bitcoin exchange

searchSearch companies

search

Log in | Subscribe | About Nikkei Asian Review

Search articles

Nikkei Asia300 Index

1,217.98 +6.00 +0.50%

Hong Kong shares rise after new loans boostmainland lenders[China/Hong Kong]

Muji brand to build on stellar start in India[Japan] [India]

Companies in focus: Asian streaming servicesstand strong against US rivals[Malaysia] [Singapore] ...

Tata, Hyundai nip at Japanese control ofIndonesia's car market[Indonesia]

more news and indexesAbout Asia300

Receive our newsletters

[email protected]

Follow Nikkei Asian Review

Frequent posts of the best content

The latest headlines tweeted Follow @NAR

Like 385K

Latest headlines

Local Chinese governments promoting Belt andRoad Initiative

Toshiba president says Western Digital has 'nobasis' for opposing chip unit sale

MUFG to appoint its first foreign external boardmembers

Airbnb to launch luxury Japan site

Some businesses in Asia disrupted by cyberattack, authorities brace for more

Home| | Spotlight | Politics & Economy | Business | Markets | Tech & Science | Viewpoints | Life & Arts | Features | Regions |

Japanese retailers quickly embracing bitcoin payments- Nikkei A... http://asia.nikkei.com/Business/Consumers/Japanese-retailers-qu...

1 of 4 5/15/17, 5:26 PM

Page 7: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Overview●What is a Cryptocurrency●The most famous one: Bitcoin●The cryptography behind it●The remaining technical challenges●Tokyo Tech/IOHK

Page 8: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Presentation Goal● Promote this new technology

● Raise interest

● Nurture future interest in researching this topic

● More practical: when reading/watching news about blockchain related technologies, have a better understanding of how it works.

Page 9: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

What is a cryptocurrency?

Page 10: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

What is a dollar anyway?

Page 11: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

What is a currency anyway?

Page 12: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

What is a Currency● It is not a “thing”, it is a system:

● Group of people agrees to associate values to a “token”

● group of people: e.g., population of the country

● token: e.g., a bill (a dollar bill)

● It works because people accept it. They trade it for goods

Page 13: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

What is a Cryptocurrency● It is not equal, but it is analogous

● It is not associated with a country, but with the system itself

● System: network of computers

● Token: the coin of the cryptocurrency

● Difference: the rules of the system are public and rely on the people using it (a decentralized system)

Page 14: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Decentralized vs Centralized● centralized: there is a third party, which the users

trust: e.g, RSCoin Protocol

● decentralized: there is no third party, that is a P2P network: e.g., Bitcoin, Ethereum, Monero, ZCash, etc…

● Without third party, the network and its users rule the system: accepted transactions, creation of currency, latency and etc…

Page 15: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Why consider a Cryptocurrency?(Why not to just stick with the “regular” currency?)

●Promote inclusion by giving access to banking systems●low costs for transactions

●Give security and reliability●blockchain: global database, anti-censorship

●Banking systems are too slow●smart contracts: programs over blockchain,

no human action

Page 16: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

How to use a cryptocurrency?

Page 17: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

How to use a Cryptocurrency?● How much does it worth?

Page 18: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

1 BTC = US$1465

coinmarketcap.com

Page 19: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io
Page 20: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

How to use a Cryptocurrency?

● You will need a digital wallet

● Assuming you have already some coins:

● you will transfer some of them to someone else

● From your address to the address of someone else

● How much does it worth?

● 1 Bitcoin costs US$ 1465

Page 21: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Digital Wallet

0.00000001 BTC = 1 Satoshi

462.678 BTC

462.678 BTC

Page 22: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

More Questions● How do exactly I get a cryptocurrency?

● How do I get an address for me?

● How exactly the transfer works? Why somebody cannot take my coins and transfer without my authorization?

Page 23: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

The Cryptography● and its Mathemagic

● Specially two cryptographic tools: Hash Functions and Digital Signatures

skSign

m �Hx H(x)

Page 24: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Hash Function● Hard to find x and x’, such that

H(x) = H(x’)

• Collision Resistance

• First Pre-image Resistance

• Second Pre-Image Resistance

Hx H(x)

Pre-Image Image

● Given y

hard to find x

such that y = H(x)

● Given x and y, and y = H(x)

hard to find x’

such that y = H(x’)

Page 25: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Actual Constructions for H(.) ● There is a rich variety of constructions for H(.)

● Some of them you may have already heard: SHA1, SHA2, more recently SHA3 …

● If you do not believe me:

https://en.wikipedia.org/wiki/List_of_hash_functions

SHA1: systems developers had been advised to abandon it for years, due to fear of collision finding methods. A paper in February/2017 finally made it practical.

Page 26: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Digital Signature

Signsk(m) = �

(pk,sk)

( m, )�

Ver(pk,m, ) = 1 or 0 �pk

Signm �sk Verm 1 or 0

pk

Page 27: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Transaction: General Idea● Transfer coins: Sign message using our own secret key,

to someone else public key (i.e., address)

● Transferring coins = Transaction (i.e., Tx)

● Intuition: The signature authorizes the coins to be transferred

● The other users see the authorization, and therefore understand that some coin has been spent

● How exactly the Hash function is used?

● Bitcoin Protocol and the Blockchain data structure

Page 28: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

BitcoinThe most famous cryptocurrency (so far…)

Page 29: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

History● Satoshi Nakamoto and its paper “A peer-to-peer

electronic cash system” in 2008

● Satoshi, who?

● Funny history: so far nobody knows who is “Satoshi Nakamoto”, there is still a lot of speculation about it

Page 30: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Bitcoin - Overview●Blockchain: global database (a ledger)●P2P Network●Decentralized●Value Transfer: Digital Signature●Proof-of-Work: the link on the

blockchain

Page 31: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Transfer of Value

pk1, sk1 pk2, sk2

Network/Peer-to-peer

Tx: = (value||pk2,Signpk1(value||pk2))

Page 32: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Tx Approved?● Tx is widely spread over the network , it is not valid

(yet!)

● The nodes collect all the transactions they see in the network

● Eventually, one node builds Block of transactions

● Building a single block is not a simple task

● The block is also spread over the network

Page 33: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Confirmation of Transaction

pk1, sk1 pk2, sk2

Tx: = (value||pk2,Signpk1(value||pk2))

Network/Peer-to-peer

One node succeeds Block

Tx-1

Tx-n

Tx-2...

Page 34: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

https://blockexplorer.com

• Blocks have to accepted by

the network

• When accepted, it becomes

part of the blockchain …

Page 35: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Blockchain Data-Structure

H(B1||x2)B1

B2 B3

H(B2||x3) H(B3||x4)

B4

Page 36: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Blockchain Data-Structure

H(B1||x2)B1

B2 B3

H(B2||x3) H(B3||x4)

B4

H H(Bn-1||xn)Bn-1 || xn

• xn: Nonce• H(Bn-1||xn) has to have a number of 0’s:

00000…XXXXX• Trial-and-error: first and second pre-image

resistance property

• H(Bn-1||0000001) = 38402983471029

• H(Bn-1||0000002) = 98237029420420

• H(Bn-1||3425345) = 00000000020420Proof-of-Work

Page 37: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Review: Proof-of-Work

Transactions

Tx’s Hash

???????

Prev. BLK HASH

HA

SH

Transactions

• Collect transactions

Prev. BLK HASH

• Hash previous block

Tx’s Hash

• Hash transactions

NONCE

• Solve Proof-of-Work

• If you find it, you created a block!!!

Creating a new block is also known as Mining a block

The creator of a new block, receives automatically some bitcoins

Page 38: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Real Block

Page 39: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Still the Blockchain● Why such data structure?

● cannot be altered

● PoW prevents inserting/deleting blocks

● Global database

● a record for all transactions

● Public Ledger

Tx1- Alice sends 3 coins to Bob

Tx2- Jack sends 7 coins to John

Tx3 - Chris sends 30 coins to Daniel

Page 40: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Cryptocurrencies● There are several alternative cryptocurrencies

● Examples: Permacoin, Etherium, Namecoin, Dogecoin and etc…

● Differences: blockchain structure, reward structure, mining system, etc…

● Other functionalities: smart-contracts

Page 41: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Ethereum and Smart-Contracts● Ethereal: appeared Mid-2015

● Smart-Contract: program running over a virtual machine over the Blockchain

● It implements more complex smart-contract:

● Bitcoin: Script-like programming language

● Ethereum: Turing-complete programming language

Page 42: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Technical Challenges● Scalability: too slow, need more Tx

● PoW: too expensive● Alternatives:

• Proof-of-stake• Proof-of-retrivability• Etc…

● Anonymity: ZK, commitments, Ring and group signatures, Authenticated data structures, etc…

● Consensus algorithms/Analysis

● Game theory (block generation/reward)/ Analysis

Page 43: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Advanced Bibliography● “Bitcoin: A peer-to-peer electronic cash system”, Nakamoto -

2008

● “The Bitcoin Backbone Protocol: Analysis and Applications”, Garay and Kiayias – Eurocrypt 2015

● “ZeroCash: Decentralized Anonymous Payments from Bitcoin”, Ben-Sasson et. al – IEEE SSP 2014

● “SoK: Research Perspectives and Challenges for Bitcoin and Cryptocurrencies”, Bonneau et. al – IEEE SSP 2015

● “Bitcoin and Beyond: A Technical Survey on decentralized Digital Currencies”, Tschorsch and Scheuermann – IEEE Communications Survey & Tutorials 2016

Page 44: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Input Output Cryptocurrency Collaborative Research Chair

Page 45: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

The Players

● Knowledge based company

● Goal: Design new cryptocurrencies

● Develop the theory behind cryptocurrency

● Make mission-critical software (available on git-hub)

● https://iohk.io (relevant papers, blog, research description)

● Tokyo Tech: I guess you know

● Educate

● Make research

● Tanaka Group: Cryptography research group

Page 46: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

IOHK Research Centers● Tokyo Tech

● University of Edinburgh

● Athens Research Group

Page 47: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

IOHK and Tokyo Tech

Page 48: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Collaboration Overview●Started on January/2017

●6 months before: July/2017

●Weekly research meetings

●Joint research/Publish papers

Page 49: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Already done

Page 50: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Future●Bring world class researchers to visit

Tokyo Tech

●New professor/researcher (prof. Bernardo David)

●Plan courses on Cryptocurrency and Cryptographic Protocols

Page 51: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

Collaboration Final Goal

●Promote and develop the technology

●Nurture world class talent among the students

● Increase the collaboration between Tokyo Tech students/researches and international researchers

Page 52: Introduction to Cryptocurrencies and Blockchain Technologymorozov/il1-en/il1en-7.pdf · Introduction to Cryptocurrencies and Blockchain Technology mario@c.titech.ac.jp mario.larangeira@iohk.io

[email protected]@iohk.io

Thank you!

Visit https://iohk.ioIOHK’s channel on Youtube