# Understanding CRC

There are zillions of articles describing CRC. What can I ready to understand more deeply what's really going on? Both from an algebraic perspective and a bit-manipulation perspective, I'd like to understand it well enough to have an intuitive feel for it.

(Also see Brute forcing CRC-32 )

-

## 3 Answers

You can have a look at the Wikipedia page on the mathematics of CRC. Among freely available resources, see also chapter 2 of the Handbook of Applied Cryptography.

The two main ways to view a CRC-32 are:

• It is a linear operation in the vector space $\mathbb{Z}_2^{32}$. This means that the $CRC(A \oplus B) = CRC(A) \oplus CRC(B)$ ("$\oplus$" is XOR).

• It is a reduction modulo a given polynomial in $\mathbb{Z}_2[X]$ (a polynomial of degree 32 for a CRC-32).

Either way, some background on linear algebra and finite field is what you need (i.e. enough math knowledge to recognize the two things I wrote above as a sufficient description of what is to know about CRC). I quite like this book: A Course in Number Theory and Cryptography; but I recognize that it has a relatively steep learning curve, and most of it is about interesting stuff which has little to do with CRC. I have heard a few good reports on that other book but I have not read it.

-

3
A CRC-32 is a (linear) mapping from $\mathbb Z_2^*$ to $\mathbb Z_2^{32}$, not an operation in $\mathbb Z_2^{32}$, or am I understanding this wrong? – Paŭlo Ebermann♦ Sep 16 '11 at 19:32

1
– fgrieu Sep 17 '11 at 7:48

## Did you find this question interesting? Try our newsletter

email address

If you have the time to spend to really understand CRC's, I would recommend learning from an Error-Correction Coding book. CRC's and (cyclic) Error Correction codes are intimately related, and I've found that in all the literature I've seen, Error Correction Coding texts are the gentlest and most-direct way to learn the math background (linear algebra and finite fields) you need to understand CRC's.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 7, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9489964246749878, "perplexity_flag": "middle"}