3 ms·
No, it only makes it take longer to get the underlying secret. Timing attacks are already dealing with "noisy" data, task scheduling et al, so they all boil do
by pwagland 2y ago
No, it only makes it take longer to get the underlying secret.
Timing attacks are already dealing with "noisy" data, task scheduling et al, so they all boil down to some level of statistical analysis on the response times. Adding noise to that slows you down, but the underlying bias on the timings is still there.
- ozim 2y agoSo in practice it prevents the attack as real world attackers have limited resources and try to find easier targets.
- saagarjha 2y agoThat’s what everyone says until they realize they understated the costs to attempt such an attack.
- ozim 2y agoThat's true if you host wordpress or joomla or something that is widely used that would have timing attack, because then someone will automate it for sure. If you have your custom web app I don't think anyone will bother unless you are bank or something.
- GoblinSlayer 2y agoSo you need to compute this statistics and add just the right delay to even out the bias.
- saagarjha 2y agoAt that point you’ve implemented a constant-time algorithm.
- Alex-Programs 2y agoIt works quite well in practice though. I wonder if you could make an ergonomic library for it. Just add a macro to a function and it'll keep track of how long past executions took to execute and add artificial delays to ensure all subsequent executions are at least that long. If they're longer, extend the minimum time by 2x. Perhaps apply an AIMD algorithm to it? Though there's still room for exploitation there, it'd just take a lot longer to find. Just letting the programmer specify the minimum time might be better in practice.
- endofreach 2y agoGood luck explaining CEO / PM you need slower response times.
- dotancohen 2y ago"It's a security measure" would be a very convincing line for a slower response time on a single, infrequent action that the user takes.
- GoblinSlayer 2y agoIt can be implemented once, by, say, nginx and enabled by a devops instead of every random outsourced java webapp.