0

What are similarities and differences between a "checksum" algorithm and a "hash" function?

Can they be used instead of each other? Or their usage are different?

For example, for verifying the integrity of a text, which one is better to be used?

1

1 Answer 1

1

All Checksums are hashes, but not all hashes are good candidates for checksums. Take for example, MD5 uses to be the de facto checksum algorithm. This has now been replaced by SHA 256 due to hash collisions with MD5.

While they are similar, a checksum is used for verifying integrity of data, while a hash is used to create a unique digital fingerprint of data.

In principle you can use any hashing algorithm for checksums, but above all you want to avoid any with proven hash collisions (e.g MD5).

3
  • What kind of hashes are not good candidates for checksum? In other word, what are the conditions for a hash algorithm to be a good candidate for being used as checksum? Thanks
    – Questioner
    Commented Sep 23, 2018 at 11:07
  • Will update my answer @sas
    – 0xsegfault
    Commented Sep 23, 2018 at 11:08
  • Thank you, but if a hash is used to create a unique digital fingerprint of data, so it can be used for integrity of data as well, isn't it?
    – Questioner
    Commented Sep 23, 2018 at 13:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.