Contents
StandardNIST

NIST SP 800-38 series

Block cipher modes of operation: CBC/CTR, CMAC, CCM, GCM and XTS

The NIST SP 800-38 series explains how to use block ciphers such as AES to encrypt data, authenticate messages, or combine both protections.

What it is

NIST SP 800-38 is a family of recommendations for block cipher modes of operation. AES processes fixed-size blocks; a mode defines how to use that primitive for messages or stored data and what security properties the result provides.

The distinction matters: confidentiality hides information, while authentication helps detect unauthorized changes. Some modes provide only one property. Authenticated encryption combines both and can also authenticate associated data, such as a visible message header.

Who it applies to

The series is relevant to engineers selecting, implementing, configuring, or reviewing cryptography in ECUs, gateways, vehicle computers, backend services, and storage systems.

These publications are not automotive regulations and do not automatically impose obligations on every vehicle project. They become engineering requirements when referenced by a protocol, customer specification, security policy, or applicable compliance framework. Security engineers typically own the selection and constraints; software, basic software, and hardware teams implement them.

What it covers

The parts most relevant to this page are:

Part Modes Main purpose
SP 800-38A ECB, CBC, CFB, OFB, CTR Confidentiality
SP 800-38B CMAC Message authentication
SP 800-38C CCM Authenticated encryption
SP 800-38D GCM and GMAC Authenticated encryption, or authentication alone
SP 800-38E XTS-AES Storage confidentiality

Each mode has specific input and usage requirements. CBC requires an unpredictable initialization vector. CTR requires counter blocks that do not repeat under the same key. GCM requires initialization-vector uniqueness under a key; reuse can undermine both confidentiality and authentication. CCM likewise requires nonce uniqueness and imposes message-format and length constraints.

CMAC authenticates messages without hiding their contents. Truncating its tag reduces resistance to guessing, so tag length must be considered together with message volume, key lifetime, and failed verification attempts.

ECB reveals repeated plaintext blocks and is unsuitable for ordinary structured payloads. XTS-AES protects storage contents against disclosure but does not authenticate them. The wider series also addresses key wrapping and format-preserving encryption.

How it fits with other documents

FIPS 197 defines AES itself; SP 800-38 defines ways to use block ciphers. Key-management guidance, including NIST SP 800-57, addresses the surrounding key lifecycle. A correct mode implementation still needs secure key generation, provisioning, storage, and replacement.

AUTOSAR SecOC specifies how communication authentication and freshness information fit into automotive messages. CMAC can supply the authentication algorithm, but SP 800-38B does not define SecOC framing or replay protection. Likewise, a transport or update protocol must specify how it uses authenticated encryption and handles failures.

In practice

Begin with the required protection: secrecy, authenticity, or both. Use the mode required by the selected protocol and an established cryptographic implementation.

Document who generates nonces or counters, how uniqueness survives power loss, and how multiple senders sharing a key avoid collisions. Define tag lengths, usage limits, and key replacement rules explicitly.

Test invalid tags, malformed inputs, replayed messages, and reset recovery alongside known-answer vectors. With authenticated encryption, prevent applications from acting on plaintext before authentication succeeds. For encrypted storage, add integrity and rollback protection where the threat model requires them.

What it means for your discipline

  • CybersecurityCore

    Own mode selection, key and nonce rules, authentication-tag policy, and cryptographic usage limits. Review whether the complete design protects against modification and replay as well as disclosure.

  • Base softwareCore

    Implement and configure cryptographic services used by communication and storage stacks. Ensure drivers and cryptographic providers enforce the selected mode’s input, state, and error-handling requirements.

  • HPC & application softwarePartial

    Use cryptographic APIs correctly, including nonce handling and authentication-failure processing. Avoid exposing unauthenticated plaintext or treating encryption as proof that data is trustworthy.

  • Hardware & siliconPartial

    Check that accelerators and hardware security modules support the required modes, key isolation, and throughput. Account for how counters and cryptographic state behave across resets.

  • Networks & communicationPartial

    Account for authentication tags, freshness information, and message-size constraints in communication designs. Understand that message authentication alone does not prevent replay.

  • E/E architecturePartial

    Allocate encryption, authentication, key storage, and nonce ownership across ECUs and services. Ensure shared keys and reset behavior do not create conflicting cryptographic state.

No direct stake: Functional safety · Diagnostics & lifecycle · Software update & OTA