# Show HN: Qstate, Rust post-quantum hybrid signatures with evolving t-of-n keys

> Source: <https://github.com/Mattbusel/qstate>
> Published: 2026-12-06 12:48:48+00:00

**Key takeaway:** Qstate requires both ML-DSA and SLH-DSA for every signature and rotates t-of-n key sets with refreshed Shamir custody, but its own baseline shows 6 BOUNDARY security checks and its RustCrypto ml-dsa 0.1.2 and slh-dsa 0.2.0 dependencies have never been independently audited.

Experimental Rust library: post-quantum hybrid signatures (ML-DSA **and** SLH-DSA, both required), `t`-of-` n`
authorization by independent keys that evolve at each key-set rotation, and proactively refreshed Shamir custody of each
node's key seed. Around it: a lab network (coordinator + nodes over HTTP, REST API, CLI, live dashboard, Docker), an
evaluation harness (`qstate-eval`) that writes reports only from what it measured on your machine, and experimental
blockchain adapters.

**Status: experimental research software. Not audited. Not production-certified.** Do not protect anything of value
with it. The RustCrypto `ml-dsa` 0.1.2 and `slh-dsa` 0.2.0 crates it uses state that they have never been
independently audited. No new primitive and no new security proof are offered. Every adversary result is a simulated
operational attack (classical simulation; no quantum cryptanalysis performed).

```
docker compose -f deploy/docker-compose.yml up --build          # coordinator + 5 node containers
```

or, without Docker (coordinator + `n` nodes in one process over localhost HTTP):

```
cargo build --release -p qstate-node -p qstate-eval -p qstate-cli
target/release/qstate-node lab --nodes 5 --threshold 3
```

Dashboard: `http://127.0.0.1:8080/` (nothing opens a browser). API: `http://127.0.0.1:8080/api/v1`, spec
[`docs/api/openapi.yaml`](https://github.com/Mattbusel/qstate/blob/main/docs/api/openapi.yaml). Everything binds to `127.0.0.1`; the API has no authentication. Docker
settings (`n`, `t`, suite, refresh, rotation, latency, adversary, CPU and memory per container) come from `deploy/.env`
(copy [`deploy/.env.example`](https://github.com/Mattbusel/qstate/blob/main/deploy/.env.example); every value has a default).

```
qstate status
qstate reset --nodes 7 --threshold 4 --suite mldsa65            # `qstate suites` lists all 51 suite ids
qstate config set network.refresh_interval_ms=250 latency.mean_ms=5 latency.loss=0.1
qstate tx submit --amount 5                                     # also --data-bytes 256, --replay <seq>
qstate workload run --count 500 --rate 50 --wait
qstate crash 3 && qstate recover 3
qstate compromise 2 --capabilities read-shares,read-seed        # simulated memory read
qstate metrics                                                  # p50/p95/p99 from raw samples, bytes, CPU, memory
qstate events tail --replay 20
qstate keygen --suite mldsa65 --out key.json                    # offline, synthetic keys: also sign, verify
target/release/qstate-eval config --defaults > my.toml          # every setting, documented, with its default
target/release/qstate-eval all --config my.toml --set network.nodes=7 --out eval-out
```

Run kinds: `security` (11 PASS / FAIL / BOUNDARY checks, including NIST ACVP vectors), `bench` (sign/verify, static
key vs evolving key, t-of-n authorization vs single key, multicore scaling, refresh), `network` (in-process lab:
end-to-end latency, bytes on the wire, refresh vs `n`, rotations), `tradeoff` (compromise window vs refresh overhead),
`all`. Each run writes `eval-out/<run id>/`: `report.html`, `report.md`, `results.json`, `config.toml`, and every raw
and derived table as CSV and JSON, with machine, git commit, crate versions, configuration and command. The same runs
start from the dashboard or `qstate bench --remote --kind all --wait` and download with `qstate reports get <id>.html`.
Ready-made scenarios: [`scenarios/`](https://github.com/Mattbusel/qstate/blob/main/scenarios). Every field, workload format and custom chain adapter:
[`docs/EVALUATION_GUIDE.md`](https://github.com/Mattbusel/qstate/blob/main/docs/EVALUATION_GUIDE.md).

Intel i7-13700KF, Windows 11, rustc 1.100.0, shared desktop in use (timings vary up to ~26% between runs). Suite
ML-DSA-87 + SLH-DSA-SHAKE-256f, 3-of-5. The `results/` run was made from commit `c4895b3` with a clean tree.

| measurement | result | source | 
|---|---|---|
| security checks | 5 PASS, 0 FAIL, 6 BOUNDARY; 864 ACVP cases passed, 0 failed | [`results/2026-12-06-baseline`](https://github.com/Mattbusel/qstate/blob/main/results/2026-12-06-baseline/report.md) | 
| simulated adversary, 1 node per epoch, 16 runs x 40 epochs, keys rotated every 10 refreshes | custody secret recovered 0/16; could sign 16/16 (mean 32.0 of 40 epochs) | same, `adaptive-adversary` | 
| same, keys rotated at every refresh / static keys | 0/16 recover or sign / 16/16 both | [`bench-results/adversary_sim_2026-12-05.txt`](https://github.com/Mattbusel/qstate/blob/main/bench-results/adversary_sim_2026-12-05.txt) | 
| sign p50, static key vs evolving key | 87.64 ms vs 87.34 ms (verify 2.401 vs 2.387 ms) | `results/2026-12-06-baseline` ,`sign-verify` | 
| transaction through the ledger, single key vs 3-of-5 | p50 88.76 ms, 53.5 KiB vs 93.49 ms, 160.0 KiB | same, `authorization` | 
| multicore scaling, 1 to 8 threads | sign 11.2 ops/s, 5.58x; verify 405.1 ops/s, 5.71x | same, `scaling` | 
| lab network end to end (localhost HTTP, 200 tx) | 200/200 authorized, 7.36/s; p50 128.7, p95 184.4, p99 229.6 ms; 322.8 KiB per tx | same, `network-e2e` | 
| lab refresh round, n = 5 / 33; rotation at n = 5 | p50 0.729 ms, 16.8 KiB / 42.56 ms, 4.19 MiB; rotation p50 182.7 ms, 614.5 KiB | same, `network-refresh` | 
| refresh every 1000 ms (rotation every 10) | signing possible 80% of the time; 171.454 CPU-s and 275.12 MiB per hour | same, `tradeoff` | 
| hybrid sign / verify, single thread (criterion medians) | 95.41 ms / 2.57 ms | [`bench-results/SUMMARY.md`](https://github.com/Mattbusel/qstate/blob/main/bench-results/SUMMARY.md) | 
| hybrid signature / 3-of-5 signed transfer | 54,485 / 163,582 bytes | same | 

Reproduce every published number: `bash scripts/reproduce.sh` (or `scripts/reproduce.ps1`; `--quick` for minutes), see
[`docs/REPRODUCIBILITY.md`](https://github.com/Mattbusel/qstate/blob/main/docs/REPRODUCIBILITY.md).

1. Custody refresh does not shorten the signing window. That window is the key-rotation period; each rotation is an on-chain transaction (176,888 bytes for 3-of-5).
2. Custody shares are shares of the signing seeds: `t` shares of one custody epoch give every current key until the
next rotation.
3. A deterministic ratchet (no fresh entropy) gives forward security but leaves the signing window as large as a static key.

## Blockchain adapters (experimental, [`docs/ADAPTERS.md`](https://github.com/Mattbusel/qstate/blob/main/docs/ADAPTERS.md))

`docs/ADAPTERS.md`
All adapters are **application-level**: qstate authorizes the chain-native digest off chain and a gate releases it to the
chain's existing classical signer. On-chain security stays classical (not post-quantum). Native on-chain ML-DSA /
SLH-DSA verification **requires a consensus change** and is implemented nowhere here.

- **Bitcoin:** BIP-143 / BIP-341 sighashes gate a secp256k1 co-signer. On-chain spend remains ECDSA / Schnorr.
- **Ethereum:** EIP-712 / EIP-191 digests gate the signer. On-chain verification remains ECDSA.
- **Solana:** legacy and versioned message bytes gate the signer. The runtime checks Ed25519; no PQ signature fits a
1232-byte transaction.
- **Custody:** tiered role quorums, withdrawal lifecycle, signed hash-chained audit log, key ceremony and recovery.

- No threshold signature: `t` -of-`n` is`t` separate signatures (no standardized threshold ML-DSA/SLH-DSA exists).
- Refresh is not verifiable (no post-quantum VSS); custody assumes honest-but-curious dealers.
- Erasure is best effort; `ml-dsa` 0.1.2 leaves per-signature intermediates in memory.
- The lab is a lab: plaintext, unauthenticated internal HTTP (anyone reaching a node's port 9000 can act as the coordinator), injected rather than real network latency, a trusted coordinator, an in-process adversary.
- Constant time is source-level only; the PQ crates' side channels were not audited. Fuzzing was a smoke test.

`cargo add qstate` (`--features serde` for serde support). Examples:
`cargo run --release --example threshold_authorization` (also `evolving_custody`, `ledger_integration`,
`sign_verify_suites`, `blockchain_auth`, `distributed_demo`, `adversary_sim`, `memory_profile`).

```
cargo test --workspace --release                     # use --release: SLH-DSA is very slow in debug builds
cargo clippy --workspace --all-targets -- -D warnings
```

[`EVALUATION_GUIDE`](https://github.com/Mattbusel/qstate/blob/main/docs/EVALUATION_GUIDE.md) (step by step, every setting) ·
[`THREAT_MODEL`](https://github.com/Mattbusel/qstate/blob/main/docs/THREAT_MODEL.md) (adversaries, assumptions, lab trust model) ·
[`PROTOCOL`](https://github.com/Mattbusel/qstate/blob/main/docs/PROTOCOL.md) (lab network messages, rounds, ledger rules) ·
[`ARCHITECTURE`](https://github.com/Mattbusel/qstate/blob/main/docs/ARCHITECTURE.md) · [` ADAPTERS`](https://github.com/Mattbusel/qstate/blob/main/docs/ADAPTERS.md) · [` REPRODUCIBILITY`](https://github.com/Mattbusel/qstate/blob/main/docs/REPRODUCIBILITY.md) ·
[`PAPER`](https://github.com/Mattbusel/qstate/blob/main/docs/PAPER.md) · [` openapi.yaml`](https://github.com/Mattbusel/qstate/blob/main/docs/api/openapi.yaml) · [` results/`](https://github.com/Mattbusel/qstate/blob/main/results/README.md) ·
[`bench-results/`](https://github.com/Mattbusel/qstate/blob/main/bench-results/SUMMARY.md) · [` DESIGN.md`](https://github.com/Mattbusel/qstate/blob/main/DESIGN.md), [` EVAL_DESIGN.md`](https://github.com/Mattbusel/qstate/blob/main/EVAL_DESIGN.md) (build
contracts and review findings)

MIT
