Understanding Blockchain technology

Jørn Lydolff Madsen
Decentralize.Today
Published in
13 min readDec 30, 2015
Picture from BBC on Blockchain presentation

Blockchain technology is used by many digital currencies. More than 100 exists, but Bitcoin has been the most successful of them. All these currencies are called cryptocurrencies. See a list of them at coincap.io.

The common technology behind has great interest among bank industry and bank authorities:

..leading Central banks in Europe are actively planning to capitalize on this technology and create an environment to promote innovation and attract the cryptocurrency ecosystem. See money2020europe.com

Blockchain is the technology behind the cryptocurrencies. But it can be used for other things as well.

The transactions may be viewed as some sort of transformation, just en change/update of something or a contract. Blockchain can be used for helping companies manage the supply chain of goods without the need of a central core system, see talkinglogistics.com, or can be used for securing communication between internet-of-things.

Goldman Sachs is looking for settlement solutions concerning trades of securities.

“Goldman Sachs filed a patent in October 2014 for SETLCoin, a cryptocurrency built on the blockchain to help Goldman traders execute and clear trades in real time.” (See weforum.org).

And other big companies:

JPMorgan, the London Stock Exchange Group, Wells Fargo, and State Street recently announced they joined a consortium with IBM, Intel, and Cisco and blockchain startup Hyperledger (now owned by Digital Assets Holdings) to develop blockchain technology.” (See weforum.org).

Don Tapscott goes further than that.

He said, Blockchain can be the foundation for a whole new architecture of the firm, a new way of organize companies. Having the global internet, and on the basis of that using blockchain to build smart contracts and transactions, smart network based business models, a truly peer-to-peer collaborative world. See his video presentation of Blockchain Revolution.

No doubt, there are high expectations to the use of Blockchain.

The components of Blockchain

Blockchain is build of:

  • User apps — as wallet in Bitcoins — on websites/smartphones acting as a client to:
  • The blockchain network having transactions gathered together in blocks — as a immutable, shared ledger of records.

The blockchain network is driven by computer installations in the network, called network full-node, having a full copy of all transactions.

Only the newest block can be updated by attaching a new one and after that it is immutable. Since the first block in the network, the “genesis”, new ones are added one by one in a long chain of blocks. In the Bitcoin network all notes are adding a new block each 10 minutes.

All transactions are public, but the sender and receiver are both anonymous, machine generated key numbers, held by the user apps.

The blockchain was developed within open source communities. The Bitcoin is a product of this development and was invented by Satoshi Nakamoto, who published the specification in 2008 and released it as open source in 2009.

It is made of known technologies but composed in a very different way, compared to traditional IT-systems. Three major areas will be covered here:

  1. The unique key
  2. Cryptography
  3. Smart contracts

They are described below.

1. The unique key

In the blockchain every client — in Bitcoin: wallet — is able to generate a unique key without using a central database to ensure uniqueness. The solution is about generating a extreme large, random number. The extreme large, random number is considered as unique, globally.

In Bitcoin it is specified as a number of 256 bits, which is a number greater than a decimal number having 77 digits. The probability that two clients are generating the same number is considered as non-existing in practice.

You can toss a coin 256 times and you have the binary digits of a random number of 256 bits. It is more difficult for a computer to generate a truely ramdom number. The solution is specified as a “cryptographically secure pseudo-random number generator” (CSPRNG). It must include a starting point, a seed from some unpredictable. Following is a 256 bit random number, shown in 64 hexadecimal digits:

1E99423A4ED27608A15A2616A2B0E9E52CED330AC530EDCC32C8FFC6A526AEDD

In traditional IT-systems you will create unique numbers from a central database, eg. next order number, next transaction number etc. But in the 1970–80s the pc was often off-line and the idea with extreme large number was to let the pc be able to create transaction numbers, order numbers etc. off-line.

In the blockchain client the solution is still to generate a extreme large, random number, but not because the client is often off-line. The extreme large, random number can let the client be in control of creating transactions, using the unique key to derive unique transaction identifications.

The extreme large, random number have one more advantage. It is used as the private key in the cryptografically solution. The blockchain combine (1) unique key, used to derived unique transactions identifications etc., with (2) the private key, used in the cryptography. In traditional IT-systems it is good design to separate domain specific keys, eg. transaction identifications, from security solutions, eg. cryptografically solution. But in the blockchain the domain specific keys such as the transaction identification, created by the sender, and the counterpart address, created of the receivers, are all derived from private cryptografically keys.

2. Cryptography

The creator of a transaction in the blockchain is identified through digital signature, derived from the pair of private/public keys. The keys are not stored in the network, they are created and stored by the client application. Every transaction in the blockchain requires a valid signature based on digital key.

Public key cryptography was invented in the 1970s and is a mathematical foundation for computer and information security. Since the invention of public key cryptography, several suitable mathematical functions, such as prime number exponentiation and elliptic curve multiplication, have been discovered. These mathematical functions are practically irreversible, meaning that they are easy to calculate in one direction and infeasible to calculate in the opposite direction. Bitcoin uses elliptic curve multiplication as the basis for its public key cryptography. See Mastering Bitcoin by Andreas M. Antonopoulos.

Public key cryptography comes in pair of a private key (secret) and a public key, generated from the private key.

Figure from Mastering Bitcoin by Andreas M. Antonopoulos

In Bitcoin, the address is used as the receiver of a Bitcoin payment. Just like you are using an email-adress for receiving emails, you use the Bitcoin address for receiving Bitcoins. But the different is that in a Bitcoin wallet, normally generates a new address for each, new transaction. The address is used public, printed as a QR-code, which is easy to read by a smartphone, or shown as a text string on a computer, just copy/pasted from a website or a mail.

Bitcoins in the wallet are represented by unspent transactions output. The wallet do not contain an account having an amount of Bitcoins saved. The wallet stores the private keys and references to the unspent transactions, owned by those private keys. The transactions are collected from the network, and summarized as unspent Bitcoins for the user.

When making a payment of some Bitcoins to be transferred to a Bitcoin address, the wallet creates one, new transaction to cover the payment. The new transaction uses one or more unspent transactions output as input, bind one part of the new transaction’s output to the address, receiving the payment, bind a small part as a little fees to the Bitcoin network installations, and bind the rest of it to its own address, if any changes. Transaction output is bound to an address and is unspent as long as the owner (the private key) of the address has not used the output as input to a new transaction.

The cryptography uses the private key (extreme large, random number) to derive a public key, which is used to derive the address, and which is used to create the transaction identification, using some hashing techniques. All the client needs to save is the private keys, from which the rest is derived. In Bitcoin the wallet can be build from the private keys, saved in a file. Nothing else.

The blockchain network is able to decrypt and read the transactions using the public key and to validate the ownership of the transaction from the signatures. The hashing of the new transaction includes the stored hashing of the transactions, used as input. The hashing is generated on the basis of the private key, and can only be produced using the private key. Therefore the transaction is done immutable by the client at creation time.

Transactions are gathered together in blocks, created by the network. The transactions, contained in the block, are hashed together with the hashing from the previous block into one, new block identification. This identification will always be unique, and always a product the contents of the new block and the hashing of the previous block, which is also a product of its contents and the hashing of this block’s previous block hashing. All the blocks identifications are linked together in this way, and no changes can be made to contents in a block without breaking the identifications of the block it self and all following blocks.

Once a block is built, it is easy to verify the content using the output of the hashing compared with the contents, decrypt by the public key from each transaction.

Many participants verify each transaction, providing highly redundant verification and are rewarded for the computational work required. By confirming transactions using decentralized consensus, the blockchain eliminates the need for trust. See ibm.com.

The redundant verification of all transactions in each full-note is a challenge when talking about scaleability of the blockchain technology.

The blockchain is one, big cryptografically solution. Any use of the blockchain is subject to this cryptografical setup, controlled by the clients private keys. Nothing can be done without the private keys. Do you loose a private key, the transactions owned by the private key, are lost for ever.

In Bitcoin your are recommended to ensure backup of your wallet (see wallet-security). A new wallet on another computer can import a private key, or read the QR-code, if you have printed the private key on paper — and you are up running again, able to spent the unspent Bitcoin transactions, which the private key has ownership to, according to the Bitcoin network.

Paper Wallet — a print of the public/private pair of keys to be stored in a safe place

3. Smart contracts

A generalization of the blockchain transaction is a contract — public, 100% anonymized.

That can be used for many purposes, not just a currency. Some examples are: trading financial assets, secure sharing of information between companies or between internet of things within eg. healthcare, flow control in supply chain of good etc — in full privacy.

In this post-Snowden era the true cryptography open source used in the blockchain may give the internet new opportunities, and eg. gives internet of things a new beginning, using simple ways of sharing information in full privacy, see ibm.com.

The blockchain open source communities have developed different variations of contracts. It is a generalized type of contract, to be used in many ways.

Here are two of the most promising examples. Both examples are a further development of the Bitcoin blockchain:

Example 1: The Bitcoin community decided to extend the Bitcoin’s use of blockchain. They added metadata inside the currency. First it was implemented by assigning some extra data to unused, existing fields in the Bitcoin transaction. Then a new dedicated OP_RETURN property was added to the Bitcoin transaction implementation, added to the network within a normal software update. It opens for new possibilities of including eg. agreements or other specific data to a Bitcoin transaction. It is still a currency, but some Bitcoin transactions have more/other type of values: a contract attached to the Bitcoin. The wallets of both the sender and the receiver must manage the new feature to enable the use of the metadata, inside the currency.

The metadata inside the currency can include new type of address. Specific addresses can be reserved for specific group of users having a specific type of client applications. Then the metadata, the client application and the group of users can be viewed as a new concept — or a new layer on top of the cryptocurrency, where the cryptocurrency more acts as a transport-layer for the contracts. We are still talking about the same Bitcoin, but used in new abstractions. Mastercoin is an example of this new development.

Think of Mastercoin as an application-layer protocol on top of Bitcoin’s financial transaction transport layer, just like HTTP runs on top of TCP. See Mastering Bitcoin by Andreas M. Antonopoulos.

You must still pay a small fee to the Bitcoin network for each contract, and at least a smallest amount of Bitcoin, one of a million of a Bitcoin, to the receiver to be able to deliver the contract. And then your new application-layer is powered by the existing, global Bitcoin network.

Example 2: Ethereum is an example of a very fast growing blockchain implementation having a whole programing platform on top of its cryptocurrency. It was created as a clone of the Bitcoin core, having its own blockchain network, and it is still a public, distributed ledger of transactions. Each transaction may contain program code, executed by Ethereum’s own build-in virtual machine, the EVM.

A user may receive any output from a transaction, just like a payment having unspent output of a transaction. A transaction having code may also be able to receive output from a transaction as input to its functions in the code, it may store data and may call other transactions. Each transaction with code has an address just like a user has, an address that receive output from a transaction. Fees, paid to the network, and normal payments to other users are done in Ethereum’s own currency Ether. See the Ethereum founder Vitalik Buterin presentation in the DEVCON1-video.

See ethereum.org

Nick Szabo says: The contracts are true permanent, always existing on some computers in the highly redundant environment, no power off, no delete, true ledger. The smart contracts substitute an army of lawyers and accountants. See video from the same DEVCON1.

As in any other blockchain every node in the network are processing each transaction. This is challenge when talking about scaleability of the blockchain technology. The capacity of the total global network is exactly what every node-computer is able to process.

One common concern about Ethereum is the issue of scalability. Like Bitcoin, Ethereum suffers from the flaw that every transaction needs to be processed by every node in the network. With Bitcoin, the size of the current blockchain rests at about 15 GB, growing by about 1 MB per hour. If the Bitcoin network were to process Visa’s 2000 transactions per second, it would grow by 1 MB per three seconds (1 GB per hour, 8 TB per year). Ethereum is likely to suffer a similar growth pattern, worsened by the fact that there will be many applications on top of the Ethereum blockchain instead of just a currency as is the case with Bitcoin. See whitepaper from Ethereum’s own community Github.

Ethereum are working on strategies to cope with this problem. The public, highly redundant verification of each transaction is a core concept in the blockchain. The scalability challenge has been discussed since the beginning — and still not solved.

There exists many variations of how to use the cryptocurrency/blockchain to more than just a currency. Some have a currency as a payment mechanism included, and some have not. No doubt that it is a total new way of designing applications.

The response of the financial industry — the early adopters

The early adopters include Nasdaq, the Australian Securities Exchange, the operator of the Frankfurt Stock Exchange as well as the R3CEV-consortium of 42 of the world’s major banks, IBM and Microsoft, and a number of UK mutual funds.

Let us have a look at the R3CEV-consortium.

The R3CEV-consortium has members from many countries. Even Denmark, where Danske Bank and Nordea are participating (See R3CEV-wiki).

The R3CEV-consortium has completed its biggest test yet:

March 3rd, 2016 (New York/San Francisco/London)Financial technology innovation company R3 CEV has successfully trialed five distinct blockchain technologies in parallel in the first test of its kind. The trial represented the trading of fixed income assets between 40 of the world’s largest banks across the blockchains, using multiple cloud technology providers within R3’s Global Collaborative Lab. See r3cev.com/press.

The consortium is a collaboration among global financial institutions and software companies. There have been competitive barriers at all levels to overcome.

“This is the first time many ledgers have been run in parallel by many institutions in a rigorous, scientific way,” said Tim Grant, R3’s managing director and global head of its collaboration lab See blogs.wsj.com/cio

The banks simulated three kinds of transactions — issuing, trading and redeeming commercial paper. R3CEV declined to specify findings about the performance of specific vendors but said that member banks are sharing those details with each other. Next, R3CEV plans to conduct similar tests with the participation of government regulators and tests for integrating blockchains with banks’ legacy transaction systems.

Discussions among the early adopters

One of the discussions, you find among the participants, is the access to the blockchain network and how users should be identified. How could the blockchain be a permission-restricted network. “Permissioned-on-permissionless” is a subject for discussion.

More than half of all VC funding to date has gone into building permissioned systems on top of a permissionless network (Bitcoin). Permissioned-on-Permissionless (PoP) systems are an odd hydra. See ofnumbers.com.

This is from a blog, written Tim Swanson, Director of Market Research at R3CEV. And the following slide is from a presentation for the American Finance Association, held by the same Tim Swanson:

See ofnumbers.com/afa-presentation

Good to shoot down all the hype and be realistic. Interesting to see in which direction the R3CEV-consortium will move in 2016/2017.

Blockchain technology represents a fundamental shift in how value is shared and it requires experience and forethought to begin leveraging its potential.

--

--

Jørn Lydolff Madsen
Decentralize.Today

IT consultant. Cand. mag. - DK, #dkpol #java #ios #blockchain #ia /twitter/lydolffmadsen