Home

SHA2

SHA-2 is a family of cryptographic hash functions designed by the U.S. National Security Agency and published by NIST in 2001 as successors to SHA-1. The family includes six functions: SHA-224, SHA-256, SHA-384, SHA-512, and the truncated variants SHA-512/224 and SHA-512/256. Each function produces a fixed-size digest: 224, 256, 384, 512, or 224/256 bits respectively. The algorithms use the Merkle-Damgård construction with distinct word sizes and round counts: 32-bit words for the 224/256 variants and 64-bit words for the 384/512 variants, with 64 rounds in the 256-based functions and 80 rounds in the 512-based ones. Each function has its own initial hash values and a set of round constants.

SHA-2 is widely deployed for data integrity and authentication tasks. It is designed to address vulnerabilities

Standardization and adoption: SHA-2 is formalized in NIST FIPS 180-4 and remains the recommended hash family

See also: SHA-3.

discovered
in
SHA-1
and
remains
resistant
to
practical
collision
and
preimage
attacks
according
to
current
cryptanalysis.
In
practice,
SHA-256
and
SHA-512
are
the
most
commonly
used
variants,
supported
by
major
security
standards
and
software
libraries.
As
with
other
Merkle-Damgård
hashes,
using
a
plain
SHA-2
digest
as
a
MAC
is
vulnerable
to
certain
attack
vectors,
so
HMAC-SHA-2
is
preferred
for
message
authentication.
for
new
systems,
with
broad
hardware
and
software
support.
The
choice
among
variants
typically
depends
on
security
and
performance
considerations
of
the
deployment
environment.
In
response
to
later
developments,
SHA-3
was
introduced
as
an
alternative
hash
family,
but
SHA-2
remains
widely
trusted
and
in
active
use.