3 ms·
Preventing Timing Attacks on String Comparison with Double HMAC Strategy (2015)
- ianopolous 5y agoNeat idea! Especially on jitted platforms where the jit is likely to introduce a timing side channel.
- dorianmariefr 5y agoso hash(input) == hash(secret) ?
- pornel 5y agoNo, `hash(hash(input)) == hash(hash(secret))`.
- justinsteven 5y agoNo, `hmac(key=key, message=input) == hmac(key=key, message=secret)` where key is either a static secret key for comparison purposes, or random for each comparison.
- rurban 5y agoUsing the timingsafe_memcmp C function would be faster and safer.
- iudqnolq 5y agoAs TFA says
- tatersolid 5y agoNot using C at all would be safer