Go hash/crc32: 32-bit cyclic redundancy checksums
Answer: The crc32 package implements the 32-bit cyclic redundancy check, or CRC-32, checksum.
Polynomials
Polynomials are represented in LSB-first form, also known as reversed representation.
IEEE is by far and away the most common CRC-32 polynomial.
Castagnoli's polynomial, used in iSCSI, has better error detection characteristics than IEEE.
The size of a CRC-32 checksum is 4 bytes.
Computing a checksum
ChecksumIEEE returns the CRC-32 checksum of data using the IEEE polynomial.
MakeTable builds a Table from a polynomial constant such as IEEE, Castagnoli, or Koopman.
New creates a Hash32 that computes the CRC-32 checksum using the polynomial represented by a Table.
See also
Claims
- id: C1 claim: The package implements the 32-bit cyclic redundancy check checksum. source: S1 evidence: "implements the 32-bit cyclic redundancy check, or CRC-32, checksum"
- id: C2 claim: IEEE is the most common CRC-32 polynomial. source: S1 evidence: "IEEE is by far and away the most common CRC-32 polynomial"
- id: C3 claim: The checksum size is 4 bytes. source: S1 evidence: "size of a CRC-32 checksum in bytes"
- id: C4 claim: ChecksumIEEE returns the CRC-32 checksum of data. source: S2 evidence: "ChecksumIEEE returns the CRC-32 checksum of data"
Sources
- [S1] crc32 package reference. The Go Authors. https://pkg.go.dev/hash/crc32 . License: BSD-3-Clause. Accessed 2026-11-24.
- [S2] crc32.go source. The Go Authors. https://go.dev/src/hash/crc32/crc32.go . License: BSD-3-Clause. Accessed 2026-11-24.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: The Go Authors, crc32 package reference; The Go Authors, crc32.go source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: The Go Authors, crc32 package reference; The Go Authors, crc32.go source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors.
Cite this
iinventedlight. 2026. "Go hash/crc32: 32-bit cyclic redundancy checksums." iinventedlight Library, iil:note:nc6mexpw, version of 2026-11-24. https://iinventedlight.com/library/notes/go-crc32/. License: CC-BY-4.0.
@misc{iil_note_nc6mexpw,
author = {{iinventedlight}},
title = {{Go hash/crc32: 32-bit cyclic redundancy checksums}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-24},
url = {https://iinventedlight.com/library/notes/go-crc32/},
note = {Permanent ID iil:note:nc6mexpw. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- go-crc32.schema.json (schema; CC-BY-4.0)
- go-crc32.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/go-crc32.md.