An algorithm that transforms a given amount of data (the "message") into a fixed number of digits, known as the "hash" or "digest." Hash functions are a fundamental component in digital signatures, password security, random number generation, message authentication and blockchains. For a simple example of using a hash value to avoid storing keys and passwords on servers, see zero-knowledge proof.

**One-Way Processing**

Also called a "one-way hash function" because it is nearly impossible to turn the digest back into the original data, it is also exceedingly rare that two different inputs can result in the same output.

This one-way processing is what guarantees the integrity of a blockchain-based currency or contract. All the transactions in a block are hashed into the subsequent block creating a chained linkage. Any alteration to an existing block breaks the chain. See Merkle tree, blockchain, hash rate, HMAC, digital signature, MD5 and hash table.

**Solve the Bitcoin Puzzle by Hashing**

Bitcoin miners are given a mathematical puzzle to solve to prove that they have done substantial work to earn the right to be first to add the next block of transactions to the blockchain. This proof-of-work (PoW) system is also used by Ethereum; however, that is changing (see Ethereum 2.0).

Miners' use specialized hardware to perform countless hash computations to come up with the answer such as finding a hash value that begins with 14 zeros. So much hash processing takes place mining Bitcoin worldwide that the electricity used could power a small country (see proof-of-work algorithm). See crypto mining.

In early 2021, Tesla added Bitcoin as an alternate payment on its online order form, only to remove it shortly thereafter. A rumor floated that Elon Musk was not aware of the electricity Bitcoin required but that he would reinstate the option if Bitcoin was ever changed to be more efficient. Considering Bitcoin electricity consumption is common knowledge, the rumor is dubious.

**Hashes Are Fixed in Size**

Also called a "one-way hash function" because it is nearly impossible to turn the digest back into the original data, it is also exceedingly rare that two different inputs can result in the same output.

Bitcoin miners are given a mathematical puzzle to solve to prove that they have done substantial work to earn the right to be first to add the next block of transactions to the blockchain. This proof-of-work (PoW) system is also used by Ethereum; however, that is changing (see Ethereum 2.0).

All other reproduction requires permission

Copyright 1981-2022

The Computer Language Company Inc.

All rights reserved