Cryptographic Hash
Cryptographic hash functions play the critical role in providing the foundations of trust in systems that are completely neutral and resistant to censorship or bribes.
Cryptographic hash functions create a unique, fixed-size representation of an input regardless of its size, therefore enabling blockchains and smart contracts to store an input as a hash output to save space.
Properties
Cryptographic hash functions must have five specific properties
- Deterministic
- Pseudorandom
- One-way
- Fast to Compute
- Collision-resistant
Deterministic
One specific input always maps to the same specific output
Pseudorandom
It is not possible to guess the output based on the output of similar inputs
One-way
If someone gives you a new output, you could not determine an input without guessing
Fast to Compute
It must be a quick calculation for a computer
Collision-resistant
The chance of a collision should be impossibly small