Cryptographic Components

Cryptographic Components

Blockchain Technology heavily  relies on the fundamental

Tools from Data Security and Cryptology, especially in message authentication targeted towards tamper-resilience and tamper-evidence. In an abstract form, a blockchain may also be described as a ledger that is shared in a network of nodes, where the ledger is responsible for holding the records of a transaction between users to achieve tamper-evidence in the ledger. To achieve this kind of a ledger, blockchain utilizes the power of cryptographic hash functions.

Cryptographic Hash Function

A hash function maps arbitrary messages or size inputs to fixed size hashtags or values.  You need to have a cryptographic hash function to justify the authenticity of a message through its tag, that is, the practical infeasibility of the input message given the tag and two input messages that produce the same tag or hash value. Due to these cryptographic properties, there is an assurance that if a message is exposed to errors, or has been tampered with, its hash value won’t match its original tag, and tampering will be evident. For small differences in the input message, a cryptographic hash function will generate a tag that will exhibit a random difference which allows us to use the hash function for creating structures that are tamper evident.

Hash Pointer

One important construct in blockchain technology is the hash pointer which is a combination of a regular pointer structure that has a hash value of the data fragment it points to; producing an inbuilt data integrity, since storing the hash pointer at the same time sets the location of the data to the location evidence as well as the tamper evidence of the same. This simply means that storing the hash pointer acts as a commitment towards the location, as well as the integrity of the specific data fragment when it is stored in any piece of data sets.

The flexibility of the hash pointer makes it enough to replace the regular pointer in any acyclic pointer-based linked data structure, making it possible for a variety of data structures to be produced that have data integrity and that are tamper-evident. The Blockchain is an example of a tamper evidence data structure.

Blockchain: Tamper-evident Linked-List

Let us consider replacing hash pointers with a linked list that has regular pointer linking the nodes- blockchain. Each block in the blockchain represents a node in the chain, and each block has a hash pointer that points to a previous blockchain that holds some data. The genesis block which is the first block in the blockchain is the only one that does not contain a hash pointer. Note that, in case a block in the blockchain has an error, the block that has a hash function of the erroneous block won’t match. When this happens, it is possible to trace any inadvertent error in a blockchain. If there is intentional tampering, the hash pointer in all blocks that follow the tampered block has to be fixed for the entire blockchain to be validated.

On the other side, if a commitment value is held by the last block of the blockchain, any tampering will be easy to prove regardless of where it is in the blockchain. Therefore, we have a data structure that is tamper-evident in the form of a blockchain that allows a commitment of a constant size. In case the last block of a blockchain is tracked by a network of entities at the same time, a decentralized platform is realized that stores the commitment, and a decentralized network that ensures a tamper-evident blockchain.

Extending a chain is easy. It can be done by creating a new block that contains a hash pointer to the last blockchain which in turn appends the newly created block to the current chain. The hard part comes when one wants to place a new block between two existing blocks. For this to be done, one will need to change the internal hash pointer that leads to changing all corresponding hash pointers which will then affect all the blocks in the blockchain. The same applies to deleting a block from a blockchain. For instance, if there are x number of blocks in a blockchain, deleting and adding blocks are 0(x) processes, while appending is 0(1), which is a constant time process.

In case a blockchain in a parallel is stored in a decentralized network, deletion and insertion are impossible as changing 0(x) blocks in the chain by the use of an entity in the network; you will need to involve other members of the network to make it happen. Appending to the chain is fine, and almost every entity in the network is capable of appending to the last existing block of a blockchain, a new block. All entities in a network do no need to participate in appending a block. The appended block is required to be broadcast on the network, to update their copy of the blockchain to ensure consistency of records; especially the block that acts as a commitment which serves as the last block. This feature comes in handy in creating a tamper-evident decentralized ledger over a network.