ChipWhisperer NANO Power Trace Inconsistency Issue

Hi, I’m using a ChipWhisperer NANO to perform CPA (Correlation Power Analysis) on the PRESENT cipher, but I’ve noticed something weird. Every time I reconnect the CWNANO to the PC, the overall power trace changes a lot, even though I’m running the same script and encrypting the same plaintexts on the NANO. The power traces look like the following:

I’ve marked the zero line on the picture. It is easy to see that sometimes the power trace seems below the zero line, sometimes the power trace is wiggling around the zero line, and sometimes the power trace is above the zero line (the values are too large, making the higher values be clipped).

**I’m capturing the same device running the same code and encrypting the same plaintexts. ** I’m not sure why this is happening; this makes the CPA attack performance vary a lot.

Thanks in advance for replying!

Sounds like you’ve run into this issue; make sure your Nano firmware is 0.64.0 or later (scope.fw_version_str).

My Nano’s firmware is already at version 0.66.0, but the issue still isn’t solved.

As explained in the github issue linked above, the issue is that the phase relationship between the target clock and the ADC sampling clock isn’t consistent. Quoting from there:

You’ll have to call scope.reset_clock_phase() until you get traces that don’t clip. Unfortunately, I don’t think there’s a way to make the phase offset between the two clocks consistent.