DEFINITION of 'Hash'

A hash is a function that converts an input of letters and numbers into an encrypted output of a fixed length. A hash is created using an algorithm, and is essential to blockchain management in cryptocurrency.

BREAKING DOWN 'Hash'

The backbone of a cryptocurrency is its blockchain, which is a global ledger formed by linking together individual blocks of transaction data. The blockchain only contains validated transactions, which prevents fraudulent transactions and double spending of the currency. The validation process relies on data being encrypted using algorithmic hashing. The resulting encrypted value is a series of numbers and letters that does not resemble the original data, and is called a hash. Cryptocurrency mining involves working with this hash.

Hashing requires processing the data from a block through a mathematical function, which results in an output of a fixed length. Using a fixed length output increases security, since anyone trying to decrypt the hash won’t be able to tell how long or short the input is simply by looking at the length of the output. For example, hashing the word “hello” will produce an output that is the same length as the hash for “I am going to the store”. The function used to generate the hash is deterministic, meaning that it will produce the same result each time the same input is used; can generate a hashed input efficiently; makes determining the input difficult (leading to mining); and makes small changes to the input result in a very different hash.

Processing the hash functions needed to encrypt new blocks requires substantial computer processing power, which can be costly. In order to entice individuals and companies, referred to as miners, to invest in the required technology, cryptocurrency networks reward them with both new cryptocurrency tokens and a transaction fee. Miners are compensated only if they are the first to create a hash that meets the requirements set forth in the target hash.

Solving the hash is essentially solving a complex mathematical problem, and starts with the data available in the block header. Each block header contains a version number, a timestamp, the hash used in the previous block, the hash of the Merkle Root, the nonce, and the target hash. The miner focuses on the nonce, a string of numbers. This number is appended to the hashed contents of the previous block, which is then itself hashed. If this new hash is less than or equal to the target hash, then it is accepted as the solution, the miner is given the reward, and the block is added to the blockchain.

Solving the hash requires the miner to determine which string to use as the nonce, which itself requires a significant amount of trial-and-error. This is because the nonce is a random string. It is highly unlikely that a miner will successfully come up with the correct nonce on the first try, meaning that the miner may potentially test a large number of nonce options before getting it right. The greater the difficulty - a measure of how hard it is to create a hash that meets the requirement of the target hash- the longer it is likely to take to generate a solution. 

RELATED TERMS
  1. Target Hash

    A target hash is a number that a hashed block header must be ...
  2. Merkle Root (Cryptocurrency)

    A Merkle root contains information about every single transaction ...
  3. Difficulty (Cryptocurrencies)

    Difficulty is a parameter that bitcoin and other cryptocurrencies ...
  4. Block Header (Cryptocurrency)

    A block header is the unique identity of a particular block on ...
  5. Block Time (Cryptocurrency)

    Block time is the average time for a new block to be generated ...
  6. Hashed Timelock Contract

    A hashed timelock contract is a smart contract used in cryptocurrencies ...
Related Articles
  1. Tech

    What is a Distributed Ledger?

    Blockchain technology has come a long way from the obscure corners of the web it was once confined to. But what is it? And what about nonces, hashes and ledgers?
  2. Tech

    How Do You Mine Ethereum?

    Mining for ethereum is a profitable, essential, and oftentimes confusing process. Here's the basics of how to do it.
  3. Tech

    What Is a USB Bitcoin Miner? How Does It Work?

    Here’s how a USB bitcoin miner works.
  4. Tech

    What Is Bitcoin?

    We know, bitcoin isn't exactly straightforward. If miners, hashes, keys, blocks and wallets have you scratching your head, this infographic is for you.
  5. Tech

    How to Choose a Cryptocurrency Mining Pool

    Here are some selection criteria cryptocurrency miners should consider before joining a crypto mining pool.
  6. Tech

    The GPU Industry is Booming Thanks to Blockchain

    Blockchain allows the GPU industry to revolutionize its sales model, deprioritizing retail sales and creating massive networks to unleash rendering power.
  7. Tech

    Is Apple Planning to Use Blockchain?

    Apple filed a patent application for a timestamp system that uses blockchain technology.
  8. Tech

    Sites Are Using Your Browser to Mine Crypto. It Could Be a Good Thing

    Early on, bitcoin and other cryptocurrencies promised to disrupt the web's ad-based monetization model. They failed. Is browser mining a second chance?
  9. Tech

    How Do Cryptocurrency Mining Pools Work?

    Here's how cryptocurrency mining pools work.
  10. Tech

    Bitcoin Cash Broke $1000: Where Will It Go Next?

    The surge in Bitcoin Cash’s mining profitability and high trade volume propelled its price to near $1,000 over the weekend.
RELATED FAQS
  1. What Does the Bitcoin Blockchain Record?

    Read about the bitcoin blockchain, a public ledger shared among all bitcoin users that records the information of every single ... Read Answer >>
  2. What is the metals and mining sector?

    Learn about the mining sector and the many ways that mining companies profit from the location and extraction of minerals ... Read Answer >>
  3. What criteria classify a company as a junior gold miner?

    Learn about junior gold miners, companies that exclusively mine for gold. These firms typically rely on venture capital and ... Read Answer >>
  4. How can I calculate the hurdle rate in Excel?

    Learn how to evaluate potential investments. Common desktop software provides functions that can help make the decision with ... Read Answer >>
  5. What are some common functions of business intelligence technologies?

    Understand the common functions of business intelligence technologies, and learn how business intelligence is used to increase ... Read Answer >>
Trading Center