mupq / pqm4

Post-quantum crypto library for the ARM Cortex-M4
280 stars 68 forks source link

improve compression for PERK short levels I and II #328

Closed marco-palumbi closed 6 months ago

marco-palumbi commented 6 months ago

This PR improves the signature compression/decompression for the levels I and II short. It customizes the array size of the tinybn library for the needs of the sizes of the permutations.

I successfully tested it with the ./testvectors.py script on the stm32f4discovery board. I got errors running ./testvectors.py script with -pmps2-an386 (qemu emulator) but I got the same error trying to run testvectors for dilithium2. I then think that the problem is somewhere outside of my PR. Please give a look into this.

Would be nice if you can merge this before running all the benchmarks... Thanks

marco-palumbi commented 6 months ago

Problem with qemu was because an older compiler toolchain. using Arm GNU Toolchain 13.2.rel1 fixed the issue.

rpls commented 6 months ago

All testvectors pass for me. I'll merge it.

rpls commented 6 months ago

Stack benchmarks also remain unchanged.