On Jul 31, 2009, at 3:33 AM, olivier wrote:

>>
>> I'd prefer some less-predictable salt than the suggestion below,
>> though. How about the old Unix passwd trick of choosing a some random
>> salt, and appending the salt in plaintext to the hash?
>
> we could do that, without braking backward compatibility i think...
> - store password in the following format:   hashtype$salt
> $passwordhash  (with '$' separators, pretty standard stuff...)
>
> to authenticate user:
> - add a special case:   if no hashtype:  passwordhash -> md5$
> $passwordhash
> - use hashtype(password + salt),  for most of the standard hashtypes
> (md5, sha1, sha256, ...)
> (- do other weird stuffs...  like add a special hashtype bottiger,
> bottiger$$passwordhash   will use the function md5( f(password) ) , f
> being a deterministic function ) ;-)
>
> we could add a special attribute for migration. if set to True, then
> storage is migrated from the old format to the new format when user
> logs in
> the length of the salt can also be a parameter (if you really want to
> play with some trade-off between storage/security, bad idea)
>
> i can work on that, if it makes sense to you guys

It makes sense to me.

We might also want to require a strong password by default (if we're  
not already), which would also be backward compatible. I was writing  
up a separate message on tightening up password security generally;  
I'll send it shortly.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to