An algorithm that transforms a given amount of data (the "message") into a fixed number of digits, known as the "hash," "digest" or "digital fingerprint." Hash functions are a fundamental component in digital signatures, password security, random number generation, message authentication and blockchains. A hash can also be used to avoid the risk of storing passwords on servers that could be compromised (see zero-knowledge proof
). See RSA and hashing
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 guarantees that existing blockchain crypto balances and smart contract program code cannot be altered. All transactions in a block are hashed into the subsequent block creating a chained linkage, and any alteration to an existing block breaks the chain (for details, see blockchain
). See Merkle tree
, digital signature
Solve the Bitcoin Puzzle by Hashing
As transactions are combined in a block by Bitcoin miners, they must solve a mathematical puzzle to prove they did work. The first to do so earns the right to add the new block to the blockchain and collect the fees and new bitcoins. This proof-of-work (PoW) system is also used by Ethereum; however, that is changing (see Ethereum 2.0
The puzzle is finding a random number that added to the block's header generates a hash with some number of leading zeros (the number of zeros, or difficulty, is adjusted every 2,016 blocks to keep transactions flowing at one block every 10 minutes). With specialized hardware executing trillions of hash computations per second, it can take a single machine years to come up with the required hash, which is why mining pools use hundreds of machines (see miner hardware
). So much hash processing takes place mining Bitcoin worldwide that the electricity used could power a small country (see proof-of-work algorithm
and hash rate
). See crypto mining
Tesla Support: Yes, Then No
In early 2021, Bitcoin was added to the Tesla order form, only to be removed shortly thereafter. A rumor floated that Elon Musk was not aware of the electricity required but he would reinstate the option if Bitcoin ever became more efficient. Considering the electricity consumption is common knowledge, the rumor is dubious.
Hashes Are Fixed in Size
The hash value guarantees only that it is mathematically equal to the data it has hashed. If the data are changed in any way, that same hash cannot be generated. No matter how large or small the input, the hash output is fixed; for example, Bitcoin hashes are 256 bits long. See SHA