Blockchain I

The basics

Alan L Tyree

2018

Introduction

BLOCKCHAIN! When added to a corporate name or included in corporate information the word seems to work magic. According to proponents, blockchains can revolutionise the world. Blockchains will revolutionise payment systems, digital currency, crowdfunding, prediction markets and corporate governance.1 Even more, blockchains may be used to collect taxes, conduct property conveyances and provide risk management.2

Blockchains, it seems, can do everything better and cheaper. Blockchain technology will wipe out traditional methods of doing business, replacing ‘legacy’ methods with new methods that are faster, cheaper and more secure.

Or not. Sceptics are more likely to compare blockchains to Tulip-mania, sales of the Brooklyn bridge and snake oil.

This article and its sequels will explain the operation of blockchains and explore issues faced in implementation. It will come as no surprise that the reasonable applications of blockchains lie somewhere between the two extremes, although this author tends more toward the limited, one might say conservative, end of the spectrum.

The form of blockchain discussed here is the ‘public’ blockchain.3 Later articles will deal with private blockchains and other variants.

What is a blockchain

A public blockchain is a form of distributed database, also called a ‘distributed ledger’. The blockchain exists and functions according to its own rules without the need of a ‘trusted third party’. The ‘public’ part means that anyone may obtain a copy of the blockchain, and anyone may participate in its operation.

A blockchain comprises a series of ‘blocks’ connected in a certain way. A block has a body and a head. The body contains almost any information imaginable. In the Bitcoin system, the body contains payment orders and ownership records for the bitcoin cryptocurrency.

The body of a blockchain used as a property register would contain information similar to that of a Torrens title registration system.4

The block body could also contain computer programs, leading to the possibility of using blockchains as ‘smart’ contracts.5 As a banking example, a smart contract might automatically activate a documentary letter of credit payment upon submission and verification of required documents. Verification of each document would be automatically requested upon document submission: see 6.

While the body of the block contains commercially useful information, the head contains information that makes the system work. The blocks form a sequence, a ‘chain’, containing the entire transaction history.

The detailed content of the block head vary with the individual blockchain, but the common elements are:

Operational rules

All blockchains must have rules:

The rules classification for a particular blockchain may overlap. These ‘rules’ are not guidelines that participants should follow. They are part and parcel of the software system, designed into the system. The participants have no choice in the matter.

Ordering the blocks

The integrity of a blockchain database depends on maintaining the order of the blocks. How can the rules guarantee that blocks are in the proper order and that the chain has not been improperly altered?

Why not number the blocks sequentially? The answer is simple: it would then be trivial to substitute a fraudulent block in place of a valid one. It would even be easy to substitute an entire group of blocks.

Bitcoin and many other public blockchains use the solution proposed by Satoshi Nakamoto.8 Each block should contain an identifier, commonly called a ‘link’ or ‘pointer’, unique to the previous block of the chain. For a ‘public’ blockchain, the link to the previous block should:

The first ensures that any modification of a block changes the link to it. This change causes the contents of the next block, the one containing the link, also to change. Therefore the link to it must change, and so on.

As a result, modification of one block requires modification of all subsequent blocks in the chain. This is, in itself, difficult to achieve, but then the second condition comes into play.

Modification of each link incurs a cost. Not only that, but blocks are continuously added to the chain. Anyone attempting to alter the chain finds that the cost becomes prohibitive.

How much cost? Bitcoin cost is expenditure of computer power, and the Bitcoin answer is that it requires far more computing power than any single party is able to accumulate.9

Satoshi Nakamoto proposed that the link to the previous block be a particular SHA-256 hash of the block. Since hash functions are simple and used in nearly all blockchains, we will make a short detour to explain them.

Cryptographic Hash functions

Hash functions are also called ‘message digests’ since they create a ‘fingerprint’ of any computer message or file. There are many different hash functions, but for the purposes of explanation we will use one called md5.10 The reader may test out examples by using the online facility at https://www.browserling.com/tools/all-hashes.

md5 maps ‘messages’ to a 64 bit binary number, a sequence of 64 0s and 1s. Such a number is hard for a human to read, so it is common to use hexadecimal representation where each symbol represents 4 bits. An example will help. The md5 ‘fingerprint’ of ‘Hello World!’ is:

ed076287532e86365e841e92bfc50d8c

Useful cryptographic hash functions have several characteristics: - ‘pre-image resistance’: the hash value gives no information about the message; - small message changes produce large differences in the hash value; - the hash of any message is easy to compute.

To illustrate the second, change a single character in our previous example: the md5 value of ‘Hello world!’ is:

86fb269d190d2c85f6e0468ceca42a20

Merely changing the ‘W’ to ‘w’ has completely changed the hash value. Examining the different hash values gives us no useful information about the different messages, not even that their difference is small.

Proof of work

Here is a puzzle: given a string C, find a string P so that the md5 hash of C+P begins with 0.

The properties of cryptographic hash functions ensure that there is no known method of finding P other than through brute force computing. Choose a P at random, try it, and if it fails, change P and try again. Hint: if C is ‘Hello World!’ then P can be a string of 27 exclamation points. There may be many different solutions to the problem. P = ‘20’ is also a solution. The reader may verify the solutions at the above web page.

Producing P is called ‘proof of work’. It is not easy to find P, but it is very easy to verify that P solves the puzzle.

In Bitcoin, the challenge C is the entirety of the candidate block. The problem is to adjust the ‘nonce’ so that the resulting hash is smaller than a target number. Bitcoin rules adjust the target number, called the ‘difficulty’, periodically so that, on average, the Bitcoin network adds one block each 10 minutes.

The hash of the block with the nonce so adjusted is the ‘link’ to the block. The link depends on the contents of block and is fiendishly expensive to calculate. It thus satisfies the two criteria above for preventing unauthorised modification of the blockchain.

Distributed blockchain systems

As described so far, a blockchain could controlled by a single entity, much the same as any database, but the appeal of a public blockchain is that it serves as the basis for a ‘distributed ledger’.

A distributed ledger envisages a network of participants. The ledger is ‘distributed’ in the sense that every participant has a copy of the ledger. In the Bitcoin model, there is no central authority, and every ‘node’ of the network has the same rights and privileges as any other node.11

Everyone on the network attempts to find the proof of work. Bitcoin rules provide that the first to do so may submit the block for addition to the chain. Provided the body of the block satisfies the blockchain rules for consistency, no ‘double spending’, the block is added to the chain.

It is again worth emphasising that the blockchain is resistant to arbitrary modification due to the special nature of the links together with the rules governing the addition of new blocks. Bitcoin, in particular, requires massive amounts of computing power to determine the links and thereby add a block.

The distributed blockchain also adds to tamper-resistance since the would-be tamperer must ensure that the altered chain is accepted by all members of the network.

The result is a remarkable achievement: a trustworthy network where no individual participant can be assumed to be trustworthy.

Limitations

The Bitcoin model of the blockchain has some limitations:

Business organisations might not want their transactions to be public. They certainly do not want anyone to be able to participate in the operation of the blockchain. The answer is claimed to be ‘private’ blockchains, a claim examined in the sequel to this article.

A public network needs to be large if it uses the Bitcoin proof of work algorithm since a small network is too easily subverted. Recall that 51% of the computing power could control the blockchain and negate its trustworthiness. The cost of attacking a small network is much less than attacking a large one.12

Since the network is large, it consumes a lot of power. The Bank for International Settlements estimates that the network uses about the same amount of power as a small country such as Switzerland.13

Proof of work is only one possible ‘consensus rule’. Sequels to this article will discuss other proposals, but none has achieved the level of trust enjoyed by proof of work.

Security of public blockchains may not be taken for granted. Recent reports claim that Bitcoin Gold, a ‘fork’ of Bitcoin, has been suject to a 51% attack. Other reports claim the same for Verge, Monacoin, Electroneum and Litecoin.14

These attacks, even if verified, need not necessarily cause concern for Bitcoin which has orders of magnitude greater hashing powers than these small currencies. It should cause concern about the security of small public blockchain networks.15

Bibliography

Bank for International Settlements. 2018. “Annual Economic Report 2018.” Basle: Bank for International Settlements.
Crawford, Bradley. 1997. “Is Electronic Money Really Money?” BFLR 12: 399.
Hertig, Alyssa. 2018. “Blockchain’s Once-Feared 51% Attack Is Now Becoming a Regular.” Coindesk, June. https://www.coindesk.com/blockchains-feared-51-attack-now-becoming-regular/.
Nakamoto, Satoshi. 2008. “Bitcoin: A Peer-to-Peer Electronic Cash System.” http://www.bitcoin.org/bitcoin.pdf.
Oprumenco, Alexandru, and Chami Akmeemana. 2018. “Using Blockchain to Make Land Registry More Reliable in India.” United Nations Development Programme. http://www.undp.org/content/undp/en/home/blog/2018/Using-blockchain-to-make-land-registry-more-reliable-in-India.html.
Orcutt, Mike. 2018. “How Secure Is Blockchain Really.” MIT Technology Review, April. https://www.technologyreview.com/s/610836/how-secure-is-blockchain-really/.
Selisker, Scott. 2019. A Plain Text Workflow for Academic Writing with Atom. http://u.arizona.edu/ selisker/post/workflow/.
Walport, Mark. 2015. “Distributed Ledger Technology: Beyond Block Chain.” London: Government Office for Science.
Weaver, George, C R Craigie, Gregory Burton, Prudence Weaver, GT Breen, and Alan L Tyree. 2003. The Law Relating to Banker and Customer in Australia. Third. Thomson Lawbook Co.
Wikipedia, contributors. 2018. “Blockchain — Wikipedia, the Free Encyclopedia.” https://en.wikipedia.org/w/index.php?title=Blockchain&oldid=855030838.
Wong, Joon Ian. 2018. “Every Cryptocurrency’s Nightmare Scenario Is Happening to Bitcoin Gold.” Quartz, May. https://qz.com/1287701/bitcoin-golds-51-attack-is-every-cryptocurrencys-nightmare-scenario/.
World Bank Group. 2017. “Distributed Ledger Technology (DLT) and Blockchain.” International Bank for Reconstruction; Development.