Glossary
HASHING

SHA-512

Secure Hash Algorithm 512-bit — a larger SHA-2 family member with a 512-bit digest. Used where extra output width is preferred over compactness.

SHA-512 is a member of the SHA-2 family (FIPS 180-4) producing a 512-bit (128 hex character) digest. It’s the same design as SHA-256 with 64-bit internal words instead of 32-bit, making it slightly faster on 64-bit hardware and yielding a larger output.

Output Format

SHA-512("hello world") = 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f9...

(128 hex characters total)

Where SHA-512 Is Used

  • JWT signatures — HMAC-SHA-512 is the HS512 algorithm
  • HMAC — for message authentication where 512 bits of output are wanted
  • File integrity for very large files — bigger digest, less collision risk
  • Some Linux crypt(3) password hashing variants ($6$...) — but bcrypt / Argon2 remain preferable

SHA-256 vs SHA-512

Both are secure. Practical differences:

  • SHA-512 is faster on 64-bit CPUs, slower on 32-bit
  • SHA-512 gives 512 bits of collision resistance vs 256 for SHA-256 — mostly overkill
  • SHA-256 has smaller output (compact when stored)

For most applications, SHA-256 is the default. Reach for SHA-512 when the protocol asks for it explicitly.

Generate SHA-512, SHA-256, and other hashes with the hash generator.

Check the SHA-256 glossary entry, the Argon2 entry, and the bcrypt entry for password use cases.