Hash functions (take input and return fixed length output) (h=hash(m))
Needs to be very different for small changes. so typo has different hash for example. corrput data needs to be noticed.
if two files are the same then hashes the same
Want following properties for a hash function
Deterministic, so the same hash is always created.
Quick to compute hash
Cannot generate input from hash, except for brute forcing inputs
Small changes to document should cause large charges to hash, such that the two hashes appear uncorrelated
Can’t find multiple documents with the same hash, practically.
Can be used to verify files, check passwords.
So possible vulernabilities are:
Given hash, find message (Pre-image resistence)
Given input, find another input with the same hash (second pre-image resistance)
Collission resistance (find two inputs with same hash)
We want to prevent accidental changes to file, and deliberate changes to file. Vulerabilites are more importnat for latter.