I am currently reading through the paper on bitcoin and being from a non IT background, I am unable to understand the use/function of hash


A hash is like a unique identifier, perhaps like a barcode, usually written in hexadecimal as a string of numbers an letters. Bitcoin specifically uses the SHA-256 hash algorithm in most places (it also uses RIPEMD160 in some places). You can 'hash' any data you like, and get such a unique identifier. For example the hash of a transaction is called the TXID (transaction ID). If you change any small part of the transaction then the entire hash changes. Same with blocks, the hash of a block header is used to uniquely identify that block and make sure nothing has changed. Anyone can verify that the header hashes to the same hash, to test for integrity. And it is also used to make mining difficult - a special requirement is placed on each block hash that it has to be less than some target (or that it has to start with a certain number of 0s). One of the key aspects of a hash is that there is no way to reverse it, hashing is a one way function, you cannot take a hash and find out the data it came from.


A hash function is a mathematical operation with some special properties, such as being deterministic (always get the same output if you use the same input), and being non-invertible (if you have the function output, you can't work backward to get the input). You can take any input data, "hash it" (use it as input for the hash function), and you'll receive some output data that looks completely random. If you change just one little thing about the input, your output will change entirely and unpredictably.

So in layman's terms.. its like a magical piece of math that lets you turn any input data into some random looking output data. If you give someone the output, there is no way they can figure out your input, even if you show them how the hash function works.

These properties allow for some neat cryptographic tricks, such as public key cryptography, or the 'Proof of Work'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.