LM-Hash
The LAN Manager password hash: DES-based, unsalted and trivially crackable
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–2007LAN Manager hash introduced with Microsoft LAN Manager
Windows NT adds the stronger NT hash alongside it
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
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| out | 16 | Output |
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]
nextssl_root_hash_with("lm-hash", NULL, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let digest = reg::hash_in(reg::all(), Policy::Any, "lm-hash", &Params::new(), b"abc")?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Similar names
Looking for something else?More hash functions
All 424Frequently 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).