mupq / pqm4

Post-quantum crypto library for the ARM Cortex-M4
284 stars 72 forks source link

Issues Running Tests for Falcon-512 Signature on ChipWhisperer Lite #344

Closed GregGuyot closed 4 months ago

GregGuyot commented 4 months ago

Hello,

I am encountering issues when running tests for the Falcon-512 signature function on a ChipWhisperer Lite. The context is as follows:

  1. I successfully built the pqm4 project using make -j4 PLATFORM=cw308t-stm32f3
  2. I used a basic code for communicating with the ChipWhisperer, which seems to function correctly. Specifically, the read.target() function returns the strings I use in the hal_send_str() functions. Also, the MUPQ_crypto_sign_keypair works fine as I can see the strings I sent at the beginning and the end of the function.
  3. The problem arises when the do_sign() function is called. It appears that something causes a crash, but I am unable to determine the exact cause or how to fix it. After entering the do_sign() function, none of my hal_send_str() messages appear in the target_read() function output unless I insert return 1; at the very beginning of do_sign().

Any assistance or insights into this issue would be greatly appreciated. If more context or specific details are needed, I am happy to provide them.

Thanks, Greg

rpls commented 4 months ago

Running Falcon 512 requires more memory than the STM32F303 (as present on the CW Lite M3) has. The Makefile only excludes schemes that don't build on a given platform. We use the test.py/benchmark.py/etc scripts to actually run the tests, and these scripts will skip falcon on the CW Lite accordingly.