This work describes a masking-based side channel resistent implementation of HQC, a third round alternative candidate for the NIST Post-Quantum Cryptography competition.
The implementation on this repository has been tested on an ARM Cortex-M4 processor, showing a significant decrease in terms of leaked information, while still keeping a relatively small overhead.
This repository contains:
- report: the documentation about the work done, the presentation and the benchmark results
- scripts: python and bash scripts to automate the code generation, testing and analysis processes
- src: C implementation of the cryptosystem
In order to compile and run HQC, the following softwares are needed: cmake, make, stm32programmer, gcc-arm-none-eabi
.
This implementation is tailored for the STM32F401RE board; to change the target, you need to generate the configuration files on STM32CodeMX and add them in the src/stm32
folder.
We use CMake to manage all the executables we generate; assuming to be in the build
folder:
cmake .. -DSECLVL=X -DMASKLVL=Y -DMODE="MODE" -DCROSSCOMPILE=CROSS -DVERBOSE=VERB
CONST-KEM, CONST-PKE, TIMING-KEM, TIMING-PKE, FUNCTIONAL
)