Try to migrate AES-RSM128 to chipwhisper platform

SS_VER set to SS_VER_1_1
rm -f – simpleserial-rsm-CWLITEXMEGA.hex
rm -f – simpleserial-rsm-CWLITEXMEGA.eep
rm -f – simpleserial-rsm-CWLITEXMEGA.cof
rm -f – simpleserial-rsm-CWLITEXMEGA.elf
rm -f –
rm -f – simpleserial-rsm-CWLITEXMEGA.sym
rm -f – simpleserial-rsm-CWLITEXMEGA.lss
rm -f – objdir/.o
rm -f – objdir/
rm -f – hal.s main.s sw.s t0.s aes-rsm.s log.s
rm -f – hal.d main.d sw.d t0.d aes-rsm.d log.d
rm -f – hal.i main.i sw.i t0.i aes-rsm.i log.i
Welcome to another exciting ChipWhisperer target build!!
avr-gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

Compiling C: …/./crypto/avrcryptolib//rsm128/hal.c
avr-gcc -c -mmcu=atxmega128d3 -I. -fpack-struct -gdwarf-2 -DSS_VER=SS_VER_1_1 -DHAL_TYPE=HAL_xmega -DPLATFORM=CWLITEXMEGA -DAVRCRYPTOLIB -DF_CPU=7372800UL -DSS_VER_2_0=2 -DSS_VER_1_1=1 -DSS_VER_1_0=0 -Os -funsigned-char -funsigned-bitfields -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=objdir/hal.lst -I…/./simpleserial/ -I…/./hal -I…/./hal/xmega -I…/./crypto/ -I:…/./crypto/avrcryptolib//rsm128 -std=gnu99 -MMD -MP -MF .dep/hal.o.d …/./crypto/avrcryptolib//rsm128/hal.c -o objdir/hal.o
In file included from …/./crypto/avrcryptolib//rsm128/hal.c:26:0:
…/./crypto/avrcryptolib//rsm128/config.h:259:2: error: #error Unknown destination platform.
#error Unknown destination platform.
…/./crypto/avrcryptolib//rsm128/hal.c:34:19: fatal error: types.h: No such file or directory
#include <types.h>
compilation terminated.
make: *** […/./ objdir/hal.o] Error 1

I try to migrate the masked version of AES128 to the chipwhistler platform, create a new rsm folder under hardware/victims/firmware/crypto/avrcryptolib, and put it in the relevant folder .c . h and .S source code, create the simpleserial rsm folder under/hardware/vicems/firmware, write the makefile file, and then compile with an error. The reason is that the platform is incorrect. However, using the platform’s own encryption algorithm, you can use - mmcu=atxmega128d3, so please help solve the problem.


For your first error, you’ll have to inspect your source files to see which defines you need. For your second error, you’ll need to locate types.h and add the folder that contains that file to your include directories. I can’t really help beyond that, as I’m not familiar with the code base you’re trying to integrate.



Thank you very much for your answer

For the first problem, I downloaded the source code of the DPA Context v4 AES 128 RSM algorithm. I only linked the source file for the chipwhistler platform, but it could not be compiled. Google could not find a solution to this error.

For the second problem, I tried to add SRC+=types. h to the makefile, but there were related errors. Types. h and other files exist in the same directory, and the file is not missing.