0.0337 s - время 17 - запросов

We use cookies in order to improve your experience while using our website. If you continue to use our site, you accept our Cookies Policy, revised Privacy Policy and updated Terms of Use.

BTC $ 3634.44127805 (-2.07 %)
XRP $ 0.3269041789 (-2.36 %)
ETH $ 121.560150038 (-6.11 %)
BCH $ 128.552869096 (-3.61 %)
EOS $ 2.4047864224 (-2.55 %)
XLM $ 0.106173524 (-3.08 %)
USDT $ 1.0204794121 (-0.1 %)
LTC $ 31.3384838867 (-3.71 %)
TRX $ 0.024364019 (-5.21 %)
BSV $ 77.2004713987 (-3.32 %)

Hashing Approaches Described In Original Bitcoin Paper

21:00 30/12/2018

Introduction

 

Since basic details and functions of Bitcoin were proposed in 2009, the network is constantly evolving with the help of crypto enthusiasts and developers. Many different system improvements have been proposed over the past several years. Some of them were taken as they were, others were amended and applied in proper time, yet others are still at the planning stage or rejected.

 

Regardless of the technological variety used in the Bitcoin project, there are many parts of original protocol kept unchanged. One of them is hashing approaches used in different parts of the protocol. Let’s have a look on them.

 

Hashing In Bitcoin

 

As it was stated in Satoshi Nakamoto’s article of 2009, hashing is used for several reasons. First of all, it is reliable and secure. Indeed, due to hashing internal properties it is impossible (or close to impossible) to reverse hashing data and convert it to initial input data. Second, it is space-saving. Since the block size is stable at 1 Mb level, each bit matters. Such a requirement demands data compression or pruning. The last point is about uniqueness. A hash value is unique enough to support many addresses needed to transfer crypto funds. All these properties together support the required level of reliability.

Let’s consider all proposed hashing described in the original Bitcoin paper.

 

Transactions Addressing

 

Hashing is used for addressing a transaction as it is mentioned in the “Transaction” section. Transaction has a complex structure with many components that might be presented in different ways. After hashing all those data, we get 256 bits of hash used as an address. In fact, transaction data is hashed twice for security reasons. This hash result is also referred as TxID (transaction identifier). To use transferred funds, we have to know the TxID and be able to unlock it.

 

Blocks Connection

 

In the “Timestamp Server” section, hashing is described as a tool used to unite blocks in the chain. According to the paper, this system allows tracing data and proving its existence. Each new block has its own calculated hash which gets added to the next new block as a standard component. This means that all blocks contain hashes of previous blocks. This approach is simple yet efficient because nobody can change a block content without changing its hash. These actions are clearly traceable.

Proof Of Work

 

A consensus approach called Proof-of-Work is also based on hashing. It is legacy consensus method proposed by Nakamoto. It directly refers to Adam Back's Hashcash method used for e-mail protection and DoS attacks prevention. PoW requires participants to calculate hashes of the blocks they want to add to the network. If a calculated hash has a necessary number of leading zeros, the block is considered as valid and must be accepted by all other participants. Since hashing is deterministic, the same input gives the same output. Still, it is unpredictable enough to be recalculated with a single bit change and a completely changed result. A special counter named “nonce” is used here.

 

This process of searching for a correct hash is called mining.

 

Merkle Tree

 

The last but not the least hashing technology used in Bitcoin is called the Merkle Tree. This is a structure of hashes that looks like a pyramid. A single hash is received as TxID. All TxIDs are taken in pairs. Each pair of hashes gets its own calculated hash. After that, all results pair up again, and the process repeats. If a hash has no pair, it is taken twice.

This approach is used for the SPV (simple payment verification) method. Some nodes wouldn’t like to store the whole blockchain. They download block headers with the Merkle Tree inside. Then, in order to verify a transaction, all they need is to check hashes. Thus, the work of lightweight nodes gets much simpler.

 

Afterword

 

The original Satoshi Nakamoto’s article devoted to Bitcoin contains all main hashing details that are used to this very day. This underlines the beauty of the initial proposal as a technical solution. Many other crypto projects use hashing as well, and some of them have their own developments. We will talk about them later.

Found a mistake? Highlight it and press Ctrl + Enter to notify the administrator.

Up-to-date Blockchain and cryptocurrency news. Be the first to know!

What is it for?