How Bitcoin Works: Motivation and Design

By Adarsh Dave

Motivation

The last decade has seen an explosion in the growth of e-commerce across the world. Online retail payments totaled nearly $300 billion in 2013, and remained the fastest growing market at 11.6% compound growth (IBISWorld)). PayPal is the king of the internet commerce world, with 91% of internet consumers using the service (Peng). Most internet transaction-mediating systems, like PayPal, rely on trusted third-party mediators – banking institutions. Users are often waiting for transactions to be verified, particularly with clients outside of each bank’s ecosystem and overseas clients. Users cede a chunk of control to the third-party financial institutions, trading the clunk bank bureaucracy with a sense of assured security of transaction.

Internet users demand security that ensures their transactions that: cannot be forged or altered, before, during, or after the transaction; are private such that recipient/sender information is only available to involved parties; and user-friendly, uninhibited by computer flaws like double-spending or vanishing dollars. In the traditional e-commerce format, users are assured by traditional banking format security that transactions are secure, and cede privacy to include the third-party mediator in the handling of user information.

Bitcoin joins a number of cryptocurrencies in presenting an alternative to banking-mediated online commerce. A cryptocurrency is a money-exchange protocol that uses cryptography to ensure transaction security, privacy, and the creation of units of exchange. The ideal cryptocurrency is secure, anonymous, free from duplication, portable and two-way, and divisible. Indeed, the most pressing concern of a digital currency is to protect transactions from eavesdroppers who could steal or modify information, and also ensuring that each transaction has its source and destination authenticated (IBISWorld).

Design of Bitcoin

Bitcoin is the leading cryptocurrency in e-commerce banking alternatives, and fulfills many facets of an ideal cryptocurrency. Its design is based on three main building blocks: public/private key encryption, digital signature, and hashing.

Public Key Encryption

Key encryption uses a public key and a private key to encrypt and decrypt messages. A user’s public key is known to all inquiring users, and is used to encrypt message text into cipher-text. The public key encryption function is one-way – so called because it is extremely computationally difficult to decode an encrypted message’s original text with brute force (Peng).

A sender encrypts a message using the receiver’s publicly known public-key, which the receiver can then decrypt using their secret, private key. This mode of encryption requires no previous secret communication channel and its most modern form, known as RSA public encryption, is now the cornerstone of all peer-to-peer encryption on the internet.

525px-Public_key_encryption.svg

(Taken from http://upload.wikimedia.org/wikipedia/commons/f/f9/Public_key_encryption.svg)

Digital Signature

Encryption ensures the privacy of a message, but the message must still be authenticated. Using a digital signature, a sender can ensure that they sent a given message, and cannot in the future repudiate sending that message. The digital signature also provides integrity to ensure that the message has not been modified by eavesdroppers.

A digital signature is the public key encryption in reverse; a user encrypts his signature with his private key, which the receiver then decrypts with the sender’s public key and verifies that the message is authentic. Thus, digital signature is easy to verify, and computationally impossible to verify without knowing a sender’s secret private key.

Hashing

The final block of the Bitcoin protocol is hashing. Rather than signing the entire, arbitrary-length message, a given message is shortened by a hash into a fixed-length. Two distinct messages are highly computationally unlikely to have identical hashes and it is similarly difficult to find a string that hashes to the given hashed output. Thus, again, a hashed message is highly computationally difficult to reverse into a distinct, original message.

 

Screen Shot 2014-10-28 at 8.17.01 AM

(Taken from http://upload.wikimedia.org/wikipedia/commons/2/2b/Digital_Signature_diagram.svg)

Bitcoin Transaction and Block System

The Bitcoin network features transactions and blocks. Transactions change money, while blocks record valid transactions.

In a transaction, a coin’s owner hashes the coin’s previous transaction and signs the message with his private key. He then broadcasts the coin to the recipient’s public key, who can verify the coin’s chain of ownership using the previous owner’s public key (Peng).

This string of public key-associated valid transactions is termed a blockchain, and functions as a public ledger of a bitcoin’s transactions. This ledger is distributed to all users of the Bitcoin network. Because of this documentation of each coin, double-spending of a certain bitcoin is prevented.

Where formerly a third-party bank would retain user information on the sender and receiver, Bitcoin network just anonymizes all transactions, meaning that any amount of bitcoins exchanged is known but cannot be associated with any sender or receiver (Nakamoto 6).

Mining

In order to add a valid transaction “block” to a blockchain and thus enable the exchange of bitcoins, the Bitcoin network utilizes crowd-sourcing. In exchange for breaking a “proof-of-work” puzzle, a new user can add an anonymous block to a block chain. The puzzle is a computationally taxing one that has a probability of solution through trial and error of 1 in 220. The correct transaction history of Bitcoin is the longest blockchain, which has originated from the very first hard-coded block in the Bitcoin network. In this long blockchain, each block contains the hash of its predecessor block; this means any modification to a block must modify each descendant block on the blockchain, adding an extra layer of computational security (Peng)

The first user to solve a block’s puzzle earns a Bitcoin; thus, the processing power to maintain and add blocks to blockchains is crowd-sourced to users incentivized by bitcoins to “mine” blocks and lengthen the public ledger of exchanges. As more people “mine”, block puzzles become more computationally difficult to solve. Already, custom, purpose-built mining rigs costing thousands of dollars are necessary to meaningfully mine Bitcoins.

bitcoin-diagram

Conclusion

Bitcoin ensures a message’s encryption, authenticity, and integrity via public key encryption, hashing, and digital signatures. By maintaining a public ledger of all transactions, the network maintains a user-centric assurance of no double-spending, fraud, or misattributed units of value. Indeed, its anonymizing protocols simultaneously ensure that all transactions are known without specifying who is transacting, thus providing a level of privacy that banking institutions cannot.

The network is self-maintaining, incentivizing users to enable transactions via “mining” awards.

Bitcoin enables a truly peer-to-peer exchange that relies on public knowledge, anonymity, and encryption to safely relay funds. Like an ideal currency, bitcoin is secure, anonymous, invulnerable to duplication via hashing, and divisible via its blockchains.

Citations

1. Almunawar, Mohammed Nabil. “Securing Electronic Transactions to Support E-Commerce”, Universiti Brunei Darussalam, Faculty of Business, Economics, and Policy Studies – 2001.

2. IBISWorld Industry Report 45411a. (2013, October). E-Commerce and Online Auctions in the US. Retrieved from IBISWorld database

3. Nakamoto, S. (2008). Bitcoin: A peer-to-peer electronic cash system. Retrieved from http://bitcoin.org/bitcoin.pdf

4. Peng, Starry. “BITCOIN: Cryptography, Economics, and the Future”, University of Pennsylvania School of Engineering and Applied Science, capstone thesis

Leave a comment