0

From Public key fingerprint (Wikipedia) :

Creating public key fingerprints

... 3. If desired, the hash function output can be truncated to provide a shorter, more convenient fingerprint.

and

Security of public key fingerprints

...
While it is acceptable to truncate hash function output for the sake of shorter, more usable fingerprints, the truncated fingerprints must be long enough to preserve the relevant properties of the hash function against brute-force search attacks.
...
In practice, most fingerprints commonly used today are based on non-truncated MD5 or SHA-1 hashes.
...
However, fingerprints based on SHA-256 and other hash functions with long output lengths are more likely to be truncated than (relatively short) MD5 or SHA-1 fingerprints

Why would I truncate the hash output? Where do you see truncated hash output? Won't it possibly result in some duplicated value if I truncated it unproperly?

1 Answer 1

2

Both your questions from the body are already answered in your question. You ask

Why would I truncate the hash output? Where do you see truncated hash output?

and also cite:

While it is acceptable to truncate hash function output for the sake of shorter, more usable fingerprints

This is exactly the answer as to why you would truncate hash outputs - modern hash functions do have extremely long outputs that are hard to compare, especially manually (because humans are not good at comparing 32 hexadecimal figures)

You then ask

Won't it possibly result in some duplicated value if I truncated it unproperly?

and cite:

the truncated fingerprints must be long enough to preserve the relevant properties of the hash function against brute-force search attacks.

Which can be a security concern if not honored. Hash Collisions (i.e. same hashes for different inputs) are hard to find for modern hash functions. Truncating hashes makes this easier; the bitcoin network for example shows that a certain prefix can be brute forced.

However, the use cases for truncating hashes are usually manual comparison in conjunction with structured data (for example, this might be thinkable for Public Key verification (hence why you found those remarks on that specific wikipedia page), although, gnupg doesn't do that and goes for the full hash, afaik). Finding collisions in structured data is harder than finding them in arbitrary data, choosing a sensible truncation length might preserve a comparable level of security in regards to the untruncated hash function and arbitrary data.

Your title asks

What does a hash output (a fingerprint) can be truncated mean?

Whereas I'd like to cite wikionary:

(transitive) To shorten (something) by, or as if by, cutting part of it off.

"Hash output (a fingerprint)" has two parts. The parenthesis seem to suggest that fingerprints are hash outputs, which is (afaik) always true, but could be conceived otherwise (for example by defining a truncated hash output to be the fingerprint, just to make confusion perfect). Nonetheless, usually fingerprints are hash outputs over the to-be-fingerprinted-data.

Truncating a fingerprint means truncating the hash output of the to-be-fingerprinted-data.

2
  • Ok thanks. I was thinking there may be other more convincible and solid reasons.
    – Rick
    Commented Jun 27, 2019 at 6:14
  • Usability is a pretty solid reason, especially when it comes to public key verification. You rather have a bit less secure fingerprints and have them actually compared than not having them compared at all (or just the first 2 and last 2 figures).
    – Tobi Nary
    Commented Jun 27, 2019 at 6:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .