Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

A side-channel resistant implementation of the HQC Post-Quantum Cryptosystem for the "Cryptography and Architectures for Computer Security" course at Politecnico di Milano (A.Y. 2020/2021)

License

Notifications You must be signed in to change notification settings

DomenicoCacace/HQC-crypto2021

Repository files navigation

Cryptography and Architectures for Computer Security Project

Introduction

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.

Contents

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

Installation

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.

Compilation

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
  • X: security level (128, 192, 256)
  • Y: number of shares of the masking scheme (1, 2, 3, 4)
  • MODE: the executable to be compiled (CONST-KEM, CONST-PKE, TIMING-KEM, TIMING-PKE, FUNCTIONAL)
  • CROSS: 1 to compile for the stm32 board, 0 for the native architecture
  • VERB: the verbosity level of the log messages (1, 2)
  • About

    A side-channel resistant implementation of the HQC Post-Quantum Cryptosystem for the "Cryptography and Architectures for Computer Security" course at Politecnico di Milano (A.Y. 2020/2021)

    Topics

    Resources

    License

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages