CPA on HWAES with CW308 and STM32F415

Hi guys,

I have been trying out “Lab 2_2 - CPA on Hardware AES Implementation.ipynb” in courses/sca201.

I am capturing the traces using Chipwhisperer Husky.

First I ran into some implementation issues, replacing

cpa_engines = [CpaEngine(“cpa_%02d” % i, leakage(i), guess_range) for i in range(16)],
session = Session(cw_container, engines=cpa_engines).run(batch_size=50)

with

cpa_engines = [CpaEngine(leakage(i), guess_range, name=“cpa_%02d” % i)for i in range(16)],

session = Session(cw_container, engines=cpa_engines, progressbar=False).run(batch_size=50)

I seem to have gotten it working, But I still could not recover the 16 bytes of the key.

Increasing the number of traces from 15000 to 30000, 8 of the 16 key bytes could be recovered.

the leakage model used is the Hamming Distance of the last round.

Is there something else, that should be done, to recover the entire key.

Thanks in Advance!

1 Like

Hi,

Have you tried following the advice in the lab of modifying the start and end parameters?

Hi,
Following is the correlation plot of the guesses, with 40k traces

There is one distinct peak around the 800-1000 range, so I tried adjusting the start to 800 and end to 1000, which doesn’t help with the key bytes of 0,4,8,12.

I tried to focus on the smaller peaks, but bumping the scope.gain.db to greater than 20 leads to ADC clipped errors in CW Husky.

Thanks!