Skip to main content

Poseidon

Overview​

Poseidon is an arithmetization-oriented hash function designed for zero-knowledge proof systems. It uses the sponge construction with a permutation built from power map S-boxes (xαx^{\alpha}), MDS matrices, and a mix of full and partial rounds.

  • Authors: Grassi, Khovratovich, Rechberger, Roy, Schofnegger
  • Year: 2019 (ePrint), 2021 (USENIX Security)
  • S-box: xαx^{\alpha} where α∈{3,5,7,11,…}\alpha \in \{3, 5, 7, 11, \ldots\} (smallest α\alpha with gcd⁡(α,p−1)=1\gcd(\alpha, p-1) = 1)
  • Structure: SPN with full rounds + partial rounds

Construction​

State and parameters​

  • State width: tt field elements over Fp\mathbb{F}_p
  • Rate: rr elements (absorbed/squeezed per call)
  • Capacity: c=t−rc = t - r elements
  • Security level: MM bits (typically 128)

Round function​

Each round applies:

  1. AddRoundConstants: xi←xi+ci(r)x_i \gets x_i + c_i^{(r)}
  2. S-box layer:
    • Full round: xi←xiαx_i \gets x_i^{\alpha} for all ii
    • Partial round: x1←x1αx_1 \gets x_1^{\alpha}, others unchanged
  3. MDS mixing: (x1,…,xt)←M⋅(x1,…,xt)(x_1, \ldots, x_t) \gets M \cdot (x_1, \ldots, x_t)

Round structure​

The permutation uses RFR_F full rounds and RPR_P partial rounds, arranged as:

RF/2 full rounds⏟beginning→RP partial rounds⏟middle→RF/2 full rounds⏟end\underbrace{R_F/2 \text{ full rounds}}_{\text{beginning}} \to \underbrace{R_P \text{ partial rounds}}_{\text{middle}} \to \underbrace{R_F/2 \text{ full rounds}}_{\text{end}}

The partial rounds reduce the constraint count in R1CS/Plonk while maintaining security through the surrounding full rounds.

Parameter sets​

Instanceppttα\alphaRFR_FRPR_PSecurity
BN254, t=3t=3BN254 scalar35857128 bit
BN254, t=5t=5BN254 scalar55860128 bit
BLS12-381, t=3t=3BLS scalar35857128 bit

Security timeline​

2019 - Original paper​

Grassi et al. introduce Poseidon with security arguments based on:

  • Interpolation attack resistance: requires αr>p\alpha^r > p
  • Groebner basis attack resistance: assumes semi-regular system
  • Differential/linear attack resistance: negligible probability per trail

2020 - Keller and Rosemarin​

"STARK Friendly Hash Survey" provides Groebner basis experiments on reduced-round variants, suggesting the security margins may be tighter than originally claimed.

2022 - Bariant et al.​

"Algebraic Attacks against Some Arithmetization-Oriented Primitives" shows that the polynomial systems from Poseidon are not semi-regular due to the partial round structure, enabling more efficient Groebner basis attacks than predicted.

2023 - Grassi (degree analysis)​

Tighter bounds on algebraic degree growth through partial rounds.

Sage code​

Reference implementation: sage/poseidon/permutation.sage

References​