Repository navigation
Proposal: Poseidon target definitions (EF KoalaBear and Zcash Orchard instances) #380
Annkkitaaa
started this conversation in
Ideas
Replies: 2 comments 4 replies
|
Thank you so much for posting this! Good idea and very thorough proposal. We have room to add 1 Poseidon instance to HashSmash at this point, so I'm thinking we should add Target B since that's the one that is widely used in practice and has people's savings at stake. |
1 reply
|
Uh, how about you just submit a PR! We can always start with round pair 1, 2. |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Ankita Singh · October 2026
1. Summary
HashSmash's two Poseidon tracks are deferred because the targets have never been defined. I propose two concrete, fully pinned Poseidon collision targets and a small set of conventions that would let the organizers activate both tracks:
For both, I propose reducing only partial rounds, naming tracks by their (R_F, R_P) pair, and seeding each lane with a fully specified generic collision search as its first baseline. The technical justification is in the appendices.
2. Why this matters
The tracks are blocked on definitions, not on solvers. The repository's own deployment checklist requires exact definitions, defensible or explicitly provisional round pairs, and an admissible baseline for each lane before a Poseidon track can open. Its research notes list what is still unpinned: the parameter set, constants, output count, field encoding, and how rounds are removed. The cost model itself states that a field-specific model is required before Poseidon can be activated. This proposal answers each item.
Poseidon is the hash where a collision frontier is most informative. SHA-256, SHA-3 and BLAKE3 (through its BLAKE and ChaCha lineage) have long histories of statistical cryptanalysis behind them. Poseidon is younger, is the default hash in many zero-knowledge systems, and its strongest known attacks are algebraic, a family where published estimates have repeatedly moved in both directions. A public, continuously updated frontier would be new evidence for a primitive that needs it.
The two targets cover the two regimes that matter. Recent analysis (Grassi, Koschatko and Rechberger, ToSC 2025) finds that the best algebraic attack depends on the instance. Over small fields with multi-element outputs, Gröbner-basis attacks using subspace trails are strongest; over fields near 2^256 with one or two output elements, the best attacks instead compute roots of a univariate polynomial or use resultants. Target A sits in the first regime and Target B in the second.
Target B is under-studied by the Zcash specification's own account. Its notes on Poseidon (§5.4.1.10) observe that earlier cryptanalysis focused on x^3, which is not a permutation over the Pallas field, while still stating that the deployed round count carries a significant margin. A frontier on this exact instance would measure that margin directly.
3. Proposed targets
Both targets are taken unchanged from deployed or reference code, so every parameter is pinned to a commit. Full specifications are in Appendices A and B.
4. Proposed conventions
Reduce partial rounds only, and name tracks by their round pair. Poseidon runs R_F/2 full rounds, then R_P partial rounds, then R_F/2 full rounds, so "r rounds" alone does not define a function. HashSmash's prefix convention for SHA-256 and Keccak would delete Poseidon's final full rounds, which no longer gives a Poseidon instance. I propose holding R_F = 8 fixed and stepping R_P, with track names such as
poseidon-pallas-rf8-rp{n}. Removing one partial round removes exactly one S-box, while removing one full round removes t of them (16 for Target A, 3 for Target B), so stepping R_P changes the instance by the smallest possible amount (Appendix C).Respect a floor on R_P for Target A. Subspace trails let an attacker skip up to t − (c + d) partial rounds, with c = 0 in compression mode (Grassi, Koschatko and Rechberger, ToSC 2025). With t = 16 and 8 output words that is at most 8 rounds (7 if Target A's fixed domain word is counted like capacity), so Target A's round pair should sit above R_P = 8.
Fix Target A's output at 8 words. This gives a generic exponent near 124, comparable to the 128-bit display values of the existing tracks. Using all 16 output words would put the generic exponent near 248, too far from any plausible attack to produce a meaningful frontier (Appendix D). The bounty itself treats the number of colliding leading words as a parameter.
Regenerate constants per reduced instance. The reference Grain generator is seeded with R_F and R_P, so a reduced instance generated with its own parameters has different constants from a full instance with rounds deleted. I recommend regeneration for Target A, matching how the EF instances are produced. Target B needs an explicit choice (Section 5).
Seed each lane with a generic baseline. Published Poseidon cryptanalysis is mostly about CICO problems, so there is no established collision frontier yet. The repository's qualification guide accepts a conservative, fully accounted generic construction as a baseline. A parallel collision search scores near the generic exponent (slightly above it once every operation is charged) and gives structural attacks something to beat.
Add one rule for pricing algebraic attacks. The current cost model charges permutation calls and 256-bit word operations and has no rule yet for field multiplications, hidden constants or the matrix-multiplication exponent ω. Appendix E proposes a conversion and lists what the rule must fix.
5. Decisions requested
These choices belong to the organizers; I give a recommendation for each.
6. Next steps
Once the organizers settle the decisions above, I am happy to contribute the pieces needed to activate the tracks:
I welcome corrections to any parameter or citation here, particularly from the Poseidon designers and the Zcash protocol team.
7. About the author
Ankita Singh is a zero-knowledge cryptography researcher. She was previously a ZK cryptography research intern at Nethermind, where she worked on the mathematics of proof systems and arithmetization, and before that an intern at OpenZeppelin, working on Fiat-Shamir soundness and ZK verifier analysis. She has written two research series for ZecHub: the Zcash Foundations Series and the Zcash Formal Verification Series. She holds an MSc in Mathematics and Computing from IIT (ISM) Dhanbad.
Appendix A. Target A specification
Target A is the 2026 EF partial-collision instance exactly as its reference verifier implements it. Every value below was read from poseidon-tools commit 60075da7 (2026-05-14, still the latest commit on 2026-10-06) and checked by running the reference verifier against an independent re-implementation (Appendix G).
Known discrepancy. The repository README describes the hash as compression_mode_hash([0] + inputs); the verifier code prefixes 0xc09de4. The verifier should be treated as authoritative and the point confirmed with its maintainers.
Existing result. A collision on the first 3 of 16 output words for the bounty instance (Beltran, Merz, Rodríguez García, Scarlata) is accepted by the reference verifier for 3 words and rejected for 4. The generic cost for 3 words is about 2^46.5, so this result does not by itself indicate a structural weakness.
Appendix B. Target B specification and Zcash relevance
Target B is the P128Pow5T3 instance deployed in Zcash Orchard. Values were read from zcash/halo2, crate halo2_poseidon 0.2.0, which the orchard crate (0.16.0) depends on; its constants are identical to those in halo2_gadgets in May 2022, before NU5 activated. They match the Zcash Protocol Specification v2026.7.0, §5.4.1.10. All 192 round constants and the MDS matrix were regenerated from scratch with an independent port of the reference generator, and the instance reproduces all 22 official Zcash test vectors (Appendix G).
Where Zcash relies on it. Orchard defines PRF^nfOrchard_nk(ρ) := PoseidonHash(nk, ρ) (spec §5.4.2), and the spec's abstract requirements (§4.1.2) state that PRF^nfOrchard must be collision-resistant across all keys. A collision on this PoseidonHash would therefore violate a documented Zcash requirement. It would not by itself break Orchard: §8.4 states that Orchard's Faerie Gold resistance depends only on the hardness of discrete logarithms, and the §5.4.1.10 notes argue that the nullifier construction stays secure under DDH even if the Poseidon PRF were weak. The imt-tree crate, an indexed Merkle tree for nullifier non-membership proofs from the vote-nullifier-pir project for Zcash voting (related to the draft zips PR #1198), also uses P128Pow5T3 as its node hash, where collision resistance matters directly.
Why the instance is under-studied. The §5.4.1.10 notes observe that previous Poseidon cryptanalysis focused on x^3, which is not a permutation over the Pallas field, and that q_P − 1 is divisible by 2^32, a property earlier cryptanalysis (Beyne et al., 2020) suggests may favour integral attacks. The same notes state that the deployed round count includes a significant security margin.
Closest published analogue. The EF 2024 bounty instances "Poseidon-256" (BLS12-381 scalar field, t = 3, x^5, R_F = 6) at R_P = 8 and R_P = 9 are listed as claimed by the Poseidon Initiative, and Bak et al. (ePrint 2026/150) report CICO-1 solutions for both using univariate root-finding. CICO is a preimage-type problem, so these results indicate scale rather than a collision baseline.
Appendix C. Reduction-schedule argument
C.1 The prefix convention does not transfer. For SHA-256 and Keccak, HashSmash executes the first r rounds. Applied to Poseidon, a prefix cut deletes the final full rounds, which the HADES design uses to resist statistical attacks. The result is not a member of the Poseidon family.
C.2 Partial rounds give the finest granularity. A full round applies the S-box to all t words and a partial round to one, so removing a partial round removes exactly one S-box while removing a full round removes t (16 for Target A, 3 for Target B). The univariate degree of an output grows by one factor of α per round of either kind, which a toy experiment confirms (Appendix G); what separates the two kinds of round is the number of S-boxes, and so the number of nonlinear equations an algebraic attacker must handle. Stepping R_P changes the instance by the smallest possible amount.
C.3 Full rounds interact with known round-skipping tricks. Bariant, Bouvier, Leurent and Perrin (ToSC 2022) introduce a technique that removes about two full rounds at little or no cost in CICO attacks on SPN-based primitives, which they used to solve Poseidon challenges. Varying R_F would mix this structural effect into the frontier; fixing it keeps the statistical margin intact and isolates one question: how collision cost falls as partial rounds are removed.
C.4 Precedent supports stepping R_P. The 2026 EF instance fixes R_F = 8 and sets R_P = 20. The 2024 EF bounty instead stepped R_P with R_F fixed: Poseidon-256 used R_F = 6 with R_P = 8, 9, 11 and 16, and Poseidon-64 used R_F = 6 with R_P = 7, 8, 10 and 13.
C.5 Constants must be pinned per reduced instance. The reference Grain LFSR is seeded with R_F and R_P (grain_lfsr.py, state bits 28 to 47), and so is the Zcash reference generator, so a reduced instance generated with its own parameters has entirely different constants from the full instance with rounds deleted (checked by regenerating Target A with R_P = 19 and R_P = 20). Reduced Target B instances must use the Zcash reference generator, whose bit layout differs from the EF tool's.
C.6 Subspace trails set a floor on R_P. Grassi, Koschatko and Rechberger (ToSC 2025) show that an attacker can skip 1 ≤ ℓ ≤ t − (c + d) partial rounds via a subspace trail, where c is the capacity and d the digest length, setting c = 0 for compression mode. For Target A (t = 16, d = 8) this gives 8, or 7 if the fixed domain word is counted like capacity; for Target B (t = 3, c = 1, d = 1) it gives 1. The linear algebra behind the trail was checked with the real MDS matrices: keeping r consecutive partial-round S-boxes inactive leaves a difference subspace of dimension exactly t − r (Appendix G).
Appendix D. Generic collision bounds
Values are the birthday exponent q·log2(p)/2 in permutation calls, computed from the exact moduli. Like HashSmash's existing nominal references, they are not attacks or baselines.
For Target B, the sponge capacity is also one element, so a generic inner-state collision costs about the same 2^127. Target A runs in compression mode with a feed-forward, so no capacity limit applies; the matching side condition is p^(t − d) ≥ 2^κ against guessing the truncated words (Grassi, Koschatko and Rechberger 2025), and t − d = 8 words gives about 248 bits.
Appendix E. Cost-model considerations
The collision-frontier-v5 model charges one unit per call to the selected-round permutation and 1/C units for every other 256-bit word operation, where C is a per-target reference operation cost. It states that a field-specific model is required before Poseidon activation, and it has no rule yet for algebraic attacks, which are the strongest known attacks on Poseidon. Four points need a rule:
Appendix F. Related cryptanalysis
Published Poseidon cryptanalysis is mostly about CICO problems, so there is no established ordinary-collision frontier yet. The results most relevant to these targets:
Appendix G. Verification performed
Every parameter and computed value in this proposal was checked by running code on 2026-10-06, not only by reading documentation. The scripts are available on request.
Target A. The EF reference verifier (commit 60075da7) was executed alongside an independent re-implementation of the permutation and compression mode; outputs agree on 20 random inputs. Confirmed: p = 2^31 − 2^24 + 1 is prime; α = 3, t = 16, R_F = 8, R_P = 20, 16 output words; gcd(3, p − 1) = 1; domain constant 0xc09de4; MDS is the fixed Cauchy matrix 1/(i − (t + j)); 28 rows of round constants. The published 3-word collision is accepted for 3 words and rejected for 4. Regenerating with R_P = 19 changes the round constants.
Target B. All 192 round constants and the MDS matrix were regenerated from scratch with an independent Python port of the Poseidon v1.1 reference generator (pasta-hadeshash), using the parameters stated in the Zcash specification (field size 255, t = 3, R_F = 8, R_P = 56, Pallas modulus). They match the constants in halo2_poseidon exactly. An independent permutation with these constants reproduces all 11 official Orchard permutation vectors and, with capacity 2^65, all 11 official PoseidonHash vectors from zcash-test-vectors. Negative controls fail as they should: constants generated for R_P = 57, or a capacity of 0, do not reproduce the vectors. Also confirmed: gcd(5, p − 1) = 1 while gcd(3, p − 1) ≠ 1, p − 1 has 2-adicity exactly 32, Orchard's prf_nf calls P128Pow5T3 with ConstantLength<2>, and the halo2_poseidon constants are unchanged since May 2022.
Computed values. Generic exponents in Appendix D and multiplication counts in Appendix E were produced by running code. The subspace-trail linear algebra was checked with both real MDS matrices: requiring r consecutive partial-round S-box inputs to be inactive leaves a difference subspace of dimension exactly t − r for every r. On a toy Poseidon-like instance over F_257 with x^5, the univariate degree of an output after 1, 2 and 3 rounds of any mix of full and partial rounds is exactly 5, 25 and 125.
Sources. HashSmash statements were checked against the repository at commit 86f1102. Paper titles, authors and claims in Appendices C and F were checked against the papers' ePrint or journal pages; the bounty instances in Appendix B and C.4 against the Poseidon Initiative site.
References
Verification scripts: https://gist.github.com/Annkkitaaa/029504cd63f47b8c4c2f435ecccb6cf2
All reactions