Checksums

WinHex & X-Ways

Checksums

 

A checksum is a characteristic number used for verification of data authenticity. Two files with equal checksums are highly likely to be equal themselves (byte by byte). Calculating and comparing the checksums of a file before and after a possibly inaccurate transmission may reveal transmission errors. An unaffected checksum indicates that the files are (in all likelihood) still identical. However, a file can be manipulated on purpose in such a way that its checksum remains unaffected. Digests are used instead of checksums in such a case, where malicious (i.e. not mere random) modifications to the original data are to be detected.

 

In WinHex, checksums can be calculated for example with a command in the Tools Menu.

 

The standard checksum is simply the sum of all bytes in a file, calculated either on an 8-bit, a 16-bit, a 32-bit, or a 64-bit accumulator. The CRC (cyclic redundancy code) is based on more sophisticated algorithms, which safer.

 

Example: If a transmission alters two bytes of a file in such a way that the modifications are countervailing (for instance byte one +1, byte two -1), the standard checksum remains unaffected, whereas the CRC changes.