Re:Storing Passwords in a Highly Parallelized World
by herge on Thursday January 07, 2016 @11:22AM
(#10858782)
On that topic, if it's raising an exception in the middle of testing the hash, could this permit a timing attack?
[ Parent
| on HN ]
Re:Storing Passwords in a Highly Parallelized World
by hynek on Thursday January 07, 2016 @11:40AM
(#10858908)
It isn’t raised in the middle of testing the hash. The testing is completely done in the Argon2 C library and the bindings raise an error if it returns an error. The Python library doesn’t do anything smart at all except calling C functions on strings.
Re:Storing Passwords in a Highly Parallelized World
by zaroth on Thursday January 07, 2016 @12:03PM
(#10859099)
Comparisons after hashing are naturally resistant to timing attacks, because you are not in direct control of the bytes being compared.
Just ask Bitcoin miners how hard it is to pick an input which results in a hash with a desired n-bit prefix.
But as a belt-and-suspenders you often see an attempt at fixed time comparisons of digests in any case.
Coincidentally, hashing before comparing can be used in scripting languages where the compare function will often be optimized out from under you, making constant time compare difficult or impossible to actually guarantee.