Post-Quantum Signature Verification Host Functions in Soroban #1915
Replies: 8 comments 1 reply
|
Cross-posting, there is another thread discussing support for Falcon (FN-DSA, one of the NIST standardized schemes mentioned above) |
|
dont know if its relevant here, wanted to share- https://github.com/Eshan276/nebulav2 |
|
Thanks @jayz22 for opening this, and +1 to @iftachh on supporting all three NIST schemes plus low-level primitives. We at Soundness Labs have been working on post-quantum cryptography for blockchains. As part of our SCF work we shipped a Soroban Smart Account that authorizes via Falcon (FN-DSA): SoundnessLabs/stellar-pq. We analyzed the cost tradeoffs across all three NIST schemes and their support across wallets / custodians. We also describe what we and others, like the Coinbase Independent Advisory Board (IAB) on Quantum Computing and Blockchain, consider the best migration strategy, leveraging the properties of EdDSA that follow RFC 8032. On-chain authenticator sizeFor a smart account, every authorization carries a public key + signature into the transaction. Those bytes get propagated, validated, and stored by every node, and that's what the fee model has to price. On Stellar today: 32 + 64 = 96 bytes for Ed25519. Comparing it with NIST PQ schemes:
Adding them together as a combined view:
Falcon-512 lands at ~16× Ed25519, ML-DSA-44 at ~39×, SLH-DSA-128f at ~178×. SLH-DSA's tiny 32-byte public key is its one structural advantage, and the signature column buries it. ML-DSA pays in both columns. Falcon-512 is the only one of the three that stays under 2 KB combined at NIST Cat 1. The Coinbase IAB position paper frames signature size as "a first-order architectural constraint" in the post-quantum world. Naive replacement reduces blockchain throughput by 1–2 orders of magnitude. Stellar's transaction limits aren't where the bite hits first, but the Soroban resource budget and fee model were designed around 96-byte authenticators. Verification costSigning happens off-chain in the wallet or HSM and doesn't concern the blockchain itself. For the host-function design we are concerned about verification as shown in the following diagram:
Falcon-512 verifies faster than ML-DSA-44 (0.7× vs 1.0×). Falcon's verification is plain integer arithmetic over short polynomials: no FFT-tree, no floating point, no rejection sampling. Of the three NIST schemes, it's the cheapest to verify. ML-DSA-44 sits in Ed25519's ballpark — Cloudflare's PQ-signature on-ramp benchmarks normalize ML-DSA-44 to 1.0 vs Ed25519 at 1.3. The ML-DSA pain isn't on the verify path. It's on the wire and at signing time. SLH-DSA verify is 40–110× ML-DSA-44 at Cat 1 (same Cloudflare data). The inner loop is just SHAKE, but those numbers decide which use cases make sense on-chain. Sign vs verify asymmetryThe "Falcon has a side-channel concern" framing is true, however the risk lives in signing, not verification, which matters for a smart-account host function.
Falcon signing has two paths in the wild. The fast reference path (3× ML-DSA-44) uses double-precision floating-point for the FFT-tree-based discrete Gaussian sampler, and that's what leaks via FP side channels — see Fouque–Kirchner–Tibouchi–Wallet–Yu, Eurocrypt 2020, key recovery from Gram-Schmidt norm leakage. Signing securely on a CPU an adversary can observe means moving to emulated FP. That's the constant-time path at ~60× ML-DSA-44, about 20× slower than the reference per Cloudflare. Grouped, the asymmetry is hard to miss:
And the picking-a-scheme map:
What this means for host-function design. A Security on that matter is relayed to signers who have different options. Software wallets ship the constant-time emulated FP and accept the slowdown. Hardware wallets, HSMs, and secure enclaves run the FP path with side-channel isolation provided by the device. Both are deployable today. SLH-DSA's signing cost shapes its use cases: 14,000× ML-DSA-44 for
A comparison among the three schemesML-DSA is the candidate that is supported across HSMs and MPC implementations. NIST's chosen general-purpose PQ signature, full FIPS 204 spec, Apple CryptoKit support in iOS 26 / macOS 26, AWS and Google Cloud KMS support, IETF LAMPS encoding into X.509. Falcon (FN-DSA) is the compact choice, though practical MPC schemes for it are still an open research area. Smallest signatures of the three, verification on the fast path. Right scheme for high-frequency on-chain auth and bandwidth-sensitive Soroban contracts. Algorand uses this pattern in its state proofs (the only mainnet Falcon deployment we know of). SLH-DSA is the conservative choice since it doesn't rely on assuming that lattices are secure (see FIPS 205). Security reduces to standard hash preimage and second-preimage resistance. Best fit for high-value vaults, governance, key-rotation, root-of-trust signing. Bad fit for everyday authorization due to the high signing cost. The Coinbase IAB report also flags that SLH-DSA resists efficient MPC and threshold protocols, which limits its KMS / custodial story. @iftachh's "some of these might be found insecure" point is the one we take most seriously. MLWE/MSIS has had a decade of public cryptanalysis and held up, but lattice cryptography is still seeing parameter tightening. SLH-DSA is the explicit fallback NIST kept in standardization for that reason. Supporting all three lets Soroban migrate from one to another without a host-side breaking change. Abstraction levelWe'd push for per-scheme verification host functions plus a small set of shared primitives — E.g. per scheme: Note on jurisdictional requirements (for institutional use case)Concrete divergence across NIST-standardized signature schemes:
A Stellar participant under BSI guidance may prefer or require SLH-DSA for long-term or high-value signatures, while one operating under CNSA 2.0 is expected to use ML-DSA (e.g., ML-DSA-87) within that profile. Falcon (FN-DSA) addresses compact signature use cases and is explicitly included in ANSSI guidance. No jurisdiction we are aware of currently mandates non-NIST PQC signature schemes for general-purpose use, although some national programs (e.g., Korea's KpqC selections) exist and may be adopted domestically. A Stellar-specific migration angle: proof of seedThe IAB framework defines four desired properties for any PQ migration strategy:
The paper analyzes four candidate strategies (naive plug-and-play, private keys as hash outputs, 2-of-2 hybrid signing, 1-of-2 hybrid signing) and concludes that only one fulfills all four properties: private keys as hash outputs. The summary table on page 34 lays it out cleanly. The report cites our work directly: "This therefore looks like an ideal solution, and is even being deployed today (see http://soundness.xyz)." The technique fits Stellar natively. Ed25519 with RFC 8032 already derives the signing scalar deterministically from a seed via SHA-512 — exactly the key-generation structure the strategy requires. The seed is the preimage. When a quantum threat becomes realistic, Stellar can stop accepting Ed25519 signatures and start accepting proofs of seed: a PQ zero-knowledge proof that the holder of an address knows the seed Against the four properties, this strategy is four-for-four: P1 (security never weaker than today's Ed25519), P2b (PQ security the moment the network flips the acceptance switch), P3 (zero on-chain cost until the switch), P4 (Ed25519 keys are already hash outputs under RFC 8032, so users with mnemonics need no key-generation change). The verifier on the Soroban side is based on WHIR. We'll share numbers and a writeup once the prototype is benchmarked. Aggregation (re: @iftachh)Short answer: no native PQ signature scheme aggregates the way BLS does. State of the art has two threads.
Neither is production-ready for a Soroban smart account today. For "many different messages with one short signature" the safe path now is plain non-aggregated multi-sig with N independent verifications. Where we'd be useful next
|
|
This is great! Thank you. Something to note is that wrt "on-wire" cost, in most situations we can probably avoid having to re-send the key with the signature: in both the context of a "G-account" and smart wallet, the runtime just needs to be able to find the key for verification: this could be an index or the hash of the key (the runtime just needs to be able to find a match) |
|
Thought about this some more. I think we should separate near-term host functions (in production) from longer-term research. Falcon/FN-DSA is attractive for compactness but should probably wait until FIPS 206 and production-quality implementations stabilize: my main concern in the context of a host function is going to be around correctness issues with floating point operations that are architecture dependent (therefore creating potential determinism issues). |
|
@gnosed thank you for your detailed post, lots of gold nuggets there. I definitely think each method has its own advantages, and given this is still an early field, we should keep our mind open and support multiple of them. In terms of priority and immediate impact, I agree with @MonsieurNicolas the ML-DSA seems like the best option to tackle first. Here would be my order of attack:
I think each of these families should be a separate CAP (in the mentioned order). Each CAP should support multiple parameter sets under a shared implementation strategy, e.g ML-DSA-44 and ML-DSA-65 are the same standardized algorithm family with different parameters. |
|
cap-0087 - Host functions for ML-DSA has been added. |
|
CAP-0087 lists cost calibration as TBD. I measured guest-side ML-DSA-44 and Per ledger (
Derivation, so it can be checked: under CAP-0063 Per transaction ML-DSA-65 is 77,519,116 instructions — 19.4% of Two things aimed directly at the cost types in the spec. The Method: A custom account authorised solely by an ML-DSA-65 signature verified in These measurements support the CAP. Guest-side verification is comfortably @MonsieurNicolas's point upthread about not re-sending the key holds up: the Full tables — including the message-length sweep and the decode/verify split — One footnote: Soundness Labs ceased operations on 18 June 2026, citing market Is this useful, and is there anything else on CAP-0087 I could help measure? |








Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The signature verification algorithms currently available in Soroban — ECDSA and EdDSA — rest on the (elliptic-curve) discrete logarithm problem, whose hardness assumption no longer holds in the post-quantum setting.
As a first step toward post-quantum readiness, we want to expose host functions for native PQ signature verification. This lets Soroban custom accounts (smart wallets) enforce PQ-secure auth on the user side without waiting for protocol-level key-type changes.
This thread tracks the discussion and effort.
Scope of candidates. NIST has standardized two PQ signature schemes: ML-DSA (FIPS 204, lattice) and SLH-DSA (FIPS 205, hash-based), with FN-DSA / Falcon (FIPS 206, lattice) selected for standardization but not yet final (see NIST PQC and NIST on Falcon/FN-DSA). Open Quantum Safe (liboqs) tracks available implementations.
Open questions for discussion:
All reactions