I use the AES-128 masked library that comes with chipWhisperer to compile. After the compilation is successful, I can burn the hardware and collect it after burning. But I can’t find how to set the mask in the source capture_trace. In the trace function, there is no operation related to the input mask. In simpleserial-aes. c existence get_mask function. Do I add ‘mask’ variables directly to ‘cw.capture_trace(scope,target,plaintext,key)’ to change the ‘capture_trace’ function to make it effective? or what should I do?
You should be able to tell pretty easily if your AES implementation is masked by how long the operation takes. Masked AES should be roughly an order of magnitude or more slower than normal AES.
Did you restart your notebook after making your changes to ChipWhisperer? The change you made to
capture_trace() isn’t valid Python syntax. You can’t have a parameter without a default after a parameter with a default. Also the simpleserial command you’re looking for is the
'm' command and you’ll want to set the mask before the plaintext.
I’m sorry, my code ability is not very strong. I made the following change “def capture_trace(scope, target, plaintext, key=None, mask=None, ack=True):”, added the following command
“ if mask:
into the function body, and then restarted the chipwhisperer platform. I successfully burned and collected. I wonder if there are any principle errors.