International Association for Cryptologic Research

International Association
for Cryptologic Research

ASIACRYPT 2024

SQIsign2D-West:

The Fast, the Small, and the Safer


README

SQIsign2D-West

This library is a C implementation of SQIsign2D-West
https://eprint.iacr.org/2024/760

Based on the following codes:
- SQIsign, https://sqisign.org
- SQIsignHD, https://github.com/Pierrick-Dartois/SQISignHD-lib

Requirements

Build and check

For the development build

Besides building and executing the test suite, these commands build
six executables in build/test:

Test and benchmark the signature

To reproduce the experiments of the paper, create the following builds

build-ref contains the pure-C build with finite field arithmetic
based on Fiat-Crypto,
build-broadwell contains the build with finite field arithmetic
optimized for x86_64 platforms.

Each build directory contains a folder test with six executables:
one per NIST level and rigourous / heuristic variant. Run them like
this:

Build options

CMake build options can be specified with -D<BUILD_OPTION>=<VALUE>.

An optimised executable can be built by running
cmake -DSQISIGN_BUILD_TYPE=<ref/broadwell> -DCMAKE_BUILD_TYPE=Release ..

SQISIGN_BUILD_TYPE

Specifies the build type for which SQIsign is built. The currently supported flags are:
- ref, which builds the plain C reference implementation based on
Fiat-Crypto.
- broadwell, which builds an additional implementation with GF
optimized code for the x86_64 architecture.

ENABLE_GMP_BUILD

If set to OFF (by default), the gmp library on the system is dynamically linked.
If set to ON, a custom gmp library is linked, which is built as part of the overall build process.

In the latter case, the following further options are available:
- ENABLE_GMP_STATIC: Does static linking against gmp. The default is OFF.
- GMP_BUILD_CONFIG_ARGS: Provides additional config arguments for the gmp build (for example --disable-assembly). By default, no config arguments are provided.

CMAKE_BUILD_TYPE

Can be used to specify special build types. The options are:

The default build type uses the flags -O3 -Wstrict-prototypes -Wno-error=strict-prototypes -fvisibility=hidden -Wno-error=implicit-function-declaration -Wno-error=attributes. (Notice that assertions remain enabled in this configuration, which harms performance.)

License

SQIsign2d is licensed under Apache-2.0. See LICENSE and NOTICE.

Third party code is used in some test and common code files: