Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 19 Aug 2012 20:51:28 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Help-wanted tasks for musl

On Sun, Aug 19, 2012 at 07:29:21PM +0200, Szabolcs Nagy wrote:
> * Szabolcs Nagy <nsz@...t70.net> [2012-08-19 18:56:52 +0200]:
> > 3)* reference implementation and glibc accepts negative
> > rounds in an implementation defined way, ie.
> > 
> >   '$5$rounds=-4294965296$' is treated as
> >   '$5$rounds=2000$' on a 32bit system and as
> >   '$5$rounds=999999999$' on a 64bit one
> > 
> > (according to spec N is clamped into 1000...999999999
> > so the correct treatment would be '$5$rounds=1000$')
> > 
> 
> i was wrong here about the correct treatment
> 
> the spec says that N is an unsigned decimal so negative
> numbers must not be recognized at all
> (so in this case the default rounds should be used and
> 'rounds=-4294965296' should be treated as salt)
> 
> but i guess the spec does not matter much in this case,
> either we should be bug compatible with glibc or reject
> such salts

The characters '=', '-', and '$' are not valid in salt, are they?
My preference would be to reject anything that looks like a setting
but actually gets treated as salt, rather than hashing it in some
implementation-specific way that leads to buggy, non-portable password
hashes.

Rich

Powered by blists - more mailing lists

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