makyo/ideawheel — pull request #27 by jculpon (2013-09-25 07:28:55+00:00)
Title: Use to timing-independent comparision for comparing password hashes

Comparing password hashes with normal string equality can leak timing
information which exposes which part of the hash mismatches. While this is
not as bad as directly leaking information about the password, it can be
useful in making it easier to reject candidate passwords during an online
guessing attack.

The timing-independent comparison I used is based on Nate Lawson's
suggestion for KeyCzar, originally posted here:
https://groups.google.com/forum/#!topic/keyczar-discuss/VXHsoJSLKhM
and further discussed here:
http://rdist.root.org/2010/01/07/timing-independent-array-comparison/