I am trying to replicate a certain CTR AES-256 paper View of Recovering the CTR_DRBG state in 256 traces (iacr.org) View of Recovering the CTR_DRBG state in 256 traces (iacr.org), with this code AttackAESCTR/AES-CTR-attack.ipynb at master · LaurenDM/AttackAESCTR · GitHub, and as you can see, she made a very general approach(no built-in cw-functions) to what I desire which I can follow. However, she does not include how to obtain the traces being used, she just loads them in. I know she used ChipWhisperer so I should be able to reproduce her results.
My end state is when I get traces on her format i.e.:
and so far I am at this(dont worry about the orange line, it is just the std ):
it looks like their is som “SubBytes” going on, but they are more spaced out, and there is no 4 visible spikes in “MixColumns”.
So my question is: How do I get the same graph?
My code is as follows:
As you can see I switched “text” with “nonce”, and just used the same as the key. But I do not get why you would want to switch out the input text. The nonce is defined in aes-independant.c, so should it not be sufficient to just use “text” in capture_trac()? (I tried both, and neither worked for me though)
Another small question I have is how to write the CW-arrays, i.e. CWbytearray(b’2b 7e 15 16 28 ae d2 a6 ab f7 15 88 09 cf 4f 3c’)? If I want to make my own, I have to use a for-loop and change the elements, is there a shorter way?
Again thx so much for the help Alex