HAVAL160,3 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,5 

The HAVAL-160/3 algorithm is a cryptographic hash function designed to produce a fixed-length 160-bit output from an arbitrary-length input. It belongs to the HAVAL family of hash functions, which are distinguished by variable output sizes and configurable numbers of passes. HAVAL-160/3 specifically uses three passes in its internal compression process, providing a balance between computational efficiency and resistance to cryptographic attacks.

Input Processing

The input message is first padded to ensure its length is a multiple of 1024 bits. Padding consists of a single 1 bit followed by enough 0 bits to reach the required length, and the length of the original message is appended as a 128-bit value. This ensures proper alignment for block processing and preserves the message length for collision resistance.

Internal Structure

HAVAL-160/3 operates on 1024-bit message blocks, which are divided into thirty-two 32-bit words. The algorithm maintains eight 32-bit working variables that are initialized to predefined constants. During each of the three passes, the algorithm applies a sequence of non-linear functions, bitwise operations, and modular additions on the working variables. Each pass consists of thirty-two rounds, where each round modifies the working variables based on the current message word, constants, and the results of previous rounds.

Compression Function

The core of HAVAL-160/3 is its compression function, which combines message-dependent transformations and non-linear Boolean functions. Each pass uses a distinct Boolean function that mixes the input bits to achieve diffusion. The result of each pass is used as input for the next pass, progressively blending the message bits and internal state. The combination of three passes ensures that output bits depend on every bit of the input message, providing avalanche effect and preimage resistance.

Output Generation

After all passes are completed, the final state of the working variables is concatenated to form a 160-bit digest. The algorithm truncates the internal 256-bit state to the required output length, ensuring compatibility with the 160-bit specification. The resulting hash value is deterministic, meaning identical input messages produce identical outputs, and it is computationally infeasible to reverse or find collisions within the hash function under current cryptographic assumptions.

Security Considerations

HAVAL-160/3 is designed to resist standard cryptographic attacks including collision, preimage, and second-preimage attacks. Its three-pass configuration offers moderate security while maintaining efficient computation compared to higher-pass variants. The design allows for fast implementation on both software and hardware platforms, making it suitable for applications requiring secure message integrity verification and digital signatures.