CRCs vs Hash Functions

It’s inappropriate to use a CRC in place of a general purpose hash function because CRCs usually have biased output. It’s equally inappropriate to use a general purpose hash function in place of a CRC because general purpose hash functions usually do not make any guarantees on the conditions under which hash collisions can occur. - CRCs vs Hash Functions

Most modern cryptographic hash functions have very large digest values compared to what is typically used in a CRC. For instance, the most widely used CRC that I’ve seen used is CRC-32 which has multiple variations, but all of which produce a 32-bit checksum value. By contrast MD5 has a 128-bit digest value and SHA-1 has a 160-bit digest value.

What’s the best CRC polynomial to use?

looking for a lightweight error detection code, a CRC is usually your best bet… Some polynomials in widespread use are OK, but many are mediocre, some are terrible if used the wrong way, and some are just plain wrong due factors such as a typographical error. - Best CRC Polynomials

Written on November 17, 2019, Last update on November 17, 2019
hash crc