Secure Hash Algorithm (SHA)
The family of hash functions standardised by NIST: SHA-1 (being retired), the SHA-2 family in FIPS 180-4 and SHA-3 in FIPS 202, each turning any input into a fixed-length digest.
The Secure Hash Algorithm (SHA) is a family of cryptographic hash functions published by NIST. FIPS 180-4, the Secure Hash Standard, specifies SHA-1 and the SHA-2 family: SHA-224, SHA-256, SHA-384 and SHA-512, plus the truncated variants SHA-512/224 and SHA-512/256. The number in each name is the digest length in bits. FIPS 202 specifies SHA-3, based on the Keccak algorithm chosen by public competition, with four fixed-length functions and two extendable-output functions, SHAKE128 and SHAKE256.
The generations are not simply old and new. SHA-1, with its 160-bit digest, lost its collision resistance in practice when a real collision was published in 2017, and NIST has announced that it should be phased out by the end of 2030. SHA-2 remains approved and widely deployed. SHA-3 uses a different internal design (a sponge construction) and was standardised as an alternative, not as a replacement forced by a break in SHA-2. SHA functions sit underneath HMAC and digital signatures. A longer digest raises the cost of a birthday attack, which finds collisions in roughly the square root of the number of possible digests.
Exam relevance: questions in this area tend to turn on digest lengths, on which versions are deprecated, and on the point that hashing provides integrity, not confidentiality. Candidates are expected to recognise SHA-1 as the weak member.