SHA512/256 Hash Tool
Other Hash Generator
MD2 MD4 MD5 SHA1 SHA224 SHA256 SHA384 SHA512/224 SHA512/256 SHA512 SHA3-224 SHA3-256 SHA3-384 SHA3-512 RIPEMD128 RIPEMD160 RIPEMD256 RIPEMD320 WHIRLPOOL TIGER128,3 TIGER160,3 TIGER192,3 TIGER128,4 TIGER160,4 TIGER192,4 SNEFRU SNEFRU256 GOST GOST-CRYPTO ADLER32 CRC32 CRC32B CRC32C FNV132 FNV1A32 FNV164 FNV1A64 JOAAT MURMUR3A MURMUR3C MURMUR3F XXH32 XXH64 XXH3 XXH128 HAVAL128,3 HAVAL160,3 HAVAL192,3 HAVAL224,3 HAVAL256,3 HAVAL128,4 HAVAL160,4 HAVAL192,4 HAVAL224,4 HAVAL256,4 HAVAL128,5 HAVAL160,5 HAVAL192,5 HAVAL224,5 HAVAL256,5The SHA-512/256 algorithm is a member of the Secure Hash Algorithm 2 (SHA-2) family, designed to provide cryptographic hashing with high security. It produces a fixed output of 256 bits from an arbitrary-length input. SHA-512/256 is derived from SHA-512 but applies a truncated output, combining the internal state of SHA-512 with a different initial hash value to produce a shorter digest.
Initial Setup
The algorithm begins by defining initial hash values composed of eight 64-bit words. These initial values are carefully chosen constants derived from the fractional parts of the square roots of the first eight prime numbers. The message to be hashed is first padded to ensure its length is a multiple of 1024 bits. Padding consists of a single '1' bit, followed by zero bits, and finally a 128-bit representation of the original message length.
Message Processing
The padded message is divided into 1024-bit blocks. Each block is processed in sequence using a compression function. SHA-512/256 expands each block into eighty 64-bit words through a series of bitwise operations including shifts and rotations. These expanded words are then used in combination with sixty-four constant values for the main compression rounds.
Compression Function
During each of the eighty rounds, the algorithm updates eight working variables representing the hash state. Each round involves modular addition, logical functions (choice, majority), and bitwise rotations. The current block's expanded word and a round constant are combined with the working variables to produce new intermediate values. After all rounds are completed for a block, these values are added to the existing hash state.
Output Generation
After all message blocks are processed, the algorithm concatenates the first four 64-bit words of the final hash state. This truncation reduces the 512-bit internal state to a 256-bit digest while preserving strong cryptographic properties. The result is a fixed-length output that provides resistance to preimage, second preimage, and collision attacks.
Applications
SHA-512/256 is commonly used in digital signatures, integrity verification, and key derivation. Its truncated design maintains compatibility with systems requiring 256-bit digests while leveraging the security advantages of the 512-bit internal operations.