introduction to bitcoin a p2p electronic cash system

14
COMS 486 Iowa State University Introduction to Bitcoin A P2P Electronic Cash System

Upload: talon

Post on 23-Feb-2016

44 views

Category:

Documents


0 download

DESCRIPTION

Introduction to Bitcoin A P2P Electronic Cash System. COMS 486 Iowa State University. Contents. What is Bitcoin ? . Who issues it? Who use it? How to make a payment with it?. Transaction Management. Where and How do all the Bitcoin transactions stored ? How to prevent fake transaction?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Introduction to Bitcoin A P2P Electronic Cash System

COMS 486Iowa State University

Introduction to BitcoinA P2P Electronic Cash System

Page 2: Introduction to Bitcoin A P2P Electronic Cash System

Contents

Bitcoin MiningWhy is Bitcoin Mining so important?Will there be Bitcoin Inflation?

TransactionManagement

Where and How do all the Bitcoin transactions stored ?How to prevent fake transaction?

What is Bitcoin ? Who issues it? Who use it?How to make a payment with it?

Page 3: Introduction to Bitcoin A P2P Electronic Cash System

What is Bitcoin?

Bitcoin starts from a simple idea: Creating a “Free Currency” that does not relay on any authority/Banking

System.

No Central Authority who issues Bitcoin

Based on Free P2PNetwork Community

Electrical Currency

BANK

Page 4: Introduction to Bitcoin A P2P Electronic Cash System

An example of P2P based currency

Based on a protocol, one coin is issued to someone in the P2P

network

Design a protocol to generate Bitcoin on

the network. Everyone must agree on the

protocol

1

2

3

The owner of the Bitcoin can use it to buy things from others on the P2P network.It is called a Transaction.

The transaction is broadcasted on the whole network such that everyone knows it.

4

Problem: How to safely conduct a

transaction ?

Page 5: Introduction to Bitcoin A P2P Electronic Cash System

Encryption-based Bitcoin Transaction.

Use the Public-Private Key technology to ensure Verifiable Transaction

Transaction of 1 Bitcoinfrom A to B:

1. A asks for B’s public key.

2. A add B’s public key at the end of previous transactions, and sign it with his private key.

3. Broadcast the transaction to the whole network.Problem: How to prevent A from

Cheating ?

Page 6: Introduction to Bitcoin A P2P Electronic Cash System

Transaction Management

We need a mechanism to store all transactions ever happened on the P2P network in a timely manner

We can use a simple chain of

evidence to store all transactions distributed on

the P2P network

Problem:The Chain is too

easy to fake

Page 7: Introduction to Bitcoin A P2P Electronic Cash System

Transaction Management

The Chain of evidence must require significant amount of efforts to build, such that no one can easily fake it.

Proof of Efforts?

In Computer Science, we usually use solving hard computational problem as a proof of efforts, aka:Proof of Work

I

Example: One-way Hashing Function

Given a hashing function and a string Problem: Find such that For most common hashing function like SHA and MD5, finding x is known to be very hard. The problem can only be solved by trying all possible value of till find the correct one(ones).

This technique can be used to make generating the chain of evidence very hard.

Page 8: Introduction to Bitcoin A P2P Electronic Cash System

Transaction Management

Besides all the necessary information, each block of the Chain of evidence need also have a field of Random Number, called Nonce.

I

Even if we change 1 bit of Nonce, the hash value of the entire block will be totally changed.

How to choose Nonce?

Requirement for a Valid Block:The hash value of each block MUST start with n Continuous Zeroes. It is very hard to find such a nonce number for large n.

Page 9: Introduction to Bitcoin A P2P Electronic Cash System

Transaction Management

Example of Valid Block

How can this mechanism prevent an

adversary from faking a block?

I

A Transaction is broadcasted on the P2P network

When a valid block is

generated, it is broadcasted on the P2P network

too.

1

3

EVERYONE on the network

starts to compute a valid block to add in the transaction

2

The first valid block will be

accepted by the P2P network.

4

To generate a Fake but Valid block, the adversary must be faster than EVERYONE else combined.

This mechanism works as long as the power of good guy is larger than cooperated bad guy.Problem:

How to motive everyone

participate in computing

blocks?

?

Page 10: Introduction to Bitcoin A P2P Electronic Cash System

Bitcoin Mining

Whoever contributes a Valid Block

receives Bitcoin as reward

I

Bitcoin Mining

Bitcoin MiningYou can do it too! Problem: If hardware

becomes faster and faster, will there be

Bitcoin Inflation?

1. Get a Bitcoin Account. (Join the P2P network)

2. Download a mining software (Or write your own)

3. Run the software!4. Pray, or go get a faster machine.

Page 11: Introduction to Bitcoin A P2P Electronic Cash System

Bitcoin Mining

The difficulty of computing a Valid

Block will be raised if the number of

Bitcoin generated grows fast. The faster you mine The harder it is to mine

The overall speed is controlled to 6 blk/hr

Requirement for a Valid Block:The hash value of each block MUST start with n Continuous Zeroes. It is very hard to find such a nonce number for large n.

Problem: Even speed of issuing new Bitcoin is controllable, the number of existing Bitcoin is still growing always. Is the number of Bitcoin Infinite or Finite?

Page 12: Introduction to Bitcoin A P2P Electronic Cash System

Bitcoin Mining

The number of Bitcoin is finite

What to do when we run out of Bitcoin?

Fractional-reserve Banking. i.e., break down existing Bitcoin into

smaller units like 0.1 Bitcoin, 0.01 Bitcoin, etc.

Estimated time of running out Bitcoin: 2140

Page 14: Introduction to Bitcoin A P2P Electronic Cash System

END