3 ms·
Very interesting, and something I'd never considered before. Instead of going to the effort of making the function run in a constant time, might adding a small
by davnicwil 11y ago
Very interesting, and something I'd never considered before.
Instead of going to the effort of making the function run in a constant time, might adding a small random delay before it returns also mitigate against this type of attack?
- dustcoin 11y agoThe noise could be filtered out with enough samples, so this mitigation only increases the number of attempts required and does not prevent the attack.
- deleted 11y ago[deleted]
- deleted 11y ago[deleted]
- briholt 11y agoBest practice is to hash the password. This is good for a lot of reasons, one of which is that the time to compare hash("hunter") vs hash("hunter2") vs hash("hunter21") does not correlate in any meaningful way. https://en.wikipedia.org/wiki/Hash_function https://en.wikipedia.org/wiki/Hash_function
- Dylan16807 11y agoAnd it gets even worse than that, in certain environments the fact that it takes more energy to flip a transistor than to keep it on the same output can leak information. Noise technically mitigates, but it's like covering your unlocked safe with a cardboard box.