Safety and privacy

What is hash matching?

Definition

Hash matching is comparing a short fingerprint of a file against a list of fingerprints of files already known to be bad, such as known malware. It finds exact or near copies without anyone needing to look at the file.

Also called: Hash lookup, File fingerprinting, Perceptual hashing, Hash list matching

What is a hash?

A hash is a short fingerprint calculated from a file's contents. A hash function reads every byte and outputs a fixed-length string, such as the 64 hexadecimal characters of SHA-256, whatever the file's size. The same file always gives the same hash, and two different files practically never do.

A hash works in one direction only. You cannot rebuild the file from its hash, which is how a fingerprint can be looked up without sharing the file. That also sets it apart from encryption, such as encryption at rest, which hides a file in a way the right key can reverse.

How does hash matching work?

Hash matching works by computing the hash of a new file and checking it against a list of hashes of files already confirmed as bad. If the hash is on the list, the file is a copy of something known, and the host can block it at once.

Organizations build and share these lists. Security groups keep lists of known malware, and child-protection organizations keep lists of confirmed child sexual abuse material, so hosts can find copies without anyone having to view the material again.

What is the difference between exact and perceptual hashes?

An exact hash, also called a cryptographic hash, matches only a byte-for-byte identical file. It suits malware, where the file itself is the threat. A perceptual hash is built from what an image looks like instead, so it also matches copies that were resized or saved again in another format.

Hosts use both. Exact hashes answer "have we seen this exact file?" quickly and privately. Perceptual hashes catch the near copies that appear once an image has been shared around.

What can hash matching not do?

Hash matching only finds files that are already on a list. Brand-new malware, or material that has never been reported, has no fingerprint yet, so it passes this check. That is why hosts pair it with other content moderation checks, such as a magic-byte file-type check, AI classifiers, human review and reports.

Kinds of hashes compared
KindMatchesTypical use
Exact (such as SHA-256)Identical files onlyKnown malware, duplicate files
PerceptualImages that look the same, even resizedKnown illegal images
Checksum (such as CRC32)Identical files, with no protection against tamperingChecking a download arrived intact

Hash matching: common questions

Does hash matching mean someone looks at my files?

No. A machine compares fingerprints with a list. People get involved only when there is a match, a flag from another check, or a report.

Can two different files have the same hash?

In theory, yes. With a modern hash such as SHA-256 it is so unlikely that it is treated as impossible in practice, while older ones such as MD5 are too weak to rely on for security.

Can someone rebuild my file from its hash?

No. A hash is one-way and far too short to hold the file. It can only tell you whether two files are the same.

What happens when an upload matches a known-abuse list?

On Link in Seconds the material is removed, the account is permanently banned, the material and records are preserved for investigators, and the matter is reported to the authorities.

Is hash matching used for anything besides safety?

Yes. Hashes confirm a download arrived intact, spot duplicate files in storage, and let backup tools copy only what changed.

Go deeper

Updated

Share a file as a link in seconds

Upload any file and get one clean link, with every setting on this page.

Try Link in Seconds

Optional cookies for analytics, ads and session replay.