Pcornel
Security · Hashing

SHA-256

Cheat sheet · https://pcornel.dk/topic.php?topic=4708

Back to the Topic

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.

Remember

  • 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.

First checks

  • sha256sum file — SHA-256
  • openssl dgst -sha256 file — OpenSSL
  • Get-FileHash file -Algorithm SHA256 — PowerShell

Verify in this order

data → SHA-256 → 32-byte digest

Where it usually breaks

First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4708

Confirmation

Confirm action

Continue?