Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS problem #334

Open
rickyhsyk opened this issue Mar 4, 2024 · 3 comments
Open

OS problem #334

rickyhsyk opened this issue Mar 4, 2024 · 3 comments

Comments

@rickyhsyk
Copy link

Hi, I'm using cw308t-stm32f3 as by targetboard, I'm trying to connect with simpleserial on chipwhisperer, but the problem occurs when it goes to randombytes.c:

/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: objdir-CW308_STM32F3/pqm4/randombytes.o: in function PQCLEAN_randombytes': /home/cwuser777/Desktop/chipwhisperer/hardware/victims/firmware/simpleserial-pqm4/pqm4/randombytes.c:336: undefined reference to randombytes_linux_randombytes_getrandom'
collect2: error: ld returned 1 exit status
make[1]: *** [.././Makefile.inc:486: kyber768-CW308_STM32F3.elf] Error 1
make: *** [.././Makefile.inc:338: all] Error 2

It seems like it didn't figure out that my OS is on linux, however I remove the #if and #elif, it can't call the function on sys like "sys/syscall.h" or "poll.h", is there anyway to solve it?

@rpls
Copy link
Contributor

rpls commented Mar 4, 2024

I assume, you just used the sources of a single scheme and try to build it with your own build-system (probably the CW Makefile buildsystem)? And it seems like you're using a randombytes.c implementation (from the pqclean repo from the look of it?) that is not meant for the STM32F303 chip (which does not have a TRNG).

@rickyhsyk
Copy link
Author

Oh I see, I did built it with CW Makefile and use the randombytes.c from the pqlean implementation. So I got that it doesn't support STM32F303, then which one is meant for it?

@rpls
Copy link
Contributor

rpls commented Mar 5, 2024

Use this one. You might have to adapt it, but the fallback implementation in there should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants