mupq / pqm4

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

Implement new stack measurement HAL API #304

Closed rpls closed 11 months ago

rpls commented 11 months ago

Use the new stack spraying/checking API of the HAL. This adds a small test in the boardtest.elf, which for me returns an accurate result (400/800 bytes alocated on stack, measurement returns 400/800 bytes). Some random spot-checks of schemes return very similar values for stack usage (few bytes difference, might also be explained by newer compiler).

The implementations checks entire words instead of bytes, so the result will only be on word granularity, i.e., 4 bytes.

mkannwischer commented 11 months ago

Awesome! I tested it and it gives me very similar results to the previous benchmarks. Itt resolves my problems with the stack measurements for some schemes. Thanks @rpls! https://github.com/mupq/mupq/pull/122