mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Solar Designer <solar@openwall.com>
To: musl@lists.openwall.com
Subject: FreeSec DES-based crypt(3)
Date: Mon, 2 May 2011 17:43:33 +0400	[thread overview]
Message-ID: <20110502134333.GB18325@openwall.com> (raw)

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


             reply	other threads:[~2011-05-02 13:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-02 13:43 Solar Designer [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110502134333.GB18325@openwall.com \
    --to=solar@openwall.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).