News for hackers. Stuff that matters.
Re:How both TCP and Ethernet checksums fail (2015) by marcosdumay on Monday January 30, 2017 @11:04AM (#13522273)
CRC64 will probably[1] suffice for any data package you'll see on your life. A cryptographic hash of 64 bits won't.

That said, it's probably easier to find a reliable implementation of SHA256 than of some CRC64, so, if the added CPU cost doesn't bother you[2], I'd say SHA256 is the best choice.

1 - CRC40 will likely be enough. Those extra 24 bits are a huge safety margin.

2 - And it normally shouldn't, not even for performance sensitive applications. The hash is very fast, and you are doing it before IO. Except for some fast disappearing niches, it just won't matter.

Re:How both TCP and Ethernet checksums fail (2015) by mikeash on Monday January 30, 2017 @11:11AM (#13522334)
What would a CRC64 do better than, say, using the first 64 bits of the SHA-256 (other than performance, of course)? I see talk of CRCs always catching contiguous errors smaller than the CRC size, is it just that a CRC is guaranteed to do that and a 64-bit cryptographic hash isn't?
Re:How both TCP and Ethernet checksums fail (2015) by beagle3 on Monday January 30, 2017 @11:16AM (#13522376)
Yes. CRC is linear in the data and the error. This makes it easy to analyze the crc of specific error sets, and if non of them have zero crc, then if the error is in that set it is guaranteed to be found.