LM hash
The LAN Manager password hash: DES-based, unsalted and trivially crackable
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
Variants in NextSSL
1| Algorithm | Tier | Sizes (bytes) | Standards | API |
|---|---|---|---|---|
| LM-Hash lm-hash |
broken | out 16 | MS-NLMP (LMOWFv1) | root |
Frequently asked questions
Which LM hash variants does NextSSL include?
NextSSL registers 1 LM hash variant: lm-hash.