Blockchain - Hashing


One of the most important function in PKI is the hashing function. A hash function maps the data of any arbitrary size to data of fixed size. Bitcoin uses SHA-256 hash function that produces a hash (output) of size 256 bits (32 bytes). This is illustrated in image −


Bob, while placing an order with Lisa, creates a message similar to the one shown above. This message is hashed through a hash function that produces a 32 byte hash. The beauty of this hash is for all practical purposes the hash (the 256-bit number) is considered unique for the contents of the message. If the message is modified, the hash value will change. Not only that given a hash value, it is impossible to reconstruct the original message.

After having seen the importance of hashing, let us move on another concept in Bitcoin that is mining.