Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 15 Nov 2011 06:35:02 +0400
From: Solar Designer <>
To:, Nolan Lum <>
Subject: weird crypt-sha* in DragonFly BSD


Matthew - when I read that DragonFly moved to using SHA-256 for
passwords by default, I thought this was referring to the SHA-256 based
flavor of Ulrich Drepper's SHA-crypt.  This would not be the best choice
to make, in my opinion, but it would not be that bad.  However, I just
found this:

Are these crypt-sha256.c and/or crypt-sha512.c files actually in use?
I hope not...  They do not include any password stretching, resulting in
password hashes that are much quicker to crack than MD5-crypt's.

There's also minor weirdness in the code - such as two local pointer
variables being declared static seemingly for no reason, and only
"final" but not "ctx" being zeroized in the end.  But even this lack of
proper cleanup is very minor compared to the lack of stretching.

Oh, also the "$3$" prefix was apparently previously used for NTLM:

"FreeBSD used the $3$ prefix for this."

"... crypt string must consist of "$3$$" (note the extra "$") followed
by the hash in lowercase hexadecimal."

BTW, I looked at DragonFly's code while analyzing a more subtle issue
with Ulrich's SHA-crypt:

I thought that maybe you reimplemented it in a better fashion avoiding
that issue, but I found this... %-)


Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.