Ad-hoc Threshold Multi-Signatures

Proof of Concept implementation. This crate is ongoing work, has not been audited, and API is by no means final. Do not use.
A Rust implementation of ATMS signatures
atms implements Ad-Hoc Threshold MultiSignatures (ATMS) implementation using
Boldyreva
multi signature scheme as described in Section 5.2 of the
Proof-of-Stake Sidechains
by Gazi, Kiayias and Zindros. Elliptic curve cryptography, and basic
signature procedures are performed using the blst
library by supranational which implements BLS signatures over curve
BLS12-381.
The library exposes a C API for facilitating its usage with other languages.
ATMS C library Usage
Environment
Compiling and testing the C library requires a working installation of clang and gtest. To do so, one can check the documentation of your package-manager for system-dependent install instructions.
Note: For MacOS I made it work by adding -std=c++<VERSION> to the clang command below, after installing gtest as
specified here.
<VERSION> needs to be 11 or higher.
Compiling the library and header file
First, one needs to compile the library running:
cargo build --release
Then, we need to build the header files using cbindgen. For this, first install
cbindgen:
cargo install cbindgen
and then build the header file by running the following command from the parent directory (nightly is required):
rustup run nightly cbindgen ./ --config cbindgen.toml --crate atms --output target/include/atms.h
Running tests
For running rust tests, simply run (recommended use of --release, otherwise it takes a while):
cargo test --release
For the c-tests, we first build the test executable. First enter the c-tests folder, and then run:
NOTE: Do not use g++, it does compile but leads to segfault when running the test.
To execute the tests:
[==========]
[
[ )
[
[ )
[
[ )
)
[
[ )
[
[ )
)
[==========] )
[