4 ms·
Because if the attacker can observe how long the software takes, that can open you up to timing side channel attacks. The most obvious example is if you compar
by wongarsu 4y ago
Because if the attacker can observe how long the software takes, that can open you up to timing side channel attacks.
The most obvious example is if you compare a user-supplied secret with a stored secret, the naive `for i in 0..min(len(a), len(b)) { if a[i] != b[i] return false } return true` will take longer the more of the first letters you guessed correctly. By averaging lots of tries, even tiny differences can be measured even over the internet.
Real crypto code takes some pains to ensure that you can't observe secrets from timing information, but it can only ensure that on the level of assembly instructions. If the CPU messes with timing on the level beyond that, that could open up vulnerabilities.
- ltbarcly3 4y agoVery interesting!!