In the second installment of the ‘Cryptographic Currency Series‘,Bitcoin and Money we build on the previous ‘Introduction to Cryptographic Currencies‘ post, where we discussed the ‘origin of crypto-currencies1’Satoshi Nakamoto, a software developer initially released the Bitcoin research paper in 2008 and started Bitcoin the system in January 2009 (https://greysouth.com/blog/finance/cryptocurrency-introduction) and what is a ‘currency and money2Currency (from ‘currant’, meaning ‘in circulation’) generally refers to money in any form (paper, coin or digital), in use, as a medium of exchange (https://greysouth.com/blog/finance/cryptocurrency-introduction).

We start by focusing on the Satoshi Nakamoto’s Bitcoin white paper: ‘Bitcoin – A Peer-To-Peer Electronic Cash System3Bitcoin – A Peer-To-Peer Electronic Cash System (https://bitcoin.org/bitcoin.pdf) released in October 2008, announcing the inception of Bitcoin4In response to Hal Finney’s questions, Satoshi said: ‘I had to write all the code before I could convince myself that I could solve every problem, then I wrote the paper‘ (http://www.mail-archive.com/cryptography%40metzdowd.com/msg09980.html), and we look at bitcoin (the money), value and how it functions.

*NOTE: In this series of posts, ‘bitcoin’ (lowercase) refers to ‘the cash’ (unit of account), while ‘Bitcoin’ refers to ‘the (network) System’. Some external articles do not make that distinction, like Wikipedia and WSJ.

Bitcoin White Paper

Reading an academic white paper is like reading a legal document – painful, but with a bit of patience some insight might be revealed (when reading the academic paper). Such is the Bitcoin white paper, short and to the point, building on concepts described in part in 1998 by Wei Dai5Wikipedia – Pre-History of Bitcoin (https://en.wikipedia.org/wiki/Wei_Dai), including ‘hashcash6Wikipedia – Hashcash is a proof-of-work system used to limit email spam and denial-of-service attacks, and more recently has become known for its use in bitcoin (and other cryptocurrencies) as part of the mining algorithm. Hashcash was proposed in May 1997 by Adam Back (https://en.wikipedia.org/wiki/Hashcash) that is used to make generating bitcoins difficult7Bitcoin Wiki – How Bitcoin Works (https://en.bitcoin.it/wiki/How_bitcoin_works).

The paper and subsequent email discussions on ‘The Cryptography Mailing List8Email titled “Bitcoin P2P e-cash paper” announced the ‘e-paper’ on November 1, 2008, archived at the Mail-Archive site  (

cr**********@me******.com











/msg09959.html” target=”_blank” rel=”noopener”>http://www.mail-archive.com/

cr**********@me******.com











/msg09959.html
)
led to the first successful implementation of a distributed cryptographic currency9Bitcoin Wiki – Satoshi Nakamoto was the founder of the Bitcoin system and the creator of the original Bitcoin client (https://en.bitcoin.it/wiki/Satoshi_Nakamoto) on January 3, 2009 with the mining of the genesis block.

‘bitcoin’ the money

The paper title states Bitcoin (the System) is providing a ‘peer-to-peer version of electronic cash‘ (e.g. online money), going on to explain in detail how to…

“…computational secure an online cash transaction with a cryptographic hash function, using digital signatures to proof ownership of the message on the Bitcoin network“.

This encapsulate a number of concepts, so to keep it simple and focussed on ‘bitcoin’ the money, we ignore ‘block chain’ concepts where possible, and continue our discussion on:

  1. Online cash transaction
  2. Bitcoin network
  3. computational secure
  4. cryptographic hash
  5. digital signatures

Let’s break each concept down into smaller bite-sized bits to help our discussion.

1. Online cash transactions

The Bitcoin Wiki states that a Bitcoin transaction10Bitcoin Wiki – Transaction is a transfer of Bitcoin value that is broadcast to the network and collected into blocks (https://en.bitcoin.it/wiki/Transaction) is a transfer of ‘bitcoin’ value that is broadcast to the Bitcoin network11Bitcoin Wiki – Network is a simple broadcast network to propagate transactions and blocks. All communications are done over TCP (https://en.bitcoin.it/wiki/Network) and collected into blocks12Bitcoin Wiki – Blocks contains permanently recorded transaction data in files called blocks (https://en.bitcoin.it/wiki/Block).

This begs the question: ‘Does bitcoins have ‘value’ and if so – why?

According to the Bitcoin website13Bitcoin FAQ – Why do bitcoins have value? (https://bitcoin.org/en/faq#why-do-bitcoins-have-value), ‘bitcoins’ have value because they are useful as a form of money, since it has the characteristics of money (durability, portability, fungibility, scarcity, divisibility, and recognizability) and based on the properties of mathematics rather than relying on physical properties (like gold and silver) or trust in central authorities (like fiat currencies). In short, ‘bitcoin’ is backed by mathematics.

If bitcoins have value, ‘how do I get my hands on them?

A valid transaction must have one or more digitally signed inputs and every input must be an unspent output of a previous transaction (excluding the ‘Genesis Block'14Bitcoin Wiki – Genesis Block is the first block of a block chain and hardcoded into the software (https://en.bitcoin.it/wiki/Genesis_block) and Coinbase15Bitcoin Wiki – A Coinbase is the content of the ‘input’ of a generation transaction and creates new coins from nothing (https://en.bitcoin.it/wiki/Coinbase)). The use of multiple inputs corresponds to the use of multiple coins in a cash transaction. A transaction can also have multiple outputs, thus allowing multiple payments in a single transaction on the Bitcoin network.

2. Bitcoin network

The Bitcoin network is a complex topic using various technologies, but in essence is administrated16Bitcoin Wiki – Administration: Bitcoins are issued according to rules agreed to by the majority of the computing power within the Bitcoin network, and does not require a central bank, State, or incorporated backers (https://en.bitcoin.it/wiki/Bitcoin#Administration) through a decentralized peer-to-peer network of computers17Wikipedia – Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or work loads between peers. Peers are equally privileged, equipotent participants in the application (https://en.wikipedia.org/wiki/Peer-to-peer) that timestamps transactions by hashing18Bitcoin Wiki – A hash algorithm turns an arbitrarily-large amount of data (e.g. an input message) into a fixed-length hash (https://en.bitcoin.it/wiki/Hash) them into an ongoing chain of hash-based proof-of-work blocks, forming a record that cannot be changed without redoing the proof-of-work, using the ‘hashcash‘ implementation to make generating bitcoins difficult19Bitcoin Wiki – How Bitcoin Works (https://en.bitcoin.it/wiki/How_bitcoin_works).

2.a. Blocks

So what are these Bitcoin ‘blocks‘ and what are they made up of20Bitcoin Wiki – Blocks contains permanently recorded transaction data in files called blocks (https://en.bitcoin.it/wiki/Block)?

A Bitcoin block is created approximately six times per hour by accepting a new group of transactions (in the form of payer X sends Y ‘bitcoins’ to payee Z), and added to the blockchain before published to all network nodes.

The result is a distributed system with no single point of failure. Users hold the crypto keys to their own money and transact directly with each other, with the help of the P2P network to check for double-spending21Satoshi’s response on the P2P Foundation email list: ‘Bitcoin open source implementation of P2P currency‘ (http://p2pfoundation.ning.com/forum/topics/bitcoin-open-source?xg_source=activity). ‘Double-spending‘ is left for another time, focussing on the securing of the online cash transaction on the Bitcoin network.

3. computational secure

Computationally (using a computer for mathematical calculations) securing (protect against attack) an online transaction, is the process of securing transaction data against ‘modifications’ (hash) and to provide proof of ‘ownership’ by signing the data cryptographically (the art of writing and solving secret codes).

The white paper abstract22Bitcoin – A Peer-To-Peer Electronic Cash System (https://bitcoin.org/bitcoin.pdf) states that “A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution…“, is referring to computational secure Bitcoin cash transaction, a way to protect digital coins via a complex mathematical process called ‘ciphering’, which scrambles the original digital content in plain text so only the person with the right password (called a key) can unlock (or decipher) it.

Let’s look in more detail how Bitcoin computationally secure a transaction using a cryptographic hash and digital signature together.

4. cryptographic hash

Bitcoin uses the SHA-256 hash algorithm23Wikipedia – Secure Hash Algorithm 2 (SHA-2) is used to compute the hash of ‘transaction data’ and comparing the result to a previously published hash result can show whether the ‘transaction data’ has been modified or tampered with (http://en.wikipedia.org/wiki/SHA-256) to generate verifiably ‘random‘ numbers (hash) in a way that requires a predictable amount of computational CPU effort to encrypt every transaction so that each coin is associated with its current owner’s public key (see digital signatures).

A hash value (often called the message digest, or simply digest)24Wikipedia – A cryptographic hash function input data is often called the message, and the hash value is often called the message digest (https://en.wikipedia.org/wiki/Cryptographic_hash_function) which is considered practically impossible to invert, meaning to recreate the input message from the hash value alone is near impossible25Wikipedia – A cryptographic hash function allows easy verification that some input message maps to a given hash value, but if the input message is unknown, it is deliberately difficult to reconstruct it (https://en.wikipedia.org/wiki/Hash_function).

Bitcoin Transaction

A Bitcoin transaction showing ‘customer’ (Alice) and ‘vendor’ (Bob)

Sending bitcoins (to spent coins you own) to a new owner (Bob), the current owner (Alice) creates a new message, attaching a certain ‘unspent’ amount of coins with the new owner’s (Bob) public key to the message, before hashing the message to create a ‘transaction ID‘. To ensure the ownership of coins that are ‘spent’, the whole transaction message is digitally signed with the current owner’s (Alice) private key, called a signature. Then, the signature along with current owner’s (Alice) public key are enclosed in the transaction. This allows anyone to validate the transferred bitcoins are really owned by the sender (Alice)26Bitcoin Wiki – How Bitcoin Works (https://en.bitcoin.it/wiki/How_bitcoin_works).

This transaction is broadcast to the Bitcoin network, and by deciphering the signature with the current owner’s (Alice) public key included in the transaction, the message verifies to everyone that the transaction is authentic (e.g. proof of ownership). It also lets everyone know that the new owner of the coins (Bob) is the owner of the public key (in the ‘transaction ID‘), as only Bob can ‘spent’ the coins by using his private key 27Bitcoin Wiki – How Bitcoin Works (https://en.bitcoin.it/wiki/How_bitcoin_works).

5. digital signatures

Public-key cryptography (requiring a public and private key) refers to a set of cryptographic algorithms that are based on mathematical problems, and is computationally easy for a user to generate a public and private key-pair and to use for encryption and decryption28Wikipedia – Public-Key Cryptography: Message authentication involves hashing the message to produce a “digest,” and encrypting the digest with the private key to produce a digital signature. Thereafter anyone can verify this signature by (1) computing the hash of the message, (2) decrypting the signature with the signer’s public key, and (3) comparing the computed digest with the decrypted digest (http://en.wikipedia.org/wiki/Public-key_cryptography).

The paper29Bitcoin – A Peer-To-Peer Electronic Cash System (https://bitcoin.org/bitcoin.pdf) describes “…an electronic coin as a chain of digital signatures. Each owner transfers the coin to the next by digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of the coin. A payee (Bob) can verify the signatures to verify the chain of ownership“.

Digital (expressed in binary using 0 and 1’s) signatures (distinctive algorithmic pattern – ECDSA – whereby someone or something can be identified)30Bitcoin Wiki – Elliptic Curve Digital Signature Algorithm (ECDSA) is a cryptographic algorithm used by Bitcoin to ensure that coins can only be spent by their rightful owners (https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm) is used by the current owner (Alice) to secure the online cash transaction, using the current owner’s (Alice) private key to cryptographically sign the transaction as proof of ownership.

Message authentication (ownership) involves hashing the message to produce a “digest,” and encrypting the digest with the private key to produce a digital signature. Thereafter anyone can verify this signature by (1) computing the hash of the message, (2) decrypting the signature with the signer’s (Alice) public key, and (3) comparing the computed digest with the decrypted digest.

In the end it means that the transaction can only be decrypted / deciphered (make into readable form) using the current owner’s (Alice) public key, ensuring the coins could only have been spent by the current owner (Alice), thus ensuring Bitcoin as “A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another … as a chain of digital signatures. Each owner transfers the coin to the next by digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of the coin. A payee (Bob) can verify the signatures to verify the chain of ownership“.

Let’s call it a day – there are so many concepts in the Satoshi white paper that it makes my head spin. Next time we will look at bitcoin denomination.

References

References
1’Satoshi Nakamoto, a software developer initially released the Bitcoin research paper in 2008 and started Bitcoin the system in January 2009 (https://greysouth.com/blog/finance/cryptocurrency-introduction)
2Currency (from ‘currant’, meaning ‘in circulation’) generally refers to money in any form (paper, coin or digital), in use, as a medium of exchange (https://greysouth.com/blog/finance/cryptocurrency-introduction)
3, 22, 29Bitcoin – A Peer-To-Peer Electronic Cash System (https://bitcoin.org/bitcoin.pdf)
4In response to Hal Finney’s questions, Satoshi said: ‘I had to write all the code before I could convince myself that I could solve every problem, then I wrote the paper‘ (http://www.mail-archive.com/cryptography%40metzdowd.com/msg09980.html)
5Wikipedia – Pre-History of Bitcoin (https://en.wikipedia.org/wiki/Wei_Dai)
6Wikipedia – Hashcash is a proof-of-work system used to limit email spam and denial-of-service attacks, and more recently has become known for its use in bitcoin (and other cryptocurrencies) as part of the mining algorithm. Hashcash was proposed in May 1997 by Adam Back (https://en.wikipedia.org/wiki/Hashcash)
7, 19, 26, 27Bitcoin Wiki – How Bitcoin Works (https://en.bitcoin.it/wiki/How_bitcoin_works)
8Email titled “Bitcoin P2P e-cash paper” announced the ‘e-paper’ on November 1, 2008, archived at the Mail-Archive site  (

cr**********@me******.com











/msg09959.html” target=”_blank” rel=”noopener”>http://www.mail-archive.com/

cr**********@me******.com











/msg09959.html
)
9Bitcoin Wiki – Satoshi Nakamoto was the founder of the Bitcoin system and the creator of the original Bitcoin client (https://en.bitcoin.it/wiki/Satoshi_Nakamoto)
10Bitcoin Wiki – Transaction is a transfer of Bitcoin value that is broadcast to the network and collected into blocks (https://en.bitcoin.it/wiki/Transaction)
11Bitcoin Wiki – Network is a simple broadcast network to propagate transactions and blocks. All communications are done over TCP (https://en.bitcoin.it/wiki/Network)
12, 20Bitcoin Wiki – Blocks contains permanently recorded transaction data in files called blocks (https://en.bitcoin.it/wiki/Block)
13Bitcoin FAQ – Why do bitcoins have value? (https://bitcoin.org/en/faq#why-do-bitcoins-have-value)
14Bitcoin Wiki – Genesis Block is the first block of a block chain and hardcoded into the software (https://en.bitcoin.it/wiki/Genesis_block)
15Bitcoin Wiki – A Coinbase is the content of the ‘input’ of a generation transaction and creates new coins from nothing (https://en.bitcoin.it/wiki/Coinbase)
16Bitcoin Wiki – Administration: Bitcoins are issued according to rules agreed to by the majority of the computing power within the Bitcoin network, and does not require a central bank, State, or incorporated backers (https://en.bitcoin.it/wiki/Bitcoin#Administration)
17Wikipedia – Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or work loads between peers. Peers are equally privileged, equipotent participants in the application (https://en.wikipedia.org/wiki/Peer-to-peer)
18Bitcoin Wiki – A hash algorithm turns an arbitrarily-large amount of data (e.g. an input message) into a fixed-length hash (https://en.bitcoin.it/wiki/Hash)
21Satoshi’s response on the P2P Foundation email list: ‘Bitcoin open source implementation of P2P currency‘ (http://p2pfoundation.ning.com/forum/topics/bitcoin-open-source?xg_source=activity)
23Wikipedia – Secure Hash Algorithm 2 (SHA-2) is used to compute the hash of ‘transaction data’ and comparing the result to a previously published hash result can show whether the ‘transaction data’ has been modified or tampered with (http://en.wikipedia.org/wiki/SHA-256)
24Wikipedia – A cryptographic hash function input data is often called the message, and the hash value is often called the message digest (https://en.wikipedia.org/wiki/Cryptographic_hash_function)
25Wikipedia – A cryptographic hash function allows easy verification that some input message maps to a given hash value, but if the input message is unknown, it is deliberately difficult to reconstruct it (https://en.wikipedia.org/wiki/Hash_function)
28Wikipedia – Public-Key Cryptography: Message authentication involves hashing the message to produce a “digest,” and encrypting the digest with the private key to produce a digital signature. Thereafter anyone can verify this signature by (1) computing the hash of the message, (2) decrypting the signature with the signer’s public key, and (3) comparing the computed digest with the decrypted digest (http://en.wikipedia.org/wiki/Public-key_cryptography)
30Bitcoin Wiki – Elliptic Curve Digital Signature Algorithm (ECDSA) is a cryptographic algorithm used by Bitcoin to ensure that coins can only be spent by their rightful owners (https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm)