Skip to content

KULeuven-COSIC/A2B-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analysis and Comparison of Table-based Arithmetic to Boolean Masking

This repository contains ARM Cortex-M4 code for first-order table-based Arithmetic to Boolean (A2B) masking conversions. The implementations are described in our paper "Analysis and Comparison of Table-based Arithmetic to Boolean Masking", Michiel Van Beirendonck and Jan-Pieter D’Anvers and Ingrid Verbauwhede [ePrint] that appeared in TCHES, Volume 2021, Issue 3 [TCHES].

Requirements

Building and running the code requires:

libopencm3

The code in this repository uses the libopencm3 open-source ARM Cortex-M microcontroller library. The repository is built after the libopencm3-template.

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

git submodule update --init --recursive
make -C libopencm3

Tests and Benchmarks

Setup

The Makefile allows to configure which benchmarks or tests to run.

It is possible to switch between the three algorithms described in the paper:

ALGORITHM = {debraize, debraize-fix, dual-lookup}

The algorithms can be profiled or subjected to a t-test:

TYPE = {profile, ttest}

We assume that profiling is performed on the popular STM32F4 Discovery board, whereas for the t-test we used a custom PCB with an STMF303VC6T chip. If needed, this can be adjusted to your setup in hal.c.

Finally, we allow different values to be set for the bit-size parameter k:

CFLAGS += {-DK4, -DK8}

Run

To run the profiling benchmarks and view the output, first connect to the board over the USB-serial interface:

make screen

Then compile and flash the code onto the board:

make flash

The t-test executable can be flashed similarly, but expects to receive fixed-vs-random inputs over the serial interface from a host-side script.

Bibliography

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


Michiel Van Beirendonck and Jan-Pieter D’Anvers and Ingrid Verbauwhede