Closed x8-999-github closed 6 years ago
If by the best values you mean the peaks that leak the timing information, I find the best way to get used to a target is to try passwords with a incremented number of correct characters. Do this while you have persistence on the graph enabled, which allows you to visually identify the timing pattern the significant peaks.
This is not really real life as you would not normally know the password or implementation on a device. There you could try all letters for the first character and see if a portion of the trace changes significantly (a peak moving or appearing). It should only appear for one of the characters tried (the correct one).
I just described the process of arriving to the "interesting" variable you declared. SAD usually works pretty well for identifying the peak and if you can implement it mostly with numpy functions keeping a lot of the calculations in C that should speed up the calculations. I hope this helps!
While following the B3-I tutorial I found it quite hard to find the correct values. I tried different approaches that involved some kind of signal processing like find peaks but it all did not really work out for me. I ended up using a poor mans' SAD filter on the wave of interest. Using this the tutorial worked without much tweaking. Following the current tutorial has some merits for understanding the trace format but perhaps using a SAD filter is less effort in the end.
Here is my implementation