Search code examples
crccrc32crc16error-detectioncrc64

CRC error detection and undetected error probabilities


If we have a large file, let 's say 1 Petabyte, what's the best CRC that can detect all the errors? Is 32bits enough?

I also heard that undetected error rate (packet or chunk) is= BitR* BER * 0.5^k which K is the FSC of the CRC. in CRC 32 k is 31

I want to know if we have bigger packets or smaller ones how this will affect the CRC... from this equation, it is not affecting at all.


Solution

  • "Enough" depends on your tolerance for false positives. Given a CRC, or any other good hash, what probability would be acceptable to you of not detecting an error in any one message?

    If you call that p, then the length of the CRC or hash you need in bits, n is n = ceiling(–log2(p)).

    Note that this does not depend on the length of message. Kilobytes, Exabytes, whatever. Except to the extent that the expense of creating, sending, or storing the message impacts the p you would find acceptable.

    For particularly expensive data or data sent over untrustworthy channels, you may want to consider error correcting codes, such as Reed-Solomon or BCH codes.