MD4 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 MD4 algorithm is a cryptographic hash function designed to produce a fixed-size 128-bit hash value from input data of arbitrary length. It was developed to provide a fast and efficient method for generating message digests. MD4 operates through a series of transformations applied to the input data, producing a unique and deterministic hash output. The algorithm is structured in multiple rounds that process the input in 512-bit blocks.
Initialization
MD4 begins by initializing four 32-bit variables, commonly labeled as A, B, C, and D. These variables are set to predefined constants. The input message is then padded to ensure its length is a multiple of 512 bits. Padding involves appending a single "1" bit, followed by enough "0" bits, and finally adding a 64-bit representation of the original message length.
Processing Blocks
The padded message is divided into 512-bit blocks. Each block is further divided into sixteen 32-bit words. The algorithm processes each block through three rounds of operations, where each round consists of sixteen steps. Each step involves modular addition, bitwise logical operations such as AND, OR, XOR, and circular left shifts. The functions used in each round differ and are denoted as F, G, and H, providing nonlinearity and mixing of bits.
Round Functions
- F function: Combines variables using (X AND Y) OR ((NOT X) AND Z).
- G function: Combines variables using (X AND Y) OR (X AND Z) OR (Y AND Z).
- H function: Combines variables using XOR operation of three inputs.
Updating Variables
After processing each 512-bit block, the intermediate hash values stored in A, B, C, and D are updated by adding the results of the operations. This ensures that each block contributes to the evolving state of the hash. Once all blocks have been processed, the final concatenated value of A, B, C, and D forms the 128-bit MD4 hash digest.
Properties
MD4 is designed to be fast and efficient on 32-bit architectures. The algorithm is deterministic, meaning the same input will always produce the same output. It provides basic resistance to collisions and preimage attacks but is considered cryptographically weak by modern standards due to discovered vulnerabilities. MD4 remains historically significant as a foundation for subsequent hash functions such as MD5 and SHA-1.