Skip to content
Advertisement

CRC user’s guide for file compare

Can someone point me to a CRC user’s guide for file compare?

I have a requirement to use CRC to compare and confirm two files match. I have reviewed this site for how to use to use CRC with no real luck.

I have also looked for a CRC user’s guide for file compare with no luck.

Advertisement

Answer

You compute the CRC on file 1. You compute the CRC on file 2. If the CRCs are not the same, then the files are different. If the CRCs are the same, then the files might also be the same. There is no assurance that the files are actually the same, unless you compare them directly.

You can get a pretty high probabilistic assurance that two files are the same if you use a long cryptographic hash, such as SHA-256. That gives you both a very low probability that two different files accidentally have the same SHA-256 (2–256 ~= 10–77), and it is considered to be not possible to modify a file to match the SHA-256 of another, different file. A CRC on the other hand is quite easy to spoof by someone who wants to fool you.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement