How Many Bytes Is The Output Of An Lm Hash

7 min read

How Many Bytes Is the Output of an LM Hash

The LM hash is one of the oldest password hashing mechanisms used in the history of Windows operating systems. A common question that arises when studying legacy authentication protocols is how many bytes is the output of an LM hash. The answer is straightforward: the output of an LM hash is always 16 bytes, which equals 128 bits. This fixed-length output has become a defining characteristic of the LM hash algorithm and is essential knowledge for anyone working with password security, digital forensics, or Windows authentication internals Easy to understand, harder to ignore..

What Is an LM Hash

The LAN Manager (LM) hash was developed by IBM in the early 1980s and later adopted by Microsoft as the default password storage method in Windows 3.1, Windows 95, Windows 98, and early versions of Windows NT. It was designed for compatibility with the LAN Manager network operating system. Day to day, the LM hash algorithm takes a user's plaintext password, processes it through a series of steps, and produces a fixed-length hash value that is stored in the Windows SAM (Security Account Manager) database or in NTDS. DIT on domain controllers Turns out it matters..

Understanding the LM hash is still relevant today because legacy systems, older Windows deployments, and forensic investigations frequently encounter this hash type. Even modern Windows versions retain LM hash storage for backward compatibility, though it is typically disabled by default Simple, but easy to overlook. That's the whole idea..

The Size of an LM Hash Output

So, how many bytes is the output of an LM hash? The answer is 16 bytes. In hexadecimal notation, this appears as 32 characters because each byte is represented by two hexadecimal digits.

AAD3B435B51404EEAAD3B435B51404EE

We're talking about a classic representation of an LM hash for an empty or null password. The output is always exactly 16 bytes long, regardless of the length of the input password. Whether the password is one character or 14 characters, the LM hash will produce the same fixed 16-byte output size Took long enough..

Why 16 Bytes

The LM hash algorithm was designed to split the password into two 7-character halves before hashing. Each half is then converted to uppercase, padded with null characters if it is shorter than 7 characters, and encrypted using the DES (Data Encryption Standard) cipher. Since DES produces a 64-bit (8-byte) output block, hashing two halves results in a total of 16 bytes.

Here is the breakdown:

  • First 7 characters → DES encryption → 8 bytes
  • Second 7 characters → DES encryption → 8 bytes
  • Total output → 8 + 8 = 16 bytes

Even if the password is shorter than 14 characters, the algorithm pads the unused character slots with nulls before processing. If the password exceeds 14 characters, the remaining characters are simply ignored Worth keeping that in mind..

How the LM Hash Algorithm Works

To fully appreciate why the output is 16 bytes, it helps to understand the step-by-step process of the LM hash algorithm.

  1. Convert to uppercase: The entire password string is converted to uppercase letters. This means the LM hash is case-insensitive by design.
  2. Split into two 7-character halves: The password is divided into two parts. If the password is shorter than 14 characters, it is padded with null characters to reach the required length.
  3. DES encryption: Each 7-character half is used as a key to encrypt a fixed 8-byte value (the string "KGS!@#$%"). DES encrypts this constant value using the password half as the key.
  4. Concatenate results: The two 8-byte DES output blocks are joined together to form the final 16-byte LM hash.

This process ensures that the output is always exactly 16 bytes long. The use of DES, a symmetric block cipher that outputs 64-bit blocks, is the fundamental reason behind this fixed size.

LM Hash vs NTLM Hash

It is important to distinguish the LM hash from the NTLM hash, which replaced it as the default in Windows NT and later versions. The NTLM hash uses the MD4 hashing algorithm instead of DES, and its output is 16 bytes as well, but for a different reason Most people skip this — try not to..

  • LM hash: 16 bytes (128 bits) via DES
  • NTLM hash: 16 bytes (128 bits) via MD4

Both produce a 16-byte output, but their internal mechanisms are entirely different. The NTLM hash does not split the password into halves, does not convert to uppercase, and does not use padding. It simply encodes the UTF-16LE representation of the password and passes it through MD4, which outputs a 128-bit digest.

Despite both being 16 bytes, the LM hash is considered significantly weaker than the NTLM hash due to its design flaws.

Security Implications of the Fixed 16-Byte Output

The fact that the LM hash always outputs 16 bytes contributes to several security weaknesses:

  • Case insensitivity: Because the algorithm converts everything to uppercase, "Password" and "PASSWORD" produce the same hash.
  • Fixed-length input handling: Passwords longer than 14 characters are truncated, so "Password12345" and "Password123456789" produce identical hashes.
  • DES vulnerability: DES is now considered cryptographically broken and can be brute-forced relatively quickly with modern hardware.
  • No salt: The LM hash does not use a salt, meaning identical passwords will always produce identical hashes across different accounts.

These weaknesses make the LM hash unsuitable for modern security requirements. The outcome? Microsoft has deprecated its use, and administrators are encouraged to disable LM hash storage through Group Policy.

How Many Bytes Is the Output of an LM Hash in Practice

In real-world scenarios, you will encounter LM hashes in the following contexts:

  • Windows SAM files: The local SAM database stores LM hashes alongside NTLM hashes.
  • NTDS.DIT on domain controllers: Active Directory stores both hash types for backward compatibility.
  • Pass-the-Hash attacks: Attackers who obtain LM hashes can use them in authentication relay or pass-the-hash techniques.
  • Password cracking tools: Tools like Hashcat, John the Ripper, and Cain & Abel support cracking LM hashes.

When viewing an LM hash in a hex editor or forensic tool, it will always occupy exactly 16 bytes of space. If you see a hash that is longer or shorter than 16 bytes, it is not an LM hash The details matter here. But it adds up..

Frequently Asked Questions

Is the LM hash still used today? LM hashing is deprecated and disabled by default in modern Windows versions. On the flip side, some legacy systems and misconfigured environments may still store or transmit LM hashes.

Can an LM hash be longer than 16 bytes? No. The LM hash algorithm always produces a fixed 16-byte output. Any variation in length indicates a different hash type.

Why does the LM hash use DES? DES was the standard symmetric encryption algorithm at the time LM was designed. It produces 64-bit (8-byte) output blocks, which is why the LM hash ends up being 16 bytes after processing two halves.

How does the LM hash compare to MD5 or SHA-256? LM hash produces 16 bytes, while MD5 produces 16 bytes and SHA-256 produces 32 bytes. Even so, MD5 and SHA-256 are one-way hash functions, whereas LM uses a reversible encryption approach with DES.

Can I convert an LM hash to an NTLM hash? No. They are computed independently from the plaintext password. You would need to crack the LM hash to recover the password, then re-hash it using NTLM to get the corresponding NTLM hash.

Conclusion

The output of an LM hash is always 16 bytes (128 bits). This fixed size comes from the algorithm's use of DES encryption on two 7-character password halves, each producing

each producing an 8-byte encrypted block, resulting in a total of 16 bytes. This fixed length remains a critical identifier for forensic analysts and security professionals when examining legacy Windows systems. Now, while the LM hash's structure was once innovative, its cryptographic simplicity now serves as a cautionary tale about the evolving landscape of password security. Modern alternatives like NTLMv2, bcrypt, and Argon2 not only increase output sizes but incorporate salts, adaptive work factors, and resistance to GPU-based attacks—rendering brute-force impractical and ensuring identical passwords generate unique hashes.

Conclusion

The LM hash's rigid 16-byte output reflects its mid-1980s design philosophy, prioritizing speed over security in an era without advanced computing threats. Today, this fixed size is merely a fingerprint of obsolescence, signaling systems requiring immediate remediation. As organizations increasingly adopt zero-trust architectures and passwordless authentication, understanding historical artifacts like LM hashing underscores a broader imperative: security must evolve with technology. Migrating to modern hashing algorithms isn't just a technical upgrade—it's a fundamental shift toward resilience, where password storage is no longer a predictable target but a dynamic shield against sophisticated adversaries Not complicated — just consistent..

New Additions

What's New Today

Parallel Topics

Follow the Thread

Thank you for reading about How Many Bytes Is The Output Of An Lm Hash. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home