Hi everyone, I’m I got my hands on a chipwhisperer-lite and decided to try out a simple program. I attempted to run quick AES encryption but for some reason i’m interpreting the textout of the result which I though was the cipher text turns out to be the same as the input text embedded is my code.
import chipwhisperer as cw
scope = cw.scope() #create scope object
scope.default_setup() #set default scope settings
target = cw.target(scope) #create target object
%%bash
cd …/hardware/victims/firmware/simpleserial-base/
make PLATFORM=CWLITEARM CRYPTO_TARGET=TINYAES128C
cw.program_target(scope, cw.programmers.STM32FProgrammer, “…/hardware/victims/firmware/simpleserial-base/simpleserial-base-CWLITEARM.hex”)
ktp = cw.ktp.Basic()
key, pt = ktp.new_pair()
print(‘key’,key)
print(‘plain text’,pt)
scope.arm()
trace = cw.capture_trace(scope, target, pt, key)
when i printout ‘trace’ i get the following
Trace(wave=array([ 0.05957031, -0.09277344, -0.07324219, …, -0.24609375,
-0.18261719, -0.12402344]), textin=CWbytearray(b’7a 09 72 83 e2 d6 2f ba 18 e7 7d 3e 04 ac 9f ee’), textout=CWbytearray(b’7a 09 72 83 e2 d6 2f ba 18 e7 7d 3e 04 ac 9f ee’), key=CWbytearray(b’2b 7e 15 16 28 ae d2 a6 ab f7 15 88 09 cf 4f 3c’))
I interpret textin to be the plaintext input and the textout to be the cipher text. I’m not understanding why they are the same or what I could be doing wrong with the above code. Any help would be appreciated.