# md5 vs md5(Unix)

## KAMIKAZE_

Hello. Does anybody know why md5 hash length is longer than md5(unix)? Is there any specification on md5(unix)? RFC1321 (regular md5) does not know anything about salt...

----------

## manaka

MD5 is a cryptographic hash algorithm. UNIX md5 password hashing is based upon MD5, but it's not MD5. It uses some techniques to be stronger. One of them is the use of a salt to make rainbow table attacks unfeasible.

As for the length, UNIX md5 strings are encoded in the [a-zA-Z0-9./] character set. The output of md5sum is encoded in the [0-9af] character set. That's why the output of the latter contains more characters.

You can find the specs of the password encryption function strings on the man page for crypt (man 3 crypt).

As for the actual algorithm, I guess the best way to know it would be searching for a paper that describes it. Or browsing the source code of the relevant files of glibc.

----------

## BitJam

LMGTFY

more details

----------

