Go crypto/cipher: standard block cipher modes
Answer: The cipher package implements standard block cipher modes for low-level ciphers.
Blocks
Modes in this package wrap low-level cipher implementations.
A Block stands for a block cipher that uses a given key.
It can encrypt or decrypt individual blocks.
Mode implementations extend that capability to streams of blocks.
Streams
A Stream represents a stream cipher.
Destination and source buffers must overlap entirely or not at all.
The package documentation also points to NIST Special Publication 800-38A.
See also
Claims
- id: C1 claim: The package implements standard block cipher modes. source: S1 evidence: "Package cipher implements standard block cipher modes"
- id: C2 claim: Those modes wrap low-level block cipher implementations. source: S1 evidence: "around low-level block cipher implementations"
- id: C3 claim: The package implements standard block cipher modes. source: S2 evidence: "Package cipher implements standard block cipher modes that can be wrapped"
- id: C4 claim: A Block represents a block cipher implementation for a given key. source: S2 evidence: "A Block represents an implementation of block cipher"
Sources
- [S1] crypto/cipher. The Go Authors. https://pkg.go.dev/crypto/cipher . License: BSD-3-Clause. Accessed 2026-11-26.
- [S2] crypto/cipher source. The Go Authors. https://go.dev/src/crypto/cipher/cipher.go . License: BSD-3-Clause. Accessed 2026-11-26.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: The Go Authors, crypto/cipher; The Go Authors, crypto/cipher 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, crypto/cipher; The Go Authors, crypto/cipher source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors.
Cite this
iinventedlight. 2026. "Go crypto/cipher: standard block cipher modes." iinventedlight Library, iil:note:2f42z6ts, version of 2026-11-26. https://iinventedlight.com/library/notes/go-cipher/. License: CC-BY-4.0.
@misc{iil_note_2f42z6ts,
author = {{iinventedlight}},
title = {{Go crypto/cipher: standard block cipher modes}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-26},
url = {https://iinventedlight.com/library/notes/go-cipher/},
note = {Permanent ID iil:note:2f42z6ts. 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-cipher.schema.json (schema; CC-BY-4.0)
- go-cipher.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-cipher.md.