# Security notes This research profile targets 160-bit classical hash preimage resistance. Its two signing lifetimes come from a model of FORS secret reuse. The figures describe one component of the scheme. A whole-scheme reduction and independent security review remain open. ## What is claimed The goal is existential unforgeability under chosen-message attack (EUF-CMA): an attacker who sees signatures on messages of its choice cannot produce a valid signature on any other message, while each key stays within its signing budget. The randomizer and the message digest take the message itself, so this does not rest on the collision resistance of any hash of the message ([specification, section 3](spec.md#3-hashes-and-addresses)). Nothing more is claimed. The properties that the BUFF transformation of Cremers, Düzlü, Fiedler, Fischlin and Janson adds ([ePrint 2020/1525](https://eprint.iacr.org/2020/1525)) concern a dishonest key owner, and none of them is a goal here: - **Exclusive ownership:** a signature verifies under one public key only, even one an attacker built. - **Message-bound signatures:** a signature verifies for one message only, even under a key an attacker built. - **Non-resignability:** someone who sees a signature but not its message cannot sign that message under another key. ECDSA, which Zcash transparent outputs use today, has none of them, and a transparent output does not need them: it commits to the hash of the public key or script that may spend it, and the signed message is a transaction digest that commits to the whole transaction. The digest here still takes the public key and the message, which makes these attacks harder than for ECDSA but gives no 160-bit bound. For example, a dishonest key owner can make one signature valid for two messages by finding two whose digests agree in the 212 bits that signing reads, which generic collision search does in about 2^106 hash evaluations. ## Signing lifetime | Signer | Possible FORS positions | Required lifetime | Modeled signatures at the 160-bit crossing | | --- | ---: | ---: | ---: | | Regular, 7, 1 and 1 bits pruned | 2^23 | 2^21 | 2^21.48 | | Custody, all layers unpruned | 2^32 | 2^28 | 2^28.78 | Signing exposes one of 1,024 secrets in each of eighteen FORS trees at a selected position. Reusing a position increases coverage of each tree. The Bonsai estimate averages over signing randomness, with its pruning model for regular keys. These crossings concern an attacker seeking a fresh digest covered by previously exposed secrets. They are expected-model figures. Individual signing histories vary. The signer is stateless and does not count or enforce these budgets. The specification makes them a requirement on signers ([section 5](spec.md#5-signing)), and the table below shows how quickly security falls past them. [Parameter study](https://bonsai.valargroup.dev/) ### Average and unlucky keys The crossings are averages over keys. Each key's signing history differs: some positions are used more often than others, and those positions dominate a forger's chance. The table gives a forger's chance per guess, in bits, for the average over keys, the median key and the weakest 1% and 0.1% of keys. Running `python3 fors_keys.py` in [`host/`](../host/fors_keys.py) prints it from 100,000 simulated keys per row with a fixed seed. Its model is the one above: signatures pick live positions uniformly, a guess picks any of the 2^32 positions and eighteen leaves, and a position used r times counts with its expected coverage. It leaves out the spread between positions used equally often, and it treats the number of signatures as Poisson-distributed. | Signer | Signatures | Average over keys | Median key | Weakest 1% | Weakest 0.1% | | --- | ---: | ---: | ---: | ---: | ---: | | Regular | 2^21 | 162.8 | 163.2 | 161.0 | 158.0 | | Regular | 2^21.48 | 160.0 | 160.3 | 157.8 | 155.0 | | Regular | 2^22 | 156.8 | 157.1 | 154.7 | 152.3 | | Regular | 2^24 | 141.6 | 141.7 | 140.7 | 139.7 | | Regular | 2^26 | 121.0 | 121.1 | 120.9 | 120.6 | | Regular | 2^28 | 94.3 | 94.3 | 94.2 | 94.2 | | Custody | 2^28 | 163.5 | 163.6 | 162.9 | 161.2 | | Custody | 2^28.78 | 160.0 | 160.1 | 159.4 | 157.8 | | Custody | 2^30 | 153.8 | 153.8 | 153.2 | 152.9 | | Custody | 2^32 | 140.8 | 140.8 | 140.6 | 140.3 | At the 160-bit crossings, one key in a thousand is about 5 bits weaker than the average for regular keys and about 2 bits for custody. Past the crossings the average falls quickly and the keys converge on it. ## Key separation and message hashing Both secret inputs key the HMAC derivation of each secret seed, and mode and role enter its message, so restoring the same inputs in different modes yields distinct one-time secrets. The two keys still share the public seed, and with it their hash functions ([specification, section 4](spec.md#4-key-generation)). The derivation also hashes a block holding every parameter and label that decides what a one-time key signs ([specification, section 4](spec.md#4-key-generation)). Some of these, such as the digit sum and the live heights, change no signature byte. Without the block, a retuned parameter set of the same size and label would make the same one-time keys sign different digit sets or different tree roots. With it, any such change gives unrelated secrets. The same inputs also give unrelated secrets here and in earlier constructions in this repository: the 8,100-byte profile used the inputs directly, and the first 7,860-byte derivation used the label `ZPQ-SHA2-160/7860/key/v1` with no parameter block. Regular setup commits to seven derived right siblings in the top tree. Each lower tree uses one derived right sibling. Their HMAC inputs include the layer, tree number, node height and index. The device checks the complete path against its own root before it releases any signature bytes. The pruning model motivates the size of the live subtree. A security reduction for these particular derived siblings remains open. The message enters the signature only through the randomizer and the two-stage digest, which both take the exact message bytes. The randomizer is keyed by SK.prf and comes before the message in the digest, so an attacker who chooses messages cannot predict which FORS secrets a signature will reveal, and cannot prepare two messages in advance that share a digest. A forger therefore needs a fresh digest covered by revealed secrets, which is the FORS signing budget above, not a hash collision. This is the layout of FIPS 205's pure SLH-DSA. It is an argument, not a proof. The specification lists every hash input and why no two calls share one ([section 3](spec.md#3-hashes-and-addresses)). ## Quantum attacks Every other margin in these notes is classical. The figures below are generic estimates for the hash functions alone, not an analysis of this construction. - **Preimages and second preimages of 160-bit nodes.** Grover's algorithm needs about 2^80 hash evaluations in sequence. It does not parallelise well: P machines shorten the search only by a factor of √P, so a search limited to D sequential hash evaluations costs about max(2^80, 2^160 / D) evaluations in total. Once D reaches 2^80, one machine can finish the search. NIST suggests depth limits of 2^40 to 2^96 logical gates, and one hash evaluation is many gates deep. Attacking many targets at once lowers these costs, as it does classically. - **Security categories.** NIST defines category 1 by key search on AES-128, which it estimates at 2^170 / MAXDEPTH quantum gates or 2^143 classical gates, and category 2 by collision search on SHA-256 ([call for proposals, 2016](https://csrc.nist.gov/CSRC/media/Projects/Post-Quantum-Cryptography/documents/call-for-proposals-final-dec-2016.pdf), section 4.A.5). FIPS 205 assigns its parameter sets with 16-byte hashes to category 1 ([FIPS 205](https://csrc.nist.gov/pubs/fips/205/final), section 11), on the strength of the SPHINCS+ analysis. This scheme's 20-byte hashes cost more to invert generically, but no category is claimed: the construction, its multi-target exposure and its one-time-signature and pruning rules have not been analysed against the category definitions. - **Collisions of the message digest.** Unforgeability does not rest on them. Only a dishonest key owner gains from two messages whose digests agree in the 212 bits that signing reads (see "What is claimed"). The algorithm of Brassard, Høyer and Tapp needs about 2^71 queries for that (2^(n/3)) and as much quantum-accessible memory. Classical search needs about 2^106. ## What is and is not proven No proof covers the whole scheme. The table lists each component, what it needs and which published proof comes closest. | Component | Assumption | Closest published proof | Gap | | --- | --- | --- | --- | | FORS, 18 trees of height 10 | Secrets from F are pseudorandom. F and T resist second preimages at addressed targets. A fresh digest is unlikely to land on revealed secrets (the signing lifetime above). | SPHINCS+ ([ePrint 2019/1086](https://eprint.iacr.org/2019/1086)) and its tight proof by Hülsing and Kudinov ([ePrint 2022/346](https://eprint.iacr.org/2022/346)), for FORS with tweakable hashes | No bound is computed for these parameters, 20-byte nodes or this SHA-2 instantiation. The open Lean work ([pull request 5](https://github.com/valargroup/bonsai/pull/5), [pull request 7](https://github.com/valargroup/bonsai/pull/7)) bounds FORS coverage in a model where signing views are independent, and the chance that a fresh hash reply matches a recorded one-time encoding. It does not prove unforgeability, and it models the earlier 7,860-byte construction. | | Fixed-sum one-time signatures with a zero leading bit | Chains resist preimages. The digit hash resists a targeted match on all 160 bits. Every signer uses the smallest counter. | SPHINCS+C ([paper](https://csrc.nist.gov/csrc/media/Events/2022/fourth-pqc-standardization-conference/documents/papers/sphincs-plus-c-pqc2022.pdf), Theorem 5.2 and appendix B) | SPHINCS+C hashes the signed node and counter under a tweak of its own. Here the digit hash shares address type 0 and its words with the first step of chain 0, and only its label and input length set it apart. The leading-bit rule and these parameters have no computed bound. No verifier can check the smallest-counter rule. | | Hypertree of heights 16, 8 and 8 | T resists second preimages at addressed targets. | The same SPHINCS+ proofs, for hypertrees of tweakable hashes | As for FORS: no bound for this instantiation and these heights. | | Regular-mode derived siblings | HMAC-SHA-512 under SK.prf is a pseudorandom function. | None | Open. One-time keys of the upper layers sign roots that include these nodes. | | Message hash, randomizer and digest | HMAC-SHA-512 under SK.prf is a pseudorandom function. The digest behaves like a random function of its input. | The SPHINCS+ proofs, which assume a pseudorandom randomizer and interleaved target subset resilience of their own message hash | The layout differs, with two stages. A regular signer keeps the first of about 512 candidates whose position is live, so the randomizer it publishes is not a plain pseudorandom output. Whether the SPHINCS+ argument carries over is not shown. | ## Assumptions and limits - The tree hashes require pseudorandom secret derivation and second-preimage resistance across addressed targets. The raw 160-bit preimage exponent alone does not bound the complete construction. - The HMAC-derived randomizer is assumed unpredictable to a chosen-message adversary. Regular signing accepts one in 512 positions on average. Custody accepts its first position. Ordinary FORS grinding is zero in both modes. - Every valid one-time signature requires a zero leading digit-hash bit and digit sum 232 across the remaining 53 digits. Raising one digit requires lowering another, which requires a chain preimage. The digit hash shares an address type with a chain step, with distinct input lengths and prefixes. [SPHINCS+C](https://csrc.nist.gov/csrc/media/Events/2022/fourth-pqc-standardization-conference/documents/papers/sphincs-plus-c-pqc2022.pdf) - The fixed-sum argument needs the digit hash to resist a targeted match on all 160 bits, the leading bit included. Given one revealed digit set, a forger who finds another node and counter whose digit hash has a zero leading bit and exactly those digits needs no chain preimage. - Each one-time key releases exactly one digit set. Every one-time key always signs the same node, so this holds while every signer uses the smallest qualifying counter and computes that node correctly ([specification, section 5](spec.md#5-signing)). A signer that searches counters in another order or skips a counter breaks it, and every signature it produces still verifies. Both secret inputs enter both secret seeds, so reusing one input with a different partner makes a new key rather than breaking this. With two digit sets an attacker knows each chain at the lower digit and forges a one-time signature for that key in about 2^62 hash trials (median). With three, about 2^41. Verifiers do not check counter minimality. - Each key's public seed is uniformly random and belongs to no other key ([specification, section 4](spec.md#4-key-generation)). Keys that share a seed share every hash function and so pool their second-preimage targets. Nothing in a public key or signature shows whether its seed was chosen this way. - Multi-key and whole-scheme bounds remain open, and the quantum figures above are generic. The leading-bit rule, fixed sum and pruning at all three layers require analysis for this construction. ## Signing devices These points concern a device that holds a real key. They do not affect verifiers. - **Fault injection.** Signing is deterministic and the firmware streams the signature as it computes it. In this family of schemes, one corrupted tree computation makes a one-time key sign two different values, and the faulty signature still verifies. A few such signatures let an attacker forge (Castelnovi, Martinelli and Prest, Grafting Trees, [ePrint 2018/102](https://eprint.iacr.org/2018/102); Genêt, Kannwischer, Pelletier and McLauchlan, [ePrint 2018/674](https://eprint.iacr.org/2018/674)). The known defence is to compute each tree twice and compare, which roughly doubles signing time (Genêt, On Protecting SPHINCS+ Against Fault Attacks, [ePrint 2023/042](https://eprint.iacr.org/2023/042)). A fault that only disturbs the one-time counter search, for example by skipping the smallest qualifying counter, gives a valid signature that releases a second digit set. Verifying the signature before releasing it does not detect this. Only computing it twice and comparing does. The research firmware does neither. - **Power analysis.** The secret seed is hashed with a known, changing address tens of thousands of times per signature, the setting of published attacks on this family (Kannwischer, Genêt, Butin, Krämer and Buchmann, Differential Power Analysis of XMSS and SPHINCS, COSADE 2018). The research firmware uses plain assembly hashes and does not wipe key material. - **The research firmware uses public test seeds.** Anyone can sign with its keys. It asks for no confirmation on the device. ## Related work - [NIST SP 800-230, initial public draft](https://csrc.nist.gov/pubs/sp/800/230/ipd) (April 2026) adds six SLH-DSA parameter sets limited to 2^24 signatures per key, with smaller signatures and faster verification than the FIPS 205 sets. - Kudinov and Nick, Hash-based Signature Schemes for Bitcoin, [ePrint 2025/2203](https://eprint.iacr.org/2025/2203), study SPHINCS+ variants with limited signature counts for Bitcoin and report signatures of roughly 3.4 to 4.0 KB at 128-bit hashes. ZPQ-SHA2-160 signatures are larger than both because nodes are 160 bits wide and because its base-8 chains were chosen to keep signing fast on a hardware wallet.