mailing list of musl libc
 help / color / mirror / code / Atom feed
* FreeSec DES-based crypt(3)
@ 2011-05-02 13:43 Solar Designer
  2011-05-02 13:49 ` Rich Felker
  0 siblings, 1 reply; 5+ messages in thread
From: Solar Designer @ 2011-05-02 13:43 UTC (permalink / raw)
  To: musl

Rich, all -

musl uses a DES-based crypt(3) implementation called FreeSec - the same
one that *BSD's use.  Unfortunately, its handling of invalid salt
strings (with characters other than from the defined base-64 alphabet)
differs from UFC-crypt's (which is standard in glibc) to an extent far
greater than desired (yes, some deviations from UFC-crypt are in fact
desired, in my opinion).  Also, this may have security implications
(yes, *BSD's are sort of affected) where lots of different invalid salts
are treated as just one.  This may affect e.g. some web apps that use
PHP's crypt() improperly (their fault, but still).

Thus, I propose that you replace the code in musl with my revision of
it, which has the above issues corrected:

http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/glibc/

The files are crypt_freesec.c and crypt_freesec.h.  These are also used
in PHP 5.3.x, so they receive a lot of testing.

Another issue is that somehow the speed of your FreeSec code in musl is
extremely poor - it runs about 50 times slower than expected (e.g., than
it does in glibc on Owl).  This is as tested with "john --test
--format=crypt" with JtR 1.7.7 on x86_64.  I suggest that you run this
test too, both before and after you replace the FreeSec code.

Alexander


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-23 12:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02 13:43 FreeSec DES-based crypt(3) Solar Designer
2011-05-02 13:49 ` Rich Felker
2011-05-02 18:03   ` Solar Designer
2011-05-02 19:01     ` Rich Felker
2011-05-23 12:50       ` Solar Designer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).