Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

32-bit checksum algorithm better quality than CRC32?

Are there any 32-bit checksum algorithm with either:

  • Smaller hash collision probability for input data sizes < 1 KB ?
  • Collision hits with more uniform distribution.

These relative to CRC32. I'm practically not counting on first property, because of limitation of storage space of 32 bits. But for the second ... seems there could be improvements.

Any ideas ? Thanks. (I need concrete implementation, better in C, but C++/ C# or anything to start with is also OK).

like image 451
Agnius Vasiliauskas Avatar asked Oct 09 '22 07:10

Agnius Vasiliauskas


1 Answers

How about MurmurHash? It is said, that this hash has good distribution (passes chi-square tests) and good avalanche effect. Also very good computing speed.

like image 143
werewindle Avatar answered Oct 13 '22 10:10

werewindle