Skip to content

This repository contains ARM Cortex-M4 code for a first-order masked implementation of SABER.

License

Notifications You must be signed in to change notification settings

KULeuven-COSIC/SABER-masking

Repository files navigation

A Side-Channel Resistant Implementation of SABER

This repository contains ARM Cortex-M4 code for a first-order masked implementation of SABER. The implementation is described in our paper "A Side-Channel-Resistant Implementation of SABER", Michiel Van Beirendonck, Jan-Pieter D’anvers, Angshuman Karmakar, Josep Balasch, and Ingrid Verbauwhede [ePrint] that appeared in ACM Journal on Emerging Technologies in Computing Systems (JETC), Volume 17, Issue 2 [ACM].

Sources

Requirements

The code in this repository includes the pqm4 framework for testing and benchmarking on the STM32F4 Discovery board. We refer to the documentation of pqm4 for the required prerequisites on Setup/Installation.

After cloning or downloading this repository, it is necessary to initialize pqm4:

git submodule update --init --recursive

Running Benchmarks and Tests

Before proceeding with the benchmarks and tests, the masked implementation should be added to pqm4:

ln -rs ./src/saber/m4_masking ./pqm4/crypto_kem/saber/

Subsequently, apply the following patches to make pqm4 work with the masked Saber API:

cd pqm4 && git apply ../pqm4.patch
cd mupq && git apply ../../mupq.patch

All masked Saber tests tests can be run using:

cd pqm4
[sudo -E] python3 test.py saber
[sudo -E] python3 testvectors.py saber

Similarly, all masked Saber benchmarks can be run using:

cd pqm4
[sudo -E] python3 benchmarks.py saber

The repository also includes an example git patch on how to easily do more fine-grained benchmarking by (ab)using pqm4's PROFILE_HASHING.

Benchmarks can then be found in the benchmarks folder.

Bibliography

If you use or build upon the code in this repository, please cite our paper using our citation key.


Michiel Van Beirendonck, Jan-Pieter D’anvers, Angshuman Karmakar, Josep Balasch, and Ingrid Verbauwhede

About

This repository contains ARM Cortex-M4 code for a first-order masked implementation of SABER.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published