incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Jaquith (JIRA)" <>
Subject [jira] Commented: (JSPWIKI-20) Password hash should be salted
Date Wed, 28 Nov 2007 05:54:43 GMT


Andrew Jaquith commented on JSPWIKI-20:

128 bits ought to be plenty... it raises the workfactor by many many orders of magnitude.
It's not overkill, because the extra time needed to generate the longer salt doesn't really
cost us more than a few milliseconds. 

Your patch, coincidentally, appears to be pretty similar to what was proposed for WordPress:

Three comments on the patch itself:
1) We ought to modify the validatePassword() function so that the user's hash is automatically
upgraded to the salted version at the time of password check, rather than just at password
save/update time. That would allow for a nice, easy, transparent migration.
2) It seems pretty common-place, based on the WordPress example and some other examples I've
seen, simply to prepend the salt to the password hash rather than delimit it with a comma.
3) Salting the hash will absolutely break the "share logins with the container" feature, which
has been around since ~2.3,60 I think. I'm not wedded to that feature, but it is kind of nice
to have. (I may be the only person who uses it...)

Reason #3, in particular suggests that it might be better to wait on fixing this until 2.8.
That way, we could deprecate the "share logins with container feature" NOW (in 2.6) and remove
it entirely in 2.8.

> Password hash should be salted
> ------------------------------
>                 Key: JSPWIKI-20
>                 URL:
>             Project: JSPWiki
>          Issue Type: Improvement
>          Components: Authentication&Authorization
>    Affects Versions: 2.5.139-beta
>            Reporter: Janne Jalkanen
>            Assignee: Janne Jalkanen
>         Attachments: jspwiki-20.patch
> The password hash is calculated as a direct SHA1-digest of the password.  Unfortunately
this means that it's vulnerable to brute-force attacks - there are many web sites which store
SHA1 hashes of common passwords.  The key space in most languages is pretty small... So the
password should really be properly salted with preferably a long, random string.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message