← All notes

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

Sources

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

Permanent ID: iil:note:nc6mexpw

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.},
}

Markdown

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.

All artifact files (JSON index)

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.