Other meanings of SHA-2
Cryptography
SHA-2 is a family of cryptographic hash functions standardized by the National Institute of Standards and Technology (NIST). Its members transform arbitrary-length input into fixed-length digests used for integrity checks, digital signatures, authentication protocols, and proof-of-work systems.
SHA-2 is a group of hash functions that produces a fixed-size digest from data of practically any length. NIST specifies six named variants: SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256.1 The numbers identify the nominal digest length in bits, not a measure of the input that can be processed. A one-bit change in the message normally alters roughly half the digest bits, a property called the avalanche effect.
SHA-224 and SHA-256 use 512-bit message blocks and 32-bit words; SHA-384 and SHA-512 use 1024-bit blocks and 64-bit words. The SHA-512/224 and SHA-512/256 variants use the SHA-512 construction but truncate its output, with independently specified initial values. SHA-384 similarly derives a shorter result from the SHA-512 family, rather than simply running SHA-256 and cutting it down.1
SHA-2 processes padded messages in blocks through an iterative compression construction. Each round combines additions modulo a power of two, bitwise Boolean functions, rotations, shifts, message-schedule words, and round constants; SHA-256 has 64 rounds, while SHA-512 and its derivatives have 80.1 The final internal state is serialized as the digest.
Security discussions distinguish collision resistance from preimage resistance. For an ideal n-bit hash, generic collision search requires about 2n/2 work, whereas finding a message for a specified digest requires about 2n work. These are design expectations, not guarantees against every attack or implementation mistake. SHA-2 has withstood extensive public cryptanalysis, but protocols still need correct domain separation, length handling, key management, and side-channel-aware implementations.
SHA-2 is widely used to authenticate data indirectly: a digital signature commonly signs a hash of a document, and a certificate or software-release mechanism can publish a digest for later comparison. SHA-256 and SHA-384 are among the hash algorithms used by modern Transport Layer Security cipher suites and signature schemes.3 The Internet Engineering Task Force also specifies SHA-2 implementations and test vectors for protocol developers.2
Typical applications include file-integrity verification, authenticated boot, password-storage constructions such as PBKDF2-HMAC-SHA-256, HMAC authentication, and content-addressed storage. A bare hash is not a password-protection scheme: passwords require a deliberately slow, salted password-based key-derivation function. Likewise, collision resistance does not prove that a downloaded file came from a trusted publisher; authenticity requires a trusted signature, secure channel, or equivalent provenance mechanism.
SHA-2’s shorter variants are not interchangeable labels for truncated output. SHA-224 and SHA-384 use distinct initial states and specified truncation rules, while SHA-512/224 and SHA-512/256 are SHA-512-based designs with their own initialization; this prevents accidental equivalence between differently named algorithms.1
The family was developed as a successor line to SHA-1, whose declining security margin led standards bodies to discourage its use for new digital signatures and similar applications.4 SHA-2 can still be the wrong choice when a protocol needs a variable-length output, built-in tree hashing, or resistance to length-extension issues in an unkeyed construction; SHA-3 and keyed constructions such as HMAC address different requirements. SHA-2 also appears in less visible infrastructure, including certificate fingerprints, package indexes, version-control object identifiers, and cryptocurrency proof-of-work.
SHA-2 is a family designation, not a single algorithm; the variant and its operating mode should be stated whenever interoperability or security strength matters.
Help improve the encyclopedia. Reports go straight to the site manager.