Understanding Power Trace

Hi,
I am a newbie. I got a chipwhisperer to learn about side-channel attacks. I have been going through a couple of tutorials. I am a bit confused with the power trace graph (For example, manual CPA attack tutorial). What is exactly we seeing in Y vs X-axis in the power trace plot? X-axis looks sample number. Is Y plotting current or voltage? If X is actually sample number how to convert that to time?

I am sorry if all this sounds trivial. But actually trying to understand it!

Thanks!

Hi Liam,

The Y axis in this case is basically a value that’s proportional to the current going through the shunt resistor. It’s best to limit to this because there’s a lot of steps between that current value and what shows up on your screen and the direct conversion isn’t typically that useful. Also keep in mind that this value is AC coupled, meaning you won’t pick up the constant current draw of the device, only rapid changes.

You’re correct that the X axis is sample number. If you want to convert to time, it’s fairly simple, it’s just the number of samples divided by the ADC clock, which is 4*7.37MHz for most of the tutorials.

Let me know if you want me to clarify anything or if you have any other questions.

Alex

1 Like

Hello Alex,
Thanks for the response.

Alright, if I get it correctly Y axis showing values proportional to the current going through the shunt resistor. Can you help me get those analysis/steps (any reference materials would be great!) in between the current and values I am seeing in the screen for Y axis?

Another thing, is there any advantage collecting the power trace from SHUNTL pin and NOT from SHUNTH (UFO board with XMEGA target)? If so then what is it.

Thanks a lot again!

Hi Liam,

The path should look something like this: Vmeas = -current * Rshunt * gain. Vmeas is then digitized into (I believe) a 10 bit value. This maps to +/-0.5 in your graph, so in total the plot should go between +/-0.5 * current * Rshunt * gain. I’m not sure if there’s any additional gain on top of what is set in the CW software, so that value’s a bit of an unknown.

The high side of the shunt resistor (SHUNTH) you can consider to be a very stable voltage, meaning the AC component of its voltage is close to 0. When you measure SHUNTL, what you’re really doing is the following (since everything is AC coupled):

V_SHUNTL_AC = V_SHUNTH_AC - R_shunt * I_shunt_AC = 0 - R_shunt * I_shunt_AC

If you measure SHUNTH, you’ll just end up with 0 (or close to it)

Alex

2 Likes