Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No. Adding noise to a signal increases the amount of filtering and the number of measurements you need to take. It doesn't eliminate the signals. The vulnerability is the signal; the fix --- a constant-time HMAC comparison function --- is to eliminate the signal.


So then is the fix as simple as removing the early "break;" statement from a strcmp?


Depends on the rest of the strcmp implementation. You might still leak information such as the number of correct characters if responding to a correct character takes a different amount of time than responding to an incorrect character. Ever played Mastermind? Same theory here.

Your best bet is to generate a huge body of inputs (including the relevant special cases), and tweak the code until it takes the same amount of time for all of them.


Number of chars would matter for plaintext passwords but not HMAC. You gain no more practical advantage knowing I used SHA1 or SHA256 HMAC. Yet another reason not to use plaintext passwords.


Perhaps the fix is to comment it out and explain why. ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: