←back to thread

104 points thunderbong | 3 comments | | HN request time: 0.418s | source
1. snvzz ◴[] No.42170306[source]
How does it compare to CRC64, for the purpose of detecting errors?
replies(2): >>42173111 #>>42173963 #
2. GTP ◴[] No.42173111[source]
With CRC, you have algebraic guarantees on which kind of errors it detects (and which kind doesn't), while with hash functions collisions are essetially random (unless you have some clever insight on how it works internally). Which one is best, depends on the context.
3. AlotOfReading ◴[] No.42173963[source]
There are few reasons to use a CRC64. Your purposes would probably be just as well-served with a good CRC32.

CRCs allow you to precisely tune the type of error detection guarantees you have to the application. You just pick the combination of hamming distance and polynomial size that you like best from the CRC Zoo:

https://users.ece.cmu.edu/~koopman/crc/index.html

A hash function is essentially just a statistical version with the avalanche property that works acceptably well the majority of the time instead of a hard guarantee.