At its most basic level, blockchain is just a chain of blocks, where the digital information are refer as the “block” which are stored in a public database refer as the “chain”. It is shared and distributed ledger. This means each computer in the blockchain network has its own copy of the blockchain, which means that there are thousands, or in the case of Bitcoin, millions of copies of the same blockchain. Although each copy of the blockchain is identical, spreading that information across a network of computers makes the information more difficult to manipulate. Blockchain has no central authority — it is the very definition of a democratized system. Since it is a shared and immutable ledger, the information in it is open for anyone and everyone to see. Hence, anything that is built on the blockchain is by its very nature transparent and everyone involved is accountable for their actions.

Blockchain was invented by a person (or group of people) using the name Satoshi Nakamoto in 2008 to serve as the public transaction ledger of the cryptocurrency bitcoin. The identity of Satoshi Nakamoto is unknown. The invention of the blockchain for bitcoin made it the first digital currency to solve the double spending problem without the need of a trusted authority or central server. The bitcoin design has inspired other applications, and blockchains that are readable by the public are widely used by cryptocurrencies.

How Blockchain Works

Technically, a blockchain is a chain of blocks ordered in a network of non-trusted peers. Each block contains a cryptographic hash of the previous block, its own hash, and transaction data (generally represented as a Merkle tree).

A block
A block

A unit of block can store details of a transaction, a share in a company, a digital certificate of ownership, a vote during an election, or any other value.

Each block has a hash. This hash is a value generated from a string of text using a mathematical function. A hash can be considered as a fingerprint, as each hash is unique. Its role is to identify a block and the block’s contents. Once a block is created, a hash is calculated. For example,

Generating Hash value(1)
Generating Hash value(1)

If anyone changes the data, even a single character in a single block, the hash of that particular block changes. So a hash also indicates changes to a block.

Generating Hash value(2)
Generating Hash value(2)

Also, each block contains a hash of the previous block. For instance, if there are three blocks in a blockchain say A, B and C. Then, block C will contain the hash of block B, and block B will contain the hash of block A.

A Blockchain
A Blockchain

A hash is a great tool for identifying attempts to change data in blocks. However, a hash algorithm alone is not enough to ensure the security of a blockchain. To mitigate attempts to corrupt the blockchain and to ensure security, blockchain techmology also uses a process called proof-of-work.

Understanding Proof of Work

In Blockchain, a Proof of Work algorithm (PoW) is used to confirm transactions and produce or mine new blocks to the chain. Producing a proof of work can be a random process with low probability so that a lot of trial and error is required on average before a valid proof of work is generated. Bitcoin uses the Hashcash proof of work system. The goal of PoW is to discover a number which solves a problem. The number must be difficult to find but easy to verify—computationally speaking—by anyone on the network. This is the core idea behind Proof of Work.

Is Blockchain Safe?

After a block has been added to the end of the blockchain, it is very difficult to go back and alter the contents of the block. That’s because each block contains its own hash, along with the hash of the block before it. Hash codes, created by a math function, turns digital information into a string of numbers and letters. If that information is edited in any way, the hash code changes as well.

Here’s why that’s important to security. Let’s say a hacker attempts to edit the transaction. As soon as they edit anything, even a single letter, the block’s hash will change. The next block in the chain will still contain the old hash, and the hacker would need to update that block in order to cover their tracks. However, doing so would change that block’s hash. And the next, and so on.

In order to change a single block, then, a hacker would need to change every single block after it on the blockchain. Recalculating all those hashes would take an enormous and improbable amount of computing power.

Types of blockchain

There are primarily three types of Blockchain which includes:

Public blockchains

A public blockchain has absolutely no access restrictions. That means, they allow anyone to participate as users, miners, developers, or community members. All transactions that take place on public blockchains are fully transparent, meaning that anyone can examine the transaction details. Some of the largest, most known public blockchains are the Bitcoin and the Ethereum.

Private blockchains

A private blockchain is permissioned. One cannot join it unless invited by the network administrators i.e., participants need consent to join the networks and moreover, the transactions are private. Some of the examples of private blockchain are Hyperledger and R3 Corda.

Hybrid blockchains

A hybrid blockchain combines the privacy benefits of private blockchain with the security and transparency benefits of a public blockchain. This provide businesses flexibility to choose what data they want to make public and transparent and what data they want to keep private. Dragonchain is one of the example of hybrid blockchains.

Uses

Cryptocurrency is just one  application which can be built using this technology platform. It is used for making an online monetary transaction without any intermediates. Multichain is another application of Blockchain that is used by organizations to enhance security. By setting up a Multichain, one can prevent unauthorized access to sensitive data. Blockchain can be also used in voting system to to solve voting fraud. There are many other applications that can be built, all leveraging the benefits of blockchain. From supply chain to accounting, to identity management, and more.