MD4 hash generator
MD4 (RFC 1320, 1990) was Ron Rivest’s fast successor to MD2 and the first of the 32-bit “MD” designs. This MD4 hash generator computes its 128-bit digest for any text or file. MD4 matters mostly for historical and compatibility reasons: its structure inspired MD5, SHA-1 and RIPEMD, and it still appears inside a few older protocols.
Example
Input:
The quick brown fox jumps over the lazy dogMD4:
1bee69a46ba811185c194762abaeae90The MD4 digest of an empty string is 31d6cfe0d16ae931b73c59d7e0c089c0.
Algorithm at a glance
| Property | Value |
|---|---|
| Digest size | 128 bits (32 hex characters) |
| Block size | 512 bits (64 bytes) |
| Rounds | 3 rounds of 16 operations on 32-bit words |
| Designed | Ronald Rivest, 1990 (RFC 1320) |
| Status | Completely broken; RFC 6150 moved it to Historic status in 2011 |
Why MD4 is broken
Collisions in MD4 were found in the mid-1990s, and modern techniques generate them in a fraction of a second on an ordinary computer. Practical second-preimage attacks for some messages have been published as well. MD4 therefore provides no meaningful integrity protection against an attacker and must never be used for signatures, certificates or passwords.
Where MD4 still shows up
- NTLM. The Windows NT password hash is MD4 applied to the UTF-16LE encoding of the password. The NTLM Hash Generator does that encoding for you.
- eDonkey / eMule ed2k links, which identify files by MD4 digests of 9,500 KiB chunks.
- Older rsync versions, which used MD4 for block checksums before switching to faster and stronger options.
- Test suites for crypto libraries and forensic software.
From MD4 to MD5
MD5 was Rivest’s response to early concerns about MD4: it adds a fourth round, gives every step its own additive constant and changes the order in which message words are used. Those changes held off attacks for about a decade, but MD5 eventually fell to the same family of differential techniques. The table under the main result shows MD4’s descendants — MD5, SHA-1 and SHA-256 — for the same input, which makes the comparison easy.
Note on text encoding
This tool hashes text as UTF-8 bytes. Plain MD4 of UTF-8 text is not the same as an NTLM hash, which uses UTF-16LE. If you are comparing with a Windows or Samba value, use the NTLM tool instead.
For anything security-related, use SHA-256, SHA-3 or BLAKE2. Hashing runs locally in your browser.