Use this when a longer SHA-2 digest is wanted.
SHA-512
SHA-512 is the SHA-2 variant with a 512-bit digest. It is often faster than SHA-256 on 64-bit CPUs and is used where a longer hash or higher security margin is wanted.
1. SHA-512: 512-bit SHA-2; faster than SHA-256 on 64-bit CPUs.
2. Larger digests.
3. SHA-512/256 avoids length extension.
4. Used in password hash schemes ($6$).
5. Fine for integrity.
data → SHA-512 → 64-byte digest
Context & applicabilityCommon mistakes · platform/version boundaries
- Choosing SHA-512 thinking it is "more secure" when SHA-256 already exceeds needs.
- Confusing SHA-512 with SHA-512/256 (different initial values and output).
- Using SHA-512 for password storage without a slow KDF.
Operational reference
Fast context before you go deeper.
Get-FileHash file -Algorithm SHA512Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 SHA-2 family Narrow the fault
| Variant | Output | Internal state |
|---|---|---|
| SHA-224 / SHA-256 | 224 / 256 bits | 32-bit words |
| SHA-384 / SHA-512 | 384 / 512 bits | 64-bit words |
| SHA-512/224, SHA-512/256 | 224 / 256 bits | 64-bit, truncated, no length extension |
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.
- SHA-512 gives a 512-bit digest.
- Often faster than SHA-256 on 64-bit CPUs.
- Part of the SHA-2 family.
sha512sum file— SHA-512openssl dgst -sha512 file— OpenSSL- SHA-512/256 variant — truncated option
ReferenceWhy it matters1 section · depth on demand
SHA-512 vs SHA-256
| SHA-256 | SHA-512 | |
|---|---|---|
| Digest | 256 bits | 512 bits |
| Internal word size | 32-bit | 64-bit |
| Speed on 64-bit CPUs | Slower in software | Often faster |
| Hardware acceleration | SHA-NI widely available | Less common |
Both are secure. SHA-512/256 (truncated) avoids length extension. SHA-384 is common in TLS suites and CNSA profiles.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
SHA-512 is a SHA-2 hash producing a 512-bit digest. It offers a larger security margin than SHA-256 and is often faster on 64-bit processors because it works on 64-bit words. SHA-512/256 truncates the output to 256 bits while keeping SHA-512's internal design.
sha512sum backup.tar.gz
openssl dgst -sha512 file.bin
| Use | Example |
|---|---|
| File integrity | Release checksums |
| HMAC-SHA512 | API signing, JWT HS512 |
| Linux password hashing | $6$ (sha512crypt) in /etc/shadow — acceptable, yescrypt preferred on newer systems |
| Ed25519 | Uses SHA-512 internally |
Choose SHA-256 for broad compatibility and SHA-512/SHA-384 where policies require larger margins.
ReferenceConfiguration & state1 section · depth on demand
Commands
sha512sum file
openssl dgst -sha512 file
Get-FileHash file -Algorithm SHA512
SHA-384 is SHA-512 truncated with different initial values, common in TLS (TLS_AES_256_GCM_SHA384).
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Hashing → SHA-512. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://csrc.nist.gov/pubs/fips/180-4/upd1/final · confidence 94%