A Rust implementation of the Gravity-post-quantum signature schemes.
To configure the scheme's parameters (height of Merkle trees, number of subtrees, size of cache, etc.), modify them in the file src/config.rs.
There is currently no option to do this at runtime.
Extensive unit tests are implemented to check the logic of the signature scheme. High-level test vectors generated with the reference C implementation check the overall consistency.
You may want to use cargo test --release, because the implementation is quite slow in non-release mode.
The Gravity-SPHINCS signature scheme is still young and has not yet been independently audited, nor has this code. For now, this is simply a proposal so don't use it in production!
MIT
Research papers:
- SPHINCS: practical stateless hash-based signatures (2014)
- Clarifying the subset-resilience problem (2017)
- Improving Stateless Hash-Based Signatures (2017)
- The SPHINCS+ Signature Framework (2019)
- Recovering the Tight Security Proof of SPHINCS+ (2012)
- SPHINCS+C: Compressing SPHINCS+ With (Almost) No Cost
- Revisiting the Constant-sum Winternitz One-time Signature with Applications to SPHINCS+ and XMSS (2023)
- At the Top of the Hypercube -- Better Size-Time Tradeoffs for Hash-Based Signatures (2025)
- Shorter Hash-Based Signatures Using Forced Pruning (2025)
- Extending the SPHINCS+ Framework: Varying the Tree Heights and Chain Lengths (2025)
- Shorter Hash-based Signatures via Bucket Thinning (2026)
- Shorter Few-Time Signatures from Hash Chains and Blockwise Forced Pruning (2026)
- Shorter Hash-Based Signatures via Guarded Sharing in a DAG Model (2026)
Standards:
- FIPS 205 - Stateless Hash-Based Digital Signature Standard
- NIST SP 800-230 (Initial Public Draft) - Additional SLH-DSA Parameter Sets for Limited Signature Use Cases
- SPHINCS+, Submission to the NIST post-quantum project, v.3.1
Related projects: