Private and public blockchains. What is the difference?

Public blockchains can be used by everyone. Private blockchains can be used by selected group of participants. This is the most basic and overall difference between public and private blockchains. What is the real difference based on?

What are the concrete differences between public and private blockchains?
Who can be the user of public and private blockchain?

I invite you to read the article.

Public blockchain

Public blockchains are known to have the cryptocurrency, e.g. Bitcoin, Ethereum, Litecoin, Stellar, Cardano, Monero and much more other (https://coinmarketcap.com/). The publicity meant by openness of interaction with that blockchain and possibility of becoming the part of the blockchain are the inseparable part of public blockchain philosophy. The idea of the blockchain is to be opened. Ethereum is the global computer.

bitcoin
Bitcoin was the first public blockchain.

What makes the blockchain opened? As I said the most important are:

  • the possibility of creating the blockchain network – what means submitting the transactions and blocks;
  • the possibility of interaction with the blockchain – transferring cryptocurrencies, creating and interaction with smart contracts, choosing delegates and using all the features offered by concrete blockchain.

In public blockchains the openess means that every participant can utilize the features of the blockchain if only fulfills some requirements. There are no exceptions from these requirements and there are no less or more privillage users in public blockchains. It means that:

  • do you want to become a part of the network? – all you have to do is download required node software, run it and start to take part in blockchain consensus;
  • do you want to send the transaction? – all you have to do is to implement the encoded transaction and send it to the network;
  • do you want to invoke smart contract and save some data in blockchain? – all you have to do is to invoke smart contract function providing some gas in order to cover the operational cost;

It’s important to understand that in public blockchains there is one law for everyone. Everyone is equal in front of the protocol – the rules which must be obeyed in order to interact with the blockchain.

Cryptography especially asymmetric (public key cryptography) is the clue of the blockchain protocol. Without this cryptography it would be impossible to define the rules (protocol) which is based on the software only based verification (there is no need of any institution, group, entity which would control respecting the protocol).

Let’s think about sending the transaction in blockchain. The rule of sending transaction protocol is simple: if you have some amount of cryptocurrency (technically speaking if you control the entry in blockchain which can be modified using your crypto keys) – all you have to do in order to send the transaction is to encode the transaction data and send it to the network. There is no need of any institution here for confirming the validity of this transaction – cryptography mechanisms verify the correctness of the transaction. All blockchain users can generate these cryptographic keys (private/public) using independent software (these are known cryptographic standards used commonly in the world, by banks for example). Without that cryptography – such transaction would have to be validated by some special entity. In blockchain the software code running by thousands of machines in the network verify the correctness of all operations. Technology (the math behind the cryptography) is the guarantee the there is not possibility of cheating.

In public blockchains exists the protocol which must be respected by everyone without exceptions. Everyone can use them because are accessible via Internet, and the interaction with them is based on independent cryptography.

Private blockchain

Private blockchain is the the network designed and created using some special software and tools. Private blockchains are controlled by closed group of participants. Only this group has the possibility to create the blockchain (producing blocks), saving and reading the data, invoking smart contracts and using every other blockchain related feature. Usually there is no global cryptocurrency in private blockchains – because there is no point taking into consideration it’s closed character.

How these restrictions work? In other words – what are the concrete mechanisms which enable or disable some actions in private blockchains?

Blockchain network consist of machines connected via the Internet. The mechanics of public blockchains allows joining new participants to the existing network (e.g. when connecting to Bitcoin, the node connects to DNS seed servers which provide the IP addresses of other nodes, so joining node can connect to them). In simplified theory – restriction of access to private blockchains would be based only on network restriction level: only chosen hosts (IP addresses) can be participants of the network. However private blockchains are much more than only restriction on network protocol level.

The key of access restriction in private blockchain is again cryptography. The difference between public and private is based mainly on the amount of blockchain functionalities, which are controlled by cryptography mechanisms. Second very important property is the complexity of participants digital identities used in private blockchains (based on cryptography again).

I would like to explain more using the example of Hyperledger Fabric – one of the most common software used to develop private blockchains.

Hyperledger-Fabric
Hyperledger Fabric – one of the most popular private blockchains creation software.

In blockchain created using Hyperledger Fabric every single blockchain interaction e.g. read and save the data or processing the smart contract (in Fabric terminology the chaincode) is defined in the configuration of this blockchain. Existing users group model (member, admin) gives the possibility to define the rules for these user groups. Providing the configuration to the blockchain (defining the rules) is based on special configuration transactions. First and base transaction is present in the genesis block (initial block of the blockchain) – defined and created by the network administrator. This initial configuration transaction (also all the subsequent) defines all the blockchain network properties: which and how many nodes are in the network, what chaincodes are present and who can process them, etc.

The users of private blockchains belong to the organizations which create the network. Every of organizations has own users (normal members, admins, different groups), which using digital identities (kind of digital ID card secured by asymmetric cryptography) interact with the blockchain.

Digital Card Fabric
Example of user digital identity visualisation used in Hyperledger Fabric.Source: https://hyperledger-fabric.readthedocs.io/

In private blockchains it’s impossible to create the digital identity in the independent manner how it can be done in the public blockchains – where it’s simply matter of generating some pair of asymmetric keys in order to sign the transactions. There is a concept called Root of Trust in private blockchain field which restricts the access of undesirable users.

Cryptography in private blockchains uses the Roof of Trust in order to ensure that digital identities of users were generated only by some special obligated entities (network administrators).  These entities can provide kind of digital signature (also generated using asymmetric cryptography), which makes valid only digital identities containing this signature. Private blockchain network validates these signatures when user interacts with the network, checking if the identity has the signature of the organization belonging to the network (in practice known organization is the one which was loaded to the blockchain using configuration transaction). These mechanisms secure the network from unwanted users and allows to change the blockchain configuration in any time e.g. forbid the access to the network for the users which have some selected digital signature in the identity, simply by invalidating the signature.

Private blockchains provide the wide configuration possibility including the definition of access rules. The access control to the blockchain resources is based mainly by using sophisticated cryptography mechanisms. The Root of Trust allows to configure user access by providing the digital signatures which must be present in the digital identities of the blockchain users interacting with the network.

Summary

Public and private blockchains are dedicated to different kinds of use what makes them different in some aspects.

The goal of public blockchains is to be independent and global source of truth of saved facts, stored in digital from in the blockchain. They are opened and accessible for everyone, maintained by thousands of users from the entire world.

Private blockchains connect the closed group of participants, being the source of truth only for this participants group. The access control of private blockchains restricts the access to the blockchain resources for unwanted users.

Both private and public blockchains use cryptography. In private blockchains cryptography is used to group users and providing them possibility to utilize selected blockchain resources.

Is the topic of private and public blockchains not clear? Don’t hesitate to ask in the comments – Przemek.