We built falcon-rs — a pure Rust implementation of FN-DSA, NIST's post-quantum digital signature standard. Here's why it matters and how NTRU lattice math keeps your signatures safe.
Every TLS certificate, every crypto wallet, every software update signature on the planet relies on the same two mathematical assumptions: factoring large integers is hard (RSA) and solving discrete logarithms on elliptic curves is hard (ECDSA).
In 1994, Peter Shor proved that a sufficiently large quantum computer can solve both problems in polynomial time. Not faster — categorically different. A 4096-bit RSA key that would take a classical computer billions of years to crack would fall in hours.
RSA · ECDSA · EdDSA
Rely on factoring & discrete logs
All current signature schemes become forgeable in polynomial time
This isn't science fiction. NIST began its post-quantum standardization process in 2016 and finalized FIPS 206 — the FN-DSA standard (formerly Falcon) — as one of the approved replacements. The migration deadline is real: government systems must transition by 2035.
Falcon — now standardized as FN-DSA (FFT over NTRU-Lattice‑Based Digital Signature Algorithm) — replaces the vulnerable math with a problem no quantum algorithm can efficiently solve: the Shortest Vector Problem (SVP) on lattices.
Think of a lattice as an infinite, regularly-spaced grid of points in high-dimensional space. Given an arbitrary target point, finding the closest lattice point is easy if you know the secret short basis vectors — but astronomically hard if you only know long public basis vectors. Even Grover's algorithm only provides a quadratic speedup, leaving the problem firmly intractable.
Solve the NTRU equation to find a short basis (f, g, F, G) of a lattice, then compute the public polynomial h = g/f mod q. The short basis is your private key — the public polynomial h is your public key.
Hash the message to a point in the lattice. Using the LDL* tree decomposition of the private basis, sample a close lattice vector via discrete Gaussian distributions — all performed in FFT domain for speed.
Recompute the hash-to-point polynomial, reconstruct the candidate signature vector using only the public key, and check that its L² norm is below the security bound. No private key needed.
falcon-rs is a faithful port of Thomas Pornin's C reference implementation, rewritten entirely in Rust with zero C dependencies. It passes every NIST Known Answer Test for both FN‑DSA‑512 and FN‑DSA‑1024, achieving bit-for-bit parity with the original.
use falcon::prelude::*; // Generate an FN-DSA-512 key pair let kp = FnDsaKeyPair::generate(9).unwrap(); // Sign a message with domain separation let ctx = DomainSeparation::Context(b"my-protocol-v1"); let sig = kp.sign(b"Hello, post-quantum world!", &ctx).unwrap(); // Verify with just the public key FnDsaSignature::verify(sig.to_bytes(), kp.public_key(), b"Hello, post-quantum world!", &ctx).unwrap();
Key generation — the most complex operation, involving NTRU equation solving and LDL* tree construction — is consistently 18–24% faster than the C reference on Apple Silicon. Signing and verification trade marginal speed for constant-time execution, a deliberate security choice.
| Operation | C Reference | falcon-rs | Ratio |
|---|---|---|---|
| 512 KeyGen | 5.55 ms | 4.23 ms | 0.76× ✓ |
| 512 Sign | 213 µs | 279 µs | 1.31× |
| 512 Verify | 14.3 µs | 26.6 µs | 1.86× |
| 1024 KeyGen | 18.6 ms | 15.2 ms | 0.82× ✓ |
| 1024 Sign | 434 µs | 569 µs | 1.31× |
| 1024 Verify | 27.8 µs | 54.5 µs | 1.96× |
Consider "harvest now, decrypt later" attacks: adversaries record encrypted traffic today and store it. When quantum computers arrive, they retroactively break the signatures and decrypt everything. Your data signed with ECDSA in 2026 could be forged in 2035.
FN-DSA is uniquely positioned among NIST's post-quantum standards because of its compact signatures — at 666 bytes (FN-DSA-512), it produces the smallest signatures of any lattice scheme, making it ideal for bandwidth-constrained environments: blockchain transactions, IoT devices, embedded systems, and certificate chains.
falcon-rs brings this to the Rust ecosystem with no_std support, WASM compilation, and a security-audited codebase — making post-quantum signatures accessible everywhere from cloud servers to smart cards to web browsers.
Source code, issues, CI, and full documentation.
github.com/lattice-safe/falcon-rsInstall with cargo add falcon-rs. v0.2.3.
Full Rustdoc for safe_api, domain separation, serde.
docs.rs/falcon-rsThe official NIST specification for FN-DSA.
csrc.nist.gov/pubs/fips/206/ipdThomas Pornin's original Falcon specification and C code.
falcon-sign.infoThe multi-year effort to standardize quantum-resistant algorithms.
csrc.nist.gov/projects/post-quantum-cryptographyPeter Shor — Polynomial-time factoring on a quantum computer.
arxiv.org/abs/quant-ph/9508027Prest, Fouque, Hoffstein et al. — the original paper.
eprint.iacr.org/2019/893crates.io/crates/falcon-rs · docs.rs/falcon-rs · MIT License