C5 LRC, CRC and check digits
Needs: Supporter
Error detection on links and in data: LRC framing, CRC parameters, and why a checksum is not a MAC.
This is a supporter feature. Create a free account, then try every supporter feature free for 7 days.
What this module covers
You will be able to
- Compute an LRC with the STX / ETX framing rules
- Read CRC parameters and compute CRC-16 and CRC-32
- Know which CRC each protocol uses
- Explain why a checksum does not protect against an attacker
The lesson
- Why it matters
- The concept
- Step by step
- In the real world
- Common mistakes
- What to test
In the module
- The lesson, with diagrams, common mistakes and what to test
- A worked example you can change: LRC of a frame, and a CRC
- Practice: 4 kinds of generated exercise, each with a step-by-step solution
- A quiz of 9 questions
Key terms
- Check digit
- A digit computed from the others to catch input errors, such as the Luhn digit of a PAN.
- Checksum
- Any simple value computed over data to detect accidental errors. It gives no protection against deliberate changes; that needs a MAC.
- CRC (Cyclic redundancy check)
- A check value from polynomial division, such as CRC-16 or CRC-32. It catches far more errors than an LRC.
- LRC (Longitudinal redundancy check)
- A one-byte check made by XORing bytes together. Used after ETX in framed messages and at the end of stripe tracks.
- Rocksoft model
- The standard way to describe a CRC by its width, polynomial, initial value, input and output reflection and final XOR. Two CRC-16s with different parameters give different values.
The lesson, worked example, practice and quiz open with a supporter pass, which you can try free for 7 days.