IT lexicon › Security › Unix crypt

Unix crypt

Security På svenska → Updated: 2026-10-12

The password hash Unix used for decades: built on DES, limited to eight characters, and something nobody wants back.

Robert Morris and Ken Thompson created crypt(3) in 1979. The algorithm took a password of at most eight characters, used it as the key for a modified DES encryption of an all-zero block, and mixed in a 12-bit salt. The result was stored in /etc/passwd, which everyone could read.

The salt was a good idea, and it became standard. The rest was less good: eight characters and a DES core made passwords easy to crack with wordlists once computers got faster. Unix crypt was gradually replaced by MD5-crypt, bcrypt and similar schemes, and modern systems keep hashes in shadow files using deliberately slow functions.

← Back to the lexicon