google / safeside

Understand and mitigate software-observable side-channels
BSD 3-Clause "New" or "Revised" License
494 stars 54 forks source link

`TimingArray` with new API and threshold technique #114

Closed mmdriley closed 4 years ago

mmdriley commented 4 years ago

TimingArray is a new API and implementation for making it easy to induce and measure cache timing side-channels.

Differences from CacheSideChannel:

As a motivating example, I ported spectre_v1_pht_sa to use the new class (in part because it runs tests in CI). I also added a new test in CI for TimingArray that fails if it doesn't identify the cached value more than 85% of the time or if it ever identifies the wrong cached value.