passwords - bcrypt -- keeping up with Moore's law -
this question has answer here:
- optimal bcrypt work factor 1 answer
i'm using bcrypt store passwords in database, using work factor of 7, takes 0.02s hash single password on reasonably modern laptop.
coda hale says using bcrypt allows 'keep moore's law' tweaking work factor. there's no way re-encrypt user's password, since i'm not storing plaintext. how can keep database up-to-date , difficult crack (assuming hangs around 5+ years take become issue)?
re-encrypt on login. see optimal bcrypt work factor.
remember value stored in password:
$2a$(2 chars work)$(22 chars salt)(31 chars hash)
. not fixed value.if find load high, make next time log in, crypt faster compute. similarly, time goes on , better servers, if load isn't issue, can upgrade strength of hash when log in.
the trick keep taking same amount of time forever future along moore's law. the number log2, every time computers double in speed, add 1 default number...
Comments
Post a Comment