Header Ads

Creating a hash

Creating a hash

The "account book" is a long list of all blocks, which is also called blockchain.

The blockchain is used in Bitcoin Mining to be able to trace all transactions at any time. Whenever a new block is created, it is added to the blockchain, resulting in an endless list of all transactions. The blockchain is visible to everyone, so each user can see which transaction is being performed. However, you do not know who is doing this transaction. Bitcoin is thus transparent and anonymous at the same time.

But a general ledger has to be trustworthy and the entire process is digitized. So how can we ensure that the blockchain remains intact and never manipulated? The "miners" come into play.

When a block of transactions has been generated, they let the miners go through a process. You see the information and apply a mathematical formula that converts the transaction. After that the transaction is something much shorter, actually only a string of letters and numbers, also called hash. This hash is kept (in the block) at the end of the blockchain.

Hashes have some interesting features. It's fairly easy to get a hash from the Bitcoin's information, but it's almost impossible to see what it was before. Since it is fairly easy to create a hash of a large number of records, each hash is unique. If only one character in the block is changed, the entire hash will change.

To create a hash, the miners use not only the data of the transaction in the block, but also other additional data. Part of the data is the hash in the last block of the blockchain.

Since each hash of a block uses the hash of the previous block, a kind of wax seal is created. He confirms that the current block and the before is valid, because if manipulated, it would notice everyone.

Would someone try to manipulate a transaction by changing the block already in the blockchain, then the would have to change also the hash. If someone verifies the authenticity of the block with the hashing function, one would notice directly that the hash does not match the one in the blockchain. The block would immediately be recognized as forgery.

Since each hash of a block is used to generate the hash of the next block in the blockchain, manipulation would also manipulate the following hashes.
Powered by Blogger.