3 ms·
We hash the password using pbkdf2. The actual code looks like this: crypto.pbkdf2(text, salt, ITERATIONS, BYTES, function... ITERATIONS is 1000, and BYTES is
by jgruber 12y ago
We hash the password using pbkdf2. The actual code looks like this:
crypto.pbkdf2(text, salt, ITERATIONS, BYTES, function...
ITERATIONS is 1000, and BYTES is 32.
Our code is descended from the code on this page: http://www.thejoyofcode.com/Exploring_custom_identity_in_Mobile_Services_Day_12_.aspx http://www.thejoyofcode.com/Exploring_custom_identity_in_Mob...
- tptacek 12y agoThat's great; it's the answer I quietly predicted I'd get. If you're communicating to laypeople, you can say something like "we use a modern secure password hash".
- zaroth 12y agoNote, if your crypto.pbkdf2() is using SHA1 underneath, then 1,000 interations of SHA1 is very little computation for a GPU, which can do billions of SHA1 per second. Also, asking for 32 bytes from PBKDF2-HMAC-SHA1 has some bad side-effects, particularly if you are splitting up the result. (1Password got bitten by this, and wrote up the issue here: http://blog.agilebits.com/wp-content/uploads/2013/07/playing-defense.pdf http://blog.agilebits.com/wp-content/uploads/2013/07/playing...)