Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 1141

SHA-256

Reviewed byCybersecurity entrepreneur & security researcher

What is SHA-256?

SHA-256A 256-bit cryptographic hash function from the SHA-2 family, widely used for digital signatures, TLS, blockchains, and integrity verification.


SHA-256 is a member of the SHA-2 family standardized by NIST in FIPS 180-4, producing a 256-bit (32-byte) digest from inputs of up to 2^64 bits. It operates on 32-bit words through a Merkle–Damgård construction: the message is padded, split into 512-bit blocks, and fed through a Davies–Meyer compression function of 64 rounds. The eight initial state words and 64 round constants are derived from the fractional parts of the square and cube roots of the first primes, a "nothing-up-my-sleeve" choice that rules out hidden backdoors.

flowchart LR
  M[Message] --> P[Pad to multiple<br/>of 512 bits]
  P --> B[Split into<br/>512-bit blocks]
  B --> C[Compression<br/>64 rounds]
  IV[8 init words] --> C
  C -->|chaining| C
  C --> D[(256-bit digest)]

Unlike SHA-1 — broken by Google's 2017 SHAttered collision — SHA-256 has no practical collision or preimage attack beyond the generic 2^128 / 2^256 bounds. Its one structural caveat is length-extension: because the final state is the output, HMAC-SHA-256 or the truncated SHA-512/256 should be used where a keyed MAC is needed, and Bitcoin applies SHA-256 twice (SHA-256d) partly for this reason. Hardware acceleration via Intel SHA-NI and the ARMv8 cryptography extensions makes it extremely fast. Git is migrating its object model from SHA-1 to SHA-256. For password storage SHA-256 must still be wrapped in a slow KDF such as Argon2, scrypt, or PBKDF2.

● Examples

  1. 01

    Bitcoin uses double SHA-256 for block hashing and proof-of-work.

  2. 02

    Modern X.509 certificates are signed with SHA-256 (signature algorithm sha256WithRSAEncryption).

● Frequently asked questions

What is SHA-256?

A 256-bit cryptographic hash function from the SHA-2 family, widely used for digital signatures, TLS, blockchains, and integrity verification. It belongs to the Cryptography category of cybersecurity.

What does SHA-256 mean?

A 256-bit cryptographic hash function from the SHA-2 family, widely used for digital signatures, TLS, blockchains, and integrity verification.

How do you defend against SHA-256?

Defences for SHA-256 typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for SHA-256?

Common alternative names include: SHA-2 (256-bit), FIPS 180-4 SHA-256.

● Related terms

● See also