This repository provides the source code of a high-order masked implementation of Pyjamask on ARM Cortex-M4. The source code has been tested on STM32F407 Discovery Kit.
- Dahmun Goudarzi (PQShield)
- Matthieu Rivain (CryptoExperts)
masked_pyjamask.c
: main Pyjamask functions (key schedule, encryption, decryption) for both 96 and 128 modes;masked_pyjamask_asm.S
: optimized assembly functions for the masked implementation of Pyjamask (matrix vector multiplication, ISW MACC, randomness generation);random.c
: call the hardware RNG of the STM32F407 board (only use to generate the initial masks of the state and the keys);
Two versions (v1 and v2) of the code source are provided. v2 is optimized for timings with a larger code size than v1. See the specification document for details.
api.h
: prototypes of main entry points;param.h
: definition of implementation parameters:- the masking order,
- hardware RNG configuration constants;
random.h
: prototypes for random generation function.
The detailed description of this implementation as well as a performance benchmark can be found in the Pyjamask specification document.
Some guidelines for installing the tools can be found here.