What's the difference between a fingerprint and a hash?

7.3k Views Asked by At

My understanding is that both a fingerprint and a hash are functions that take as input some arbitrarily long bitstring, and output a bitstring of a fixed size. The Wikipedia page for Hash Functions says:

Hash functions are related to (and often confused with) ... fingerprints

But try as I may, I can't find any sources that mention the difference between the two. Do you know what the difference between a hash function and a fingerprinting function is?

1

There are 1 best solutions below

0
On

I had the same question, it looks like the difference is the same as the difference between $P \Rightarrow Q$ and $P \iff Q$. Strictly speaking if $h$ is a hash function then it must be a fingerprinting function however the converse is not true, i. e., if $h$ is a fingerprinting function then we don't know if it is a hash function or not.

Notice that here by a hash function we mean what is colloquially referred to as a cryptographic hash function. If the context differentiates between a cryptographic hash function and just a hash function, that function may be a fingerprinting function and not a hash function. The Wikipedia article: Fingerprint (computing) says:

Mainstream cryptographic grade hash functions generally can serve as high-quality fingerprint functions, are subject to intense scrutiny from cryptanalysts, and have the advantage that they are believed to be safe against malicious attacks.

Therefore it feels like a set of all hash functions $\mathcal{H}$ is a smaller subset of the set of all fingerprinting functions $\mathcal{F}$. Therefore, we may write:

$$ f \in \mathcal{H} \Rightarrow f \in \mathcal{F} $$