|
|
|
|
|
by trebor
4047 days ago
|
|
No. A timing attack is used to determine the shared key that creates the HMAC. Because == and === (depending on the language) use memcmp(), the time of the comparison varies. EG: 36D5F4EA999342FED17D7488CB260FC92926
36D5F4EA999342FED18D7488CB260FC92926 The code would compare only up to the difference and return, indicating through the time spent analyzing the HMAC how many characters are the same. The attacker can then work the HMAC like they would a combination lock, till they reproduce the key used. That's why a constant time comparison is so important: it leaks far less information. |
|