Hi all,
I've posted the same mail in different thread.
hash_compare() may only compare hashed values as the function
name imply. If length differs, it may return FALSE simply. (As well as
wrong type)
This way, we don't have to worry about length leak and constant operation.
Hash string length is not a secret. If user have 'raw data' (e.g. raw
password,
etc) to compare, make them apply hash function first.
This achieves constant comparison (result |= *known++ ^ *user++;) and gets
rid
of length leak issue.
Regards,
--
Yasuo Ohgaki
[email protected]