What is a Hash
The Hash has been described as the "workhouse of modern cryptography" and it is a core.
A Hash is the output of a hash function, also called a digest. That is because, it is the result of a computation. The computation follows the rules of a hash function. A hash function takes in a value of arbitrary size.
No matter if it's a single word or a whole page of text, the function computes an output of a fixed size. So all outputs are equally long no matter the inputs.
One very simple hash function is the average checksum. Imagine splitting any number up into single characters. So for 48 it's 4 and 8. Then you take the average of these numbers, in this case, 4+8/2=6.
If you take 1000 and use the same function, the hash is 0.25. That way, you will always get a hash between 0 and 10 for any input.
This idea helps compare files, compress movies and use blockchains.
There are a lot of different hash functions for different use cases. For cryptography, we use cryptographic has functions. The most well known cryptographic hash function is SHA-256.
In my next post I will be sharing the main characteristics of a hash function.