Analyzer CPA does not work with more than 11000 (+/-) traces

Hey, I have checked more than once that the chipwhisperer analyzed CPA does not work properly when more than 11.000 traces (aproximately) are used. The next pics show what happens:

image
image

It always happens when arriving to the same trace quantities and it keeps happening if you add more traces to the CPA calculations.

Thanks for the report on this. I’m not sure how this happened, as we’ve avoided touching the analyzer part of the code too much. Anyway, while we track down this issue, I’d recommend using the LASCAR or SCARED analysis libraries for large amounts of traces, as they’re much faster.

Alex

This has been fixed on the latest develop commit. Basically, there was a floating point precision issue that occurred when the denominator in the correlation calculation got too large. For now we’re just casting to long double, so the issue should at least be pushed back to a later trace.

Alex

If I copy the file from github will be solved then?

It should be. The file is software/chipwhisperer/analyzer/attacks/cpa_algorithms/progressive.py

Thank you so much!! I’ll try later