The present definition of block chain is the one related to Bitcoin technology developed by Satoshi Nakamoto, in which the block chain is an integral part of it; Unlike the new term 'blockchain' introduced by different companies and authors to refer to Bitcoin technology as a whole.
A block chain, also known as a distributed ledger, is a distributed database that records blocks of information and interleaves them to facilitate retrieval of information and verification that it has not Been changed. The blocks of information are linked by hash pointers that connect the current block to the previous block and so on until the genesis block.
The block chain is stored by all those nodes in the network that are kept in sync with the network.
Block Chain - Block chain
Structure of a chain of blocks. Source: Princeton University's "Bitcoin and Cryptocurrency Technologies" book.
Each block belonging to the block chain contains information regarding the transactions related to a period (grouped in a structure called Merkle Tree), the cryptographic address (hash pointer) of the previous block and a unique arbitrary number (nonce).
Content Block Block
Structure and information contained in a block of the block chain. Source: Bitcoin White Paper.
HASH CRYPTOGRAPHIC FUNCTION
The information contained in each block is recorded in the form of a cryptographic hash, which allows its easy verification, but makes it unfeasible to recreate the entry date. Bitcoin uses the SHA-256 cryptographic hash function which implies that its hash pointers are of a fixed size of 256 bits.
A hash function is any function that can be used to map data from an arbitrary size to a fixed-length data in a reasonable amount of time. The values generated by a hash function are called hash values, hash codes or simply hashes.
Example Application Hash
The cryptographic hash function in execution. A small change in the input (in the word "jump") drastically changes the output. This is known as an avalanche effect. Source: Wikipedia. Free translation.
MERKLE TREE FUNCTION
Transactions or data are recorded in each block of the block chain in a cryptographic structure of hash pointers called the Merkle tree, due to its inventor Ralph Merkle. This structure groups the information blocks into pairs and generates a hash for each block of data. Then, the generated hashes are again grouped into pairs and generate a new hash that in turn is grouped with another and is repeated way up the tree until reaching a single block, the root of the tree, which is called the root hash pointer (root Hash) and registers in the current block hash direction in order to reduce the space occupied by each block.
In addition, this hash pointer structure allows you to traverse any point on the tree to verify that the data has not been manipulated, since, as with the block string, if someone manipulates some block of data at the bottom of the tree, That the hash pointer that is a level above does not match, and even if you continue to manipulate this block, the change will eventually propagate to the top of the tree where you will not be able to manipulate the hash pointer that we have stored for belonging to Another structure (block chain) in which a hash has also been generated using the root hash as input. So, again, any attempt to manipulate any piece of data will be detected by just registering the hash pointer at the top.
Structure Tree Merkle
Structure of the Merkle Tree. Source: Wikipedia.
NONCE
In cryptography, the term nonce is used to refer to a value that can only be used once. This unique number or nonce is a random number issued by the miners through the Work Test (PoW) that serves to authenticate the current block and prevent the information being reused or changed without doing all the work again.