09-11-2012, 05:01 PM
Checksum and CRC Data Integrity Techniques for Aviation
Checksum and CRC Data.pdf (Size: 946.74 KB / Downloads: 282)
Checksums and CRCs Protect Data Integrity
• Compute check sequence when data is transmitted or stored
– Data Word: the data you want to protect (can be any size; often Mbytes)
– Check Sequence: the result of the CRC or checksum calculation
– Code Word = Data Word with Check Sequence Appended
• To check data integrity:
– Retrieve or receive Code Word
– Compute CRC or checksum on the received Data Word
– If computed value equals Check Sequence then no data corruption found
• (There might be data corruption! But if there is, you didn’t detect it.)
Why Is This A Big Deal?
• Checksums are pretty much as good as CRCs, right?
– In a word – NO!
– Typical studies of checksums compare them to horrible CRCs
– Would you prefer to detect all 1 & 2-bit errors (checksum) or
all possible 1, 2, 3, 4, 5-bit errors (CRC) for about the same cost?
• CRCs have been around since 1957 – aren’t they a done deal?
– In a word – NO!
– There wasn’t enough compute power to find optimal CRCs until recently…
so early results are often not very good
– There is a lot of incorrect writing on this topic … that at best assumes the
early results were good
– Many widespread uses of CRCs are mediocre, poor, or broken
• Our goal today is to show you where the state of the art really is
– And to tune up your sanity check detector on this topic
Error Code Effectiveness Measures
• Metrics that matter depend upon application, but usual suspects are:
– Maximum weight of error word that is 100% detected
• Hamming Distance (HD) is lowest weight of any undetectable error
• For example, HD=4 means all 1, 2, 3 bit errors detected
– Fraction of errors undetected for a given number of bit flips
• Hamming Weight (HW): how many of all possible m-bit flips are undetected?
– E.g. HW(5)=157,481 undetected out of all possible 5-bit flip Code Word combinations
– Fraction of errors undetected at a given random probability of bit flips
• Assumes a Bit Error Ratio (BER), for example 1 bit out of 100,000 flipped
• Small numbers of bit flips are most probable for typical BER values
– Special patterns 100% detected, such as adjacent bits
• Burst error detection – e.g., all possible bit errors within an 8 bit span
– Performance usually depends upon data word size and code word size
• Example for LRC8 (8 bit chunk size LRC)
– HD=2 (all 1 bit errors detected, not all 2 bit errors)
– Detects all 8 bit bursts (only 1 bit per vertical slice)
– Other effectiveness metrics coming up…
Composite Checksum/CRC Schemes
• Idea: use a second error code to enhance error detection
– Rail systems add a 32-bit “safety CRC”
– Checksum + CRC can be a win ([Tran 1999] on CAN)
– ATN-32 is a checksum used in context of network packet CRC
• Youssef et al. have a multi-CRC aviation proposal
– Combines ideas such as “OK to miss an error if infrequent”
– Uses composite CRCs based on factorization
– Evaluated with random experiments
• Issue to consider:
– What HD do you really get with a composite scheme?
• E.g., which error patterns slip past both CRCs?
– Are diverse checksum+CRC approaches better than
dual CRC approaches?