Chipwhisperer cipher output same as plaintext input

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.

Hi Nauge,

What tutorial do you try?

I’m guessing your command handler is empty, which means it just passes input to output.
If you have unchanged file, you can check it here:

There is no aes in “get_pt” funciton.

3

PS You can check tutorials to get an easy and smooth first take off with CW :slight_smile:

Hi,

As 3 said, there’s no aes call in simpleserial-base. Try changing to simpleserial-aes.

Alex