Hash functions

LM-Hash

The LAN Manager password hash: DES-based, unsalted and trivially crackable

broken Root API only
Broken tier.

Practical attacks exist. Present for compatibility and research only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About LM-Hash

LM-Hash is a cryptographic hash function from the LM hash family. It produces a 16-byte (128-bit) output. Its registry entry cites MS-NLMP (LMOWFv1). It is also known as lanman-hash and lmowfv1. NextSSL lists it in the broken tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

Overview

The LM hash is the password hash used by Microsoft LAN Manager and early Windows versions. It is fundamentally insecure and is included only so that legacy credential stores can be analysed and migrated.

To compute an LM hash, the password is converted to uppercase, padded or truncated to 14 bytes and split into two 7-byte halves. Each half is expanded into a 56-bit DES key, which is used to encrypt the constant string "KGS!@#$%". The two 8-byte ciphertexts are concatenated into a 16-byte hash. There is no salt and no iteration.

This construction reduces the search space to two independent 7-character uppercase passwords, and identical passwords always produce identical hashes. Windows disabled LM hash storage by default from Vista onwards, but it still appears in old domain controllers and in NTLM protocol analysis. The algorithm is described in Microsoft's MS-NLMP specification as LMOWFv1.

History

1987–2007
  1. LAN Manager hash introduced with Microsoft LAN Manager

  2. Windows NT adds the stronger NT hash alongside it

  3. Windows Vista stops storing LM hashes by default

Security notes

LM hashes are broken: the entire keyspace can be searched or precomputed with rainbow tables in minutes on ordinary hardware. Never use LM to store or protect passwords.

Typical uses

Auditing legacy Windows credential storesNTLM protocol research and testing

Sizes

FieldBytesMeaning
out16Output

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'broken' is reachable from the root API only
digest = root.call("hash_with", "lm-hash", None, b"abc")[0]

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Frequently asked questions

What is LM-Hash?

LM-Hash is a hash in the LM hash family. The LM hash is the password hash used by Microsoft LAN Manager and early Windows versions. It is also known as lanman-hash, lmowfv1.

What are the LM-Hash sizes?

In NextSSL, LM-Hash uses: output 16 bytes.

Which standards define LM-Hash?

LM-Hash is referenced by MS-NLMP (LMOWFv1).

Is LM-Hash safe to use?

LM-Hash is in the broken tier. Practical attacks exist. Present for compatibility and research only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).