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.