CW Runtime warning: invalid value encountered in true_divide

Hello,

We are trying to attack Arduino that is connected to a sensor. We are using CW-Lite. The data from the sensor are encrypted inside Arduino and we sent both the input and the encrypted data to CW so that it has all the information to perform an attack. However, we get this runtime warning and the key is never recovered.

Runtime warning: invalid value encountered in true_divide
diffs[key] = sumnum / np.sqrt(sumden)

Could anyone please help us solve this problem?

Thanks in advance.

IIRC that message is a red herring. It usually pops up at the beginning of a CPA attack when the internal values in the correlation calculation are small.

Alex

Thanks!
Still, we don’t know why the key is not being recovered and it seems that it has to do something with the data. When we apply the inputs generated with ktp.next, CW finds the key without any problems, but when we apply the inputs that are received by the sensor, it fails to find it. Is there a limit for an input signal variance where CW fails to work well?