Earlier quoted context omitted.
That sounds like fuzzy scare-mongering to me. 1) You should not invent your own algorithm. That's a given. That's why you use bcrypt/scrypt. 2) It's not abusing the algorithm, it's using a longer salt (in the concatenation case). 3) There's nothing wrong with nesting algorithms (just remember to use hex/base64 encodings, not binary). For example Facebook passes passwords through half a dozen algorithms. They call it…
Your second point might be dangerous - your salt values are no longer random but heavily biased and knowing that all salt values share some common bits might provide a new attack vector.
Slack was hacked
231–240 of 526 posts
Re: Slack was hacked
#232Earlier quoted context omitted.
Please do not do it: http://stackoverflow.com/questions/16891729/best-practices-s...
That sounds like fuzzy scare-mongering to me. 1) You should not invent your own algorithm. That's a given. That's why you use bcrypt/scrypt. 2) It's not abusing the algorithm, it's using a longer salt (in the concatenation case). 3) There's nothing wrong with nesting algorithms (just remember to use hex/base64 encodings, not binary). For example Facebook passes passwords through half a dozen algorithms. They call it…
salt = urandom(16)
pepper = "oFMLjbFr2Bb3XR)aKKst@kBF}tHD9q"
# or, getenv('PEPPER')
hashed_password = scrypt(password, salt + pepper)
store(hashed_password, salt)
That is an algorithm, which composes bcrypt with pepper.The idea of not using key-rotation alone is insane, but lets just focus on your last point
Also, I'm confused at how the proposed alternative would be harder to get wrong
Really? AES literally has hardware support, and can be done in a single call, and has been studied for years. How can that reasonably be considered "harder" to get wrong than something proposed by some random guy on the interwebs?Outside of Peer-Review, what reason would anyone have to use the pepper scheme? As others have posted, there are several community members who's opinions do matter due to extensive research and body of work
Re: Slack was hacked
#233Earlier quoted context omitted.
If I set bcrypt cost to 11, hashing takes 0.1 seconds . At 12, it takes 1 second roughly. Setting it to anything higher leaves my service open to Denial-of-Service attacks, so I'm very hesitant to increase the cost factor. To you have a credible source for the "10..12 is too low for 2015" claim? HHVM 3.6 on a small Ubuntu server
You have either a very slow server or a very bad bcrypt implementation. Running bcrypt in python on my 5 year old server has these results: >>> timeit.timeit("bcrypt.hashpw('this is a password', bcrypt.gensalt(11))", setup="import bcrypt", number=5) / 5 0.13497538566589357 >>> timeit.timeit("bcrypt.hashpw('this is a password', bcrypt.gensalt(12))", setup="import bcrypt", number=5) / 5 0.28287739753723146 >>> timeit.t…
Good thing you made me re-measure :) That makes 13 my new bcrypt default.
Re: Slack was hacked
#234Earlier quoted context omitted.
Please do not do it: http://stackoverflow.com/questions/16891729/best-practices-s...
so the downsides are "it's not maintanable" and "don't roll your own crypto". I think they are negligible compared to the upsides.
Re: Slack was hacked
#235Earlier quoted context omitted.
passwordHash = bcrypt(salt + password) encryptedHash = encrypt(passwordHash, pepper) This way you can rotate your pepper by doing: decryptedHash = decrypt(encryptedHash , oldpepper) encryptedHash = encrypt(decryptedHash , newpepper)
Excuse my ignorance, but you probably shouldn't be able to reverse an irreversible hash.
Re: Slack was hacked
#236Earlier quoted context omitted.
passwordHash = bcrypt(salt + password) encryptedHash = encrypt(passwordHash, pepper) This way you can rotate your pepper by doing: decryptedHash = decrypt(encryptedHash , oldpepper) encryptedHash = encrypt(decryptedHash , newpepper)
Excuse my ignorance, but you probably shouldn't be able to reverse an irreversible hash.
Re: Slack was hacked
#237Re: Slack was hacked
#238is there anything that slack does you can't do with skype? I find lot of these new startups are just creative ways of reinventing the wheel and convincing you need it to appear cool & hip....kind of like fashion for high schoolers
Re: Slack was hacked
#239Re: Slack was hacked
#240Earlier quoted context omitted.
Your second point might be dangerous - your salt values are no longer random but heavily biased and knowing that all salt values share some common bits might provide a new attack vector.
Is this true? I would think that static bits are no more dangerous than not having the bits at all.