cyclic redundancy checks

Home Feed
2025-09-08 Cgithubnetworksyoutube

Wish I had the intuition to just summon god-tier generator polynomials for cyclic redundancy checks. But nah, shoutout to Philip Koopman for actually coming up with best polynomials. They are excellent for detecting single-bit, two-bit and burst errors. Especially the CRC32 polynomial is used in virtually every stack to detect bit manipulation errors where file transfers take place.

had to do it, sorry:p

I was experimenting with different polynomials to hack the pattern (if there is) to find the relationship between error and the actual bytes that got flipped. I ported the GNU libiberty xcrc32 (here ‘x’ is wrapper around the standard function) source code with some modifications into my client-server program to send a 20MB png file internally.

What I modified:

host to network byte order

You can safely use this modified CRC32 to check correctness for:

Basically, “if you can serialize it to bytes, you can protect it with this CRC.”

This youtube video demonstrates how the algorithm works in theory and in hardware. Highly recommend!