Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

SHA-256

Direct answer

SHA-256 is part of the SHA-2 family and produces a 256-bit hash. It is the standard choice for certificates, signatures, file integrity and HMAC, and is not considered broken.

When to use this

Use this when choosing a standard secure hash.

First 30 seconds

1. SHA-256: 256-bit SHA-2 digest.

2. Standard for integrity, certificates, signatures.

3. Length extension: use HMAC for MACs.

4. Fast — not for passwords alone.

5. Widely supported.

Operational verification

data → SHA-256 → 32-byte digest

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cryptography, PKI and secrets
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCryptography, PKI and secrets
Key commandGet-FileHash .\file.iso -Algorithm SHA256
Scope / prerequisiteUse this when choosing a standard secure hash.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verifying a download Verify boundary
sha256sum -c SHA256SUMS --ignore-missing
gpg --verify SHA256SUMS.gpg SHA256SUMS
Get-FileHash .\file.iso -Algorithm SHA256

The hash file itself must be signed or come from a different trusted channel; otherwise an attacker who replaces the download replaces the hash too.

Step 2 Common mistakes Narrow the fault
  • Using SHA-256 alone for password storage (too fast).
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • SHA-256 gives a 256-bit digest.
  • It is the standard for certificates and integrity.
  • On its own it is too fast for password storage.
Key checks
  • sha256sum file — SHA-256
  • openssl dgst -sha256 file — OpenSSL
  • Get-FileHash file -Algorithm SHA256 — PowerShell
ReferenceWhy it matters1 section · depth on demand

Where it is used

  • TLS certificates and code signing.
  • File and package integrity (download checksums, container image digests).
  • Git (moving from SHA-1 to SHA-256), Bitcoin, HMAC in JWT (HS256).

SHA-256 is fast, which is good for integrity but bad for passwords; use it inside HMAC or with a KDF, never alone for password storage. It is vulnerable to length-extension, so use HMAC instead of sha256(secret + message).

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

SHA-256 is part of the SHA-2 family and produces a 256-bit (64 hex character) digest. It is the standard general-purpose cryptographic hash: used in TLS certificates, code signing, file integrity, blockchain, HMAC and forensic verification.

sha256sum image.bin
echo -n 'text' | sha256sum
openssl dgst -sha256 file.iso
Get-FileHash .\file.iso -Algorithm SHA256

SHA-256 is fast by design, which is right for integrity checks but wrong for password storage — use Argon2id, scrypt, bcrypt or PBKDF2 for passwords. For message authentication, use HMAC-SHA256 rather than hashing a secret concatenated with data.

Length extension

SHA-256 (Merkle–Damgård) allows length-extension: knowing H(secret || msg) lets an attacker compute H(secret || msg || padding || extra). Never build a MAC as SHA256(key || message); use HMAC-SHA256, which is immune.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCryptography, PKI and secrets current

Authoritative/upstream documentation reviewed for bounded claims in Hashing → SHA-256. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://csrc.nist.gov/pubs/fips/180-4/upd1/final · confidence 94%
Confirmation

Confirm action

Continue?