Open source

QxBench, measured in the open.

How much does it cost a satellite to check a post quantum signature? We are measuring it on the processors that fly, with public code, and we want your numbers too.

Why it exists

The best known benchmark for post quantum cryptography on small processors, pqm4, covers the Arm Cortex-M4. Satellites fly other cores as well: the SPARC LEON3, the Cortex-R, radiation tolerant RISC-V. We found no public numbers for checking ML-DSA, SLH-DSA or LMS signatures on them. Mission teams choosing a flight processor need those numbers, and so does anyone designing how a spacecraft authenticates its commands.

QxBench measures code size, RAM, peak stack and, on real boards, cycles. It uses public implementations only, and every result carries the source, commit, compiler and flags that produced it, so anyone can reproduce it. It is separate from Zorqa's products and contains none of Zorqa's code.

What is there today

  • A harness that measures the peak stack of one call by painting the stack, and reads the core's cycle counter on real Arm and RISC-V boards.
  • Two targets under QEMU, an Arm Cortex-M4F and a 32 bit RISC-V, with a self test that checks the harness on each. Both pass, measuring a known 12,000 byte stack use as 12,016 and 12,032 bytes.
  • A pass budget simulator for beginners: how long a signed command takes to reach a satellite over a slow uplink, for each signature scheme.
  • The schema results are submitted in.

No signature numbers are published yet. The first algorithm adapters are the open work below.

Run it

git clone https://github.com/Quantumx-fn/QxBench.git
cd QxBench
make test                         # harness self test on both QEMU boards
python3 sim/passbudget.py         # the pass budget simulator

You need arm-none-eabi-gcc, riscv64-unknown-elf-gcc with picolibc and QEMU. The simulator needs only Python 3.

Open problems

Each one is an issue in the repository, written so a student can pick it up. The first three need no hardware.

  • ML-DSA verification on the Cortex-M4F

    Wire a public ML-DSA implementation into the harness and report code size and peak stack for ML-DSA-44, 65 and 87 under QEMU.

    good first issue
  • LMS verification on the Cortex-M4F

    The same for LMS from RFC 8554, the hash based scheme already approved for firmware signing.

    good first issue
  • A results table

    Turn the JSON files in results/ into one readable table, so anyone can compare targets at a glance.

    good first issue
  • LEON3 under QEMU

    Add the SPARC LEON3, flown on many European missions, as a target using QEMU's leon3_generic machine.

    help wanted
  • Cycles on a real board

    Run the harness with the cycle counter on a Cortex-M4F or M7 board and publish the first real timings.

    help wanted
  • SLH-DSA verification stack

    Measure how deep SLH-DSA verification goes on a small core. Its signatures are large; its stack may not be.

    help wanted

See the open issues

How to contribute

  1. Clone the repository and run make test. Both targets must print selftest passed.
  2. Pick an open issue and say in a comment that you are taking it, so two people do not do the same work.
  3. Work on a branch in your fork. Keep implementations unmodified and pinned to a commit, so the number belongs to the public code.
  4. Add your results to results/ as JSON that matches results/schema.json: the implementation's repository and commit, the compiler and flags, and for cycles the board, clock and cache state.
  5. Open a pull request. We rerun every QEMU result before it is merged.

QxBench is licensed under the Apache License 2.0.

Projects we build alongside

Open work from NASA and university research groups that QxBench and the wider field rely on.

From NASA

  • cFS

    The core Flight System, flight software flown on many NASA missions.

  • F Prime

    JPL's flight software framework, flown on the Ingenuity Mars helicopter.

  • NOS3

    The NASA Operational Simulator for Small Satellites, a whole mission in software.

  • CryptoLib

    NASA's implementation of CCSDS Space Data Link Security for the command link.

From universities

  • pqm4Radboud University

    Post quantum cryptography tested and benchmarked on the Arm Cortex-M4. QxBench takes its approach to flight processors.

  • PQCleanRadboud University and contributors

    Clean, portable C implementations of post quantum schemes, easy to build anywhere.

  • liboqsOpen Quantum Safe, begun at the University of Waterloo

    A C library of quantum safe algorithms, now part of the Post Quantum Cryptography Alliance.

  • SPHINCS+Eindhoven University of Technology, Radboud University and others

    The hash based signature scheme behind SLH-DSA, FIPS 205.

  • XMSS referenceEindhoven University of Technology and Radboud University

    Reference code for XMSS, RFC 8391, a stateful hash based signature.

  • FSFWUniversity of Stuttgart

    The Flight Software Framework, flown on the Flying Laptop satellite.

  • BasiliskUniversity of Colorado Boulder

    Spacecraft simulation for astrodynamics and flight software research.