3 ms·
Why can't a trusted compiler prevent side-channel attacks? All you need to do is prevent the code from accessing the side channel. It seems to me that doing t
by lisper 5y ago
Why can't a trusted compiler prevent side-channel attacks? All you need to do is prevent the code from accessing the side channel. It seems to me that doing this at compile time would actually be easier than doing it at run time.
- sfink 5y agoIt is easy. You just have to forbid access to timers and loops. Where "timers" include anything that can count and store the count in shared memory. Alternatively, you could forbid branches (and therefore loops, implicitly).
- lisper 5y agoI presume that was meant to be facetious? But a clock is not the thing you would prevent access to. The thing you would prevent access to is whatever it is you want to try to time using that clock.
- leni536 5y agoIf you can use a loop for timing then you can use an unrolled loop for timing too.
- GekkePrutser 5y agoBut if you forbid those things, what's left? Loops and branches are what code is made of.
- titzer 5y agoA key side-channel is execution time, and no, in general, you can't prevent a program from getting a clock. Even without a clock, one can construct one easily using shared memory and threads. Clocks are also easy to find. Even with low resolution clocks, timing differences can be amplified programmatically, making them observable.
- lisper 5y agoThe clock is not the thing you would prevent access to. The thing you would prevent access to is whatever it is you want to try to time using that clock.