Hash

One way hash functions, also called fingerprints or cryptographically secure checksums. A one-way function is one which is easy to compute but difficult (effectively impossible) to invert. The hash function maps data of arbitrary size into a string of fixed size, using a one-way compression function.

Ideally, a cryptographic hash function should be:

  • deterministic, the same message always results in the same hash

  • quick to compute

  • infeasible to generate a message from its hash

  • a small change to a message should change the hash value completely, so no correlations could be inferred

  • infeasible to find two different messages with the same hash value (collision)

The most common hash algorithms are MD5 (message-digest 5), which has been deprecated for SHA-1 (Secure Hash Algorithm), also phased out to SHA-2 and SHA-3. The algorithms above use the Merkle–Damgård construction, while SHA-3 uses Keccak (sponge construction). The newer BLAKE algorithm is based on ChaCha stream cipher. BLAKE is a faster algorithm when run on 64-bit and ARM architectures, used in the Equihash proof-of-work algorithm, and as a key derivation function.