Skip to content

About

Benchmarks for post-quantum cryptographica and traditional digital signatures using liboqs and OpenSSL

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

pqc-sig-bench-c

DOI

Benchmarks for digital signature algorithms, targeting two groups:

  • Post-quantum signatures — via liboqs (ML-DSA, Falcon, SPHINCS+, SLH-DSA, XMSS, LMS, …)
  • Traditional signatures — via OpenSSL (RSA PKCS#1v15, RSA-PSS, ECDSA P-256/P-384/P-521, Ed25519, Ed448)

Each benchmark measures keygen, sign, and verify separately. Results are written to a CSV file with a metadata header (date, library versions, CPU, OS, arch, etc.).

A visualization of the data obtained with these benchmarks can be seen at https://pqc.crypto-lab.ch/sig-charts/. The source code of the visualization is also available in cryptohslu/pqc-sig-charts-website.

Example output

# date:           2026-05-20T08:19:30
# liboqs:         0.15.0
# openssl:        OpenSSL 3.6.2 7 Apr 2026
# arch:           x86_64
# os:             Linux 7.0.9-arch1-1
# cpu:            AMD Ryzen 9 7900X3D 12-Core Processor
# memory_mb:      95689
# warmup_seconds: 1
# bench_seconds:  10
# algorithm,operation,ms_per_op,ops_per_sec,iterations
ML-DSA-44,keygen,0.028086,35604.490,356045
ML-DSA-44,sign,0.034512,28975.312,289754
ML-DSA-44,verify,0.019233,51992.418,519925
...

Each benchmark runs a 1-second warmup followed by a 10-second measurement window. Fast primitives are run as many times as required to reach the 10 seconds. The time is estimated as the total time divided by the number of rounds. Primitives that take longer than 10 seconds to finished are only run once, for as long as they need, in order to complete a full run. The output file is named <timestamp>_<arch>_<hostname>_<type>.csv, where type is either traditional or liboqs.

Dependencies

  • GCC (it should work with clang but has not been tested)
  • OpenSSL ≥ 3.x
  • liboqs ≥ 0.15.0 (for PQC benchmarks)

By default, the Makefile looks for both libraries under $HOME/openssl and $HOME/liboqs/build. Alternatively, uncomment the pkg-config lines in the Makefile to use system-wide installations.

Building and running

Note

The default target will run the benchmarks on all algorithms, including the stateful hash-based signatures. The key generation and signing of some of the supported parameters sets in liboqs can take up to 10-12 hours, even longer on small devices (e.g., a Raspberry Pi). This means that the default target could takes days to finish. Take this into account if you are running this on a paid VM. All the traditional and non-stateful hash-based signatures benchmarks should finish in reasonable time on any platform supported by OpenSSL and liboqs.

# Build and run all benchmarks, saving CSV output automatically
make

# Build and run the binary to fetch all the keys and signature sizes
make run_fetch_sizes

# Build and run only the traditional benchmark
make run_traditional

# Build and run only the liboqs (PQC) benchmark
make run_liboqs

# Build and run only the liboqs (PQC) benchmark without stateful hash-based singatures
make run_liboqs_no_stfl

# Clean binaries
make clean

Setting up dependencies from scratch

See scripts/run_aws.sh for a complete setup script that installs system packages, builds OpenSSL and liboqs from source, and runs the benchmarks. The key liboqs cmake flags used are:

Flag Value Purpose
OQS_ALGS_ENABLED All Enable all algorithms
OQS_ENABLE_KEM_KYBER OFF Exclude Kyber (replaced by ML-KEM)
OQS_ENABLE_SIG_SPHINCS OFF Exclude SPHINCS+ (replaced by SLH-DSA)
OQS_ENABLE_SIG_STFL_XMSS ON Enable XMSS (stateful)
OQS_ENABLE_SIG_STFL_LMS ON Enable LMS (stateful)
OQS_HAZARDOUS_EXPERIMENTAL_ENABLE_SIG_STFL_KEY_SIG_GEN ON Allow stateful key reuse in benchmarks

Source files

File Description
fetch_sizes.c Public and private keys, and signature sizes
bench_liboqs.c PQC signatures via liboqs (stateless and stateful hash-based)
bench_traditional.c Traditional signatures via OpenSSL EVP
scripts/run.sh Script to install dependencies, build OpenSSL and liboqs and run the benchmarks (assumes Debian-based distro with apt)
scripts/generate_dataset.py Generates a compressed Pandas dataframe from the raw CSV files

Note

Some keys and signatures do not have fixed sizes. For example, DER-encoded keys in RSA can be a few bytes smaller or larger depending on the particular prime numbers used. The fetch_sizes.c program outputs the largest possible keys and signatures in those cases.

Results

Results from running these benchmarks on different platforms are available in the results directory. The links below point to the PQC results. The key and signature sizes are available in results/key_sig_sizes.csv.

File Hardware Arch CPU
202605_x86_64_c8i.large_liboqs.csv AWS C8i.large x86-64 Intel Xeon 6975P-C
202605_x86_64_c8a.large_liboqs.csv AWS C8a.large x86-64 AMD EPYC 9R45
202605_x86_64_c8g.large_liboqs.csv AWS C8g.large AArch64 AWS Graviton2
202605_x86_64_pc_liboqs.csv High-end PC x86-64 AMD Ryzen 9 7900X3D
202605_x86_64_laptop_liboqs.csv Laptop x86-64 Intel Core i7-1185G7
202606_aarch64_macbook_liboqs.csv MacBook Pro AArch64 Apple Apple M4 Pro
202606_aarch64_rpi3b_liboqs.csv RPi 3B+ AArch64 Cortex-A53
202605_aarch64_rpi4b_liboqs.csv RPi 4B AArch64 Cortex-A72
202605_aarch64_rpi5_liboqs.csv RPi 5 AArch64 Cortex-A76

Tip

The datasets of some devices (e.g., Raspberry Pis) do not contain benchmarks of the stateful hash-based signatures due to the long runtimes. These datasets may be updated in the future to include them as well.

Acknowledgements

These benchmarks were performed during the Innosuisse project 128.522 IP-ICT "Crypto-agile Certificate Management" in collaboration with essendi it.

We would like to thank the OpenSSL project for providing a robust and widely-used cryptographic library, the Linux Foundation and the Post-Quantum Cryptography Alliance (PQCA) for their efforts in advancing post-quantum cryptography standardization and adoption, and in particular the liboqs community for developing and maintaining the open-source library that makes benchmarking post-quantum signature schemes accessible and reproducible.

Citation

If this benchmarking code or the raw data was useful to you in your research or project, please cite us.

BibTeX

@software{Mendez_Veiga_PQC_Digital_Signatures_Benchmark,
    author = {Mendez Veiga, Iyan},
    doi = {10.5281/zenodo.20546069},
    month = jun,
    title = {{PQC Digital Signatures Benchmarking}},
    url = {https://github.com/cryptohslu/pqc-sig-bench-c},
    version = {2026.06.04},
    year = {2026}
}

APA

Mendez Veiga, I. (2026). PQC Digital Signatures Benchmarking (Version 2026.06.04) [Computer software]. https://doi.org/10.5281/zenodo.20546069

License

MIT — see LICENSE.

About

Benchmarks for post-quantum cryptographica and traditional digital signatures using liboqs and OpenSSL

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages