[Freeciv-Dev] Re: Passwd auth with MD5 hash
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Trent Piepho (xyzzy@xxxxxxxxxxxxx) wrote:
> It was in the call to crypt(), except my crypt manpage says it uses a
> variation of DES not md5. Is crypt() portable to non-UNIX systems though?
> My manpage says that crypt will return a 13 character string, I think that
> it's the two character salt followed by a base64 encoded 64-bit hash value.
MD5 password hash support was bolted on in some of the more recently
developed Unix systems (*BSD, Linux, etc.). It uses the same call to
crypt(), but the magic "$1$" at the beginning of the salt signifies...
well, you can read for yourself:
If the salt starts with $1$ an MD5 based password hashing
algorithm is applied. The salt should consist off $1$ fol
lowed with eight characters.
(That's from the Linux man page. IIRC, the OpenBSD one is *much* more
thorough, and includes a third hash algorithm as well.)
Needless to say, the presence of an MD5 hash algorithm in crypt() is
*not* very portable even across Unix systems, let alone non-Unix.
--
Greg Wooledge | "Truth belongs to everybody."
greg@xxxxxxxxxxxx | - The Red Hot Chili Peppers
http://wooledge.org/~greg/ |
pgpzYytcjVGZi.pgp
Description: PGP signature
|
|