Contents
StandardNIST

FIPS 180-4 (SHS)

Secure Hash Standard (SHS)

The Secure Hash Standard defines SHA-1 and the SHA-2 family, including SHA-256 and SHA-512, which vehicles use to fingerprint software, certificates, and other data.

What it is

FIPS 180-4, the Secure Hash Standard (SHS), is the NIST specification of cryptographic hash functions. A hash maps a message of any practical length to a short fixed digest. The same input always yields the same digest, and a one-bit change should scramble it. Two properties matter: preimage resistance, so the digest does not reveal the message, and collision resistance, so two different messages should not share a digest.

In vehicle E/E this document is the definition of SHA-2. Secure boot, software signatures, certificate fingerprints, and update-image checks fail if padding, initial values, or digest length differ between the ECU and the signer. Code that is only roughly SHA-256 will not match a hardware security module or a known-answer test.

SHS still includes SHA-1. Collision attacks on SHA-1 are practical, so new designs keep it only for a legacy peer that cannot change. SHA-3 is specified in FIPS 202, not in SHS.

Who it applies to

SHS applies to U.S. federal agencies and to products that claim a NIST-approved hash. It is not a vehicle type-approval regulation. A vehicle program inherits it when a higher-level rule cites it: an OEM crypto specification, an AUTOSAR configuration that names a SHA-2 primitive, a FIPS 140 validation, or a contract that requires SHA-256 as specified by SHS.

Cybersecurity engineers own the choice of variant and the decision to retire SHA-1. Basic-software and application developers own the code that must match the padding and length rules. Hardware engineers own accelerators that advertise the same primitive. Boot software, gateways, testers, and the update backend must feed the same bytes into the same variant.

What it covers

SHS specifies initial values, padding, the message schedule, and the compression function for each hash below.

Algorithm Digest Width Typical vehicle role
SHA-1 160 bits 32-bit Legacy peers only
SHA-224 224 bits 32-bit Short digest, uncommon on ECUs
SHA-256 256 bits 32-bit Default for boot, signatures, and images
SHA-384 384 bits 64-bit Higher-strength signatures
SHA-512 512 bits 64-bit Long digest, heavy on small MCUs
SHA-512/224 224 bits 64-bit SHA-512 family, shorter result
SHA-512/256 256 bits 64-bit 256-bit result from 64-bit code

The message is padded with a 1 bit, then zeros, then its original bit length, and processed in 512-bit blocks (SHA-1, SHA-224, SHA-256) or 1024-bit blocks (the SHA-512 family). SHA-224 and the SHA-512/t hashes are not a later truncation of a longer digest; each has initial values of its own. The standard stops at the hash. HMAC, digital signatures, key derivation, and random-bit generation are other NIST documents that call these functions.

How it fits with other documents

FIPS 198-1 defines HMAC, which turns a hash into a keyed authenticity check. FIPS 186 uses SHA-2 inside RSA and ECDSA signatures. FIPS 202 defines SHA-3 and the SHAKE output functions; that choice is a different algorithm, not a mode of this standard. SP 800-107 discusses the security strength of each hash, which is the number a threat analysis should use. SP 800-131A gives NIST transition guidance on which hashes stay acceptable.

ISO/SAE 21434 and UNECE R155 expect appropriate cryptography without defining the compression function. AUTOSAR names the primitive and the job interface in basic software; the bits still come from SHS. A FIPS 140 validation of a module checks that its SHA-2 matches this specification.

In practice

Record one variant per use in the crypto concept before code freeze. SHA-256 is the usual default. Step up to SHA-384 or SHA-512 only when a signature profile already demands it. When a shorter digest is required, pick the SHS algorithm that outputs that length; do not cut a SHA-256 result in application code, or test vectors and a peer HSM will disagree.

Hash the encoding the interface names: raw image bytes, the certificate encoding, or the canonical diagnostic payload. An extra length prefix passes a desk check and fails in the vehicle. Stream large images with init, update, and final. Test an empty message, one full block, and a block-crossing message. Align the HSM, the software fallback, and the factory signer, and keep SHA-1 out of new trust anchors.

What it means for your discipline

  • CybersecurityCore

    You choose the SHA-2 variant, justify its strength in the threat analysis, and keep SHA-1 out of new signatures, secure boot, and certificates. Day to day you check that every interface names the same algorithm the HSM and the backend actually run.

  • Base softwareCore

    You map each SHS algorithm onto a crypto-driver primitive and a streaming job so init, update, and final follow the standard's padding and length rules. A wrong primitive identifier or a one-shot call on a large image shows up as a boot or update failure.

  • HPC & application softwareCore

    Bootloader and application code must hash the exact bytes the verifier expects and must leave the digest length as the chosen algorithm defines it. Most days you call the crypto stack rather than reimplementing the compression function.

  • Hardware & siliconPartial

    Accelerators and HSMs that claim SHA-2 must use the same block size, padding, and digest width as any software fallback. Your check is that the engine's known-answer results match the variant named in the crypto concept.

  • Software update & OTAPartial

    Campaign metadata and image integrity depend on a digest computed as SHS defines. You lock that variant into the package format so the vehicle and the backend cannot disagree.

  • E/E architecturePartial

    You decide which ECUs compute a hash, which only compare a digest, and where a small microcontroller may run SHA-256 in software. Every hop in the chain of trust has to name one variant the others can reproduce.

  • Diagnostics & lifecyclePartial

    Authenticated diagnostic sessions and certificate checks in the tester path use whatever hash those certificates were built with. You confirm the stack is not still fingerprinting with SHA-1 unless a legacy tester leaves no alternative.

  • Networks & communicationPartial

    TLS on offboard links and any HMAC-SHA construction inherit the hash defined here. You need the variant and the exact input encoding; the handshake or MAC construction itself comes from other specifications.

No direct stake: Functional safety