Article
The SHA-2 Family: SHA-224, SHA-256, SHA-384 and SHA-512 Compared
6 min read
Introduction: One Family, Several Members
When people say “SHA-2” they often mean SHA-256 — but SHA-256 is only one member of a larger group. The SHA-2 family is a set of cryptographic hash functions standardised by NIST and used everywhere: in TLS certificates, software signing, blockchain, password storage and everyday file integrity checks. The family includes SHA-224, SHA-256, SHA-384 and SHA-512, along with two lesser-known truncated variants, SHA-512/224 and SHA-512/256. They all do the same basic job — turn any input into a fixed-length fingerprint — but differ in digest length and internal word size. This guide explains who's who, how the members relate, and which one you should reach for. If you want the mechanics of a single algorithm first, start with our deep dive on how SHA-256 works.
The Members at a Glance
Each member of the SHA-2 family is named after the number of bits in the digest it produces. Here is the full line-up with digest length and typical use:
- SHA-224 — 224-bit (28-byte) digest. A truncated companion to SHA-256, used where a slightly shorter output is mandated by a standard or protocol.
- SHA-256 — 256-bit (32-byte) digest. The workhorse of the family: TLS certificates, code signing, package checksums, blockchain and most file-integrity tooling.
- SHA-384 — 384-bit (48-byte) digest. A truncated companion to SHA-512, common in higher-assurance TLS suites and government cryptographic profiles.
- SHA-512 — 512-bit (64-byte) digest. The longest standard output; favoured for long-term archival integrity and on 64-bit servers where it can be very fast.
- SHA-512/224 and SHA-512/256 — 224- and 256-bit digests computed by the 64-bit SHA-512 engine, offering SHA-512's speed on 64-bit hardware with a shorter output.
How the Members Relate
Behind these six names there are really only two underlying designs. SHA-224 and SHA-256 share one structure built on 32-bit words, processing the message in 512-bit blocks across 64 rounds. SHA-384, SHA-512, SHA-512/224 and SHA-512/256 share a second structure built on 64-bit words, processing 1024-bit blocks across 80 rounds. Within each pair, the shorter members — SHA-224 and SHA-384 — are essentially truncations of their larger sibling: they run the same engine but begin from different initial constants and then chop the output to the advertised length. The different starting values are important: they ensure a truncated digest is not simply a prefix of the longer one, which keeps the variants cryptographically independent.
When You'd Pick Each
In practice the choice is driven by compatibility and policy more than raw security, since every SHA-2 member is strong. Reach for SHA-256 as the sensible default for almost everything — file checksums, signatures and certificates — because it is short, fast and universally supported. Choose SHA-512 (or SHA-384) when a standard, compliance regime or internal policy demands a longer digest, or when you are hashing very large data on 64-bit servers where its wider words pay off. Use SHA-224 or SHA-512/256 mainly when you must match an existing record that already stored those values. A fuller side-by-side decision guide lives in our companion article, SHA-256 vs SHA-512: which to use.
Why SHA-256 Dominates in Practice
If every member is secure, why does SHA-256 appear almost everywhere? Three reasons. First, ubiquity: it was adopted early by TLS, certificate authorities and operating systems, so virtually every library and device speaks it. Second, digest size: a 64-character hex string is compact enough to print on a certificate, paste into a checksum file or scan as a QR code without becoming unwieldy. Third, performance balance: it is fast on both 32-bit and 64-bit hardware and on the dedicated SHA instructions now built into modern CPUs. The result is a self-reinforcing default — tools emit SHA-256, so records store SHA-256, so the next tool emits SHA-256 too.
Security Status — and a Word on MD5 and SHA-1
The good news is simple: every member of the SHA-2 family is considered secure and is recommended for current use. No practical collision or pre-image attack exists against SHA-224, SHA-256, SHA-384 or SHA-512. The crucial caveat is that MD5 and SHA-1 are NOT part of SHA-2 — they are older, separate algorithms, and both are now broken by practical collision attacks. You may still see MD5 or SHA-1 quoted for backward compatibility with legacy records, but they should never be relied on as your sole proof of integrity. When in doubt, pick any SHA-2 variant. The newer SHA-3 family exists as a structurally different alternative, but it does not replace SHA-2 — both are approved and widely used side by side.
Frequently Asked Questions
What is the SHA-2 family?
SHA-2 is a family of cryptographic hash functions standardised by NIST. Its members are SHA-224, SHA-256,
SHA-384 and SHA-512, plus the two truncated 64-bit variants SHA-512/224 and SHA-512/256. They share two
underlying designs — one built on 32-bit words and one on 64-bit words — and differ mainly in
digest length, which ranges from 224 to 512 bits.
What is the difference between SHA-256 and SHA-512?
SHA-256 produces a 256-bit (32-byte) digest using 32-bit internal words, while SHA-512 produces a 512-bit
(64-byte) digest using 64-bit internal words. On modern 64-bit hardware SHA-512 can actually be faster for
large inputs, but SHA-256 is shorter, universally supported and the default for most file integrity,
certificates and software signing.
Are SHA-224 and SHA-384 just truncated versions of larger hashes?
Effectively yes. SHA-224 runs the SHA-256 engine with different starting constants and outputs only 224
bits. SHA-384 runs the SHA-512 engine with different starting constants and outputs only 384 bits. The
truncation and distinct initial values mean their outputs are not simply prefixes of the larger hash, which
is a deliberate security property.
Is SHA-2 still secure, and how does it relate to MD5 and SHA-1?
Every member of the SHA-2 family is still considered secure and is recommended for current use. MD5 and
SHA-1 are NOT part of SHA-2 — they are older, separate algorithms that are now broken by practical
collision attacks and should not be relied on for integrity or security. Choosing any SHA-2 variant over
MD5 or SHA-1 is the safe default.
Which SHA-2 algorithm should I use for verifying files?
For everyday file integrity verification, SHA-256 is the best default: it is fast, produces a manageable
64-character hex digest and is supported everywhere. Choose SHA-512 or SHA-384 when a policy or standard
requires a longer digest, and match SHA-224 or SHA-512/256 only when an existing record stored those
values. A tool that computes several SHA-2 variants at once lets you match whatever was originally recorded.
Conclusion
The SHA-2 family is best understood as two engines — a 32-bit one (SHA-224, SHA-256) and a 64-bit one (SHA-384, SHA-512 and the SHA-512/t variants) — offering a spread of digest lengths for different policies and platforms. All of them are secure; SHA-256 simply wins on ubiquity and convenience, which is why it has become the everyday default. The practical takeaway is to use a SHA-2 variant rather than the broken MD5 or SHA-1, and to match whatever digest was originally recorded. You can compute and compare SHA-224, SHA-256, SHA-384, SHA-512 and more — fully offline on a single Windows machine — with e-Dex, the free Digital Evidence Integrity Suite. You can also use it for quick file hash verification whenever you need to confirm a download or delivery is unaltered.