arXiv:2609.31087cs.CRSep 2026

Manuscript Offprint

arXiv:2609.31087

BenX: Resource-Sharing Permutations for Computational Integrity

Luca Campa, Thomas De Cnudde, Al Kindi, Arnab Roy, Fabian Schmid, Markus Schofnegger, Stefano Trevisani

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Luca Campa 1^{1} ID^{ID}, Thomas De Cnudde 2^{2} ID^{ID}, Al Kindi 3^{3}, Arnab Roy 4^{4} ID^{ID}, Fabian Schmid 5^{5} ID^{ID}, Markus Schofnegger 6^{6} ID^{ID}, and Stefano Trevisani 7^{7} ID^{ID}

1^{1} campa1102@gmail.com

2^{2} Fhenix, Tel Aviv, Israel

thomas.decnudde@proton.me

3^{3} Miden, Dubai, United Arab Emirates

al.kindi@miden.team

4^{4} arnab.roy@windowslive.com

5^{5} Technical University of Graz, Graz, Austria

fabian.schmid@tugraz.at

6^{6} [[alloc] init], New York, USA

markus.schofnegger@gmail.com

7^{7} stefanotrevisani98@gmail.com

Abstract. Cryptographic hash functions over integers modulo a prime play a decisive role in the efficiency and security of proof systems for computational integrity. Early designs focused on compact arithmetic circuits and efficient software execution, primarily targeting general-purpose CPUs rather than hardware accelerators. This work focuses on enabling efficient resource sharing and hardware acceleration alongside efficient software execution.

We propose BenX, a permutation-based hash function designed for hardware acceleration, fast CPU execution, and low circuit complexity in proof systems. To construct the underlying permutation, we turn the Beneš network into an invertible function over Fp2\mathbb{F}_p^2 using a Dickson polynomial. Its structure yields a permutation particularly suited to hardware resource sharing and acceleration.

Fully pipelined on FPGA, BenX matches the throughput of POSEIDON2, with 1.36× and 2.15× lower latency for Goldilocks and BabyBear, respectively. Although larger as a standalone core, it makes more effective use of shared hardware: in our dual-mode architecture, where the NTT and hash share field multipliers, BenX keeps 100% of them busy, compared with 6.25–20.3% for the partial rounds of POSEIDON and POSEIDON2. In software, BenX outperforms POSEIDON in all tested 31- and 64-bit configurations, but is slower than POSEIDON2, except for the 16-element BabyBear instance. In zero-knowledge proofs, BenX proves Goldilocks permutations 6–10× faster than Monolith. Its compact arithmetization uses about 36% fewer trace cells than POSEIDON and POSEIDON2 over BabyBear, while its fast variant requires 1.3–2.6× the prover time of POSEIDON2.

Keywords: Hash Function · Benes Network · NTT · Zero-Knowledge Proofs

1 Introduction

Since their conception [3], Arithmetization-Oriented (AO) cryptographic primitives over prime fields have become an important building block of modern zero-knowledge (ZK) proof systems. Due to compact algebraic structure, these constructions can substantially reduce the cost stemming from the underlying constraint system. Recently, a number of ZK proof systems has focused on ‘small’ prime fields whose arithmetic enables efficient use of the native datapaths and computational resources of modern hardware. Prominent examples include Plonky2 [65], which employs the 64-bit ‘Goldilocks’ field, and the RISC Zero zkVM [23], which instantiates its STARK over the 31-bit ‘BabyBear’ field. More recently, Circle STARKs [44] enabled efficient STARK constructions over the Mersenne prime p=231−1p = 2^{31} - 1. The growing adoption of small-field proof systems in turn motivated the corresponding constructions of AO primitives. For example, the Poseidon2 [42] hash function provides dedicated Goldilocks and BabyBear instances, while Tip5 [74] targets Goldilocks specifically, illustrating the efforts toward small-field-aware design.

HARDWARE UTILIZATION IN ZK PROOF SYSTEMS. Despite significant progress at the design level, the scaling of ZK proof systems continue to impose substantial computational and architectural demands. This motivates a holistic approach to algorithm-hardware co-design across the cryptographic stack.

The importance of hardware efficiency is increasingly evident in contemporary ZK implementations, where prover performance is often limited by a small set of highly repetitive arithmetic kernels. In such a context, FPGA-based implementations become particularly attractive: beyond parallelism opportunities, they enable fine-grained specialization of finite-field arithmetic, configurable datapaths, and explicit sharing of expensive resources such as modular multipliers, reduction units, memories, and interconnect. Such resource sharing is especially important in ZK workloads, where area efficiency and memory bandwidth frequently constrain the degree of exploitable parallelism. Indeed, substantial effort [82,60,68,71] has been devoted to explore FPGA-based (and GPU-based) acceleration of dominant ZK frameworks components.

However, when considering existing AO primitives, their internal structure may lead to inefficient hardware utilization when implemented directly, for example by requiring many concurrent nonlinear units. This observation is explained by the fact that, while substantial effort has been devoted to accelerating the surrounding proof-system machinery [50,24,1,79], comparatively less attention has been paid to the design of AO primitives themselves with efficient hardware realization as a first-class objective. This gap has only recently been recognized in RainHash2.0 [32] by addressing hardware friendliness of AO hash functions by design.

RESOURCE SHARING WITH NTT. One of the most central computational kernels for ZK proof systems is the Number Theoretic Transform (NTT), which is used extensively for polynomial evaluation, interpolation, and low-degree extensions (LDE). Consequently, NTT computation represents a major target for ZK hardware acceleration [79,80], as can be seen from practical FPGA-oriented efforts like ZPrize [81], and existing ZK accelerators devote substantial hardware resources to NTT execution, often alongside other dominant prover kernels such as Multi-Scalar Multiplication (MSM) and hashing.

A pipelined NTT datapath consists mainly of butterfly units, routing logic, and storage, with modular multiplication among its most expensive elements. High-throughput designs therefore instantiate multiple multipliers and aim to keep them highly utilized [80,79]. This motivates reusing these arithmetic units across prover phases: similar resource sharing between NTT and MSM has already been explored [29]. We investigate whether the same principle can be extended to hashing, utilising the NTT datapath for the hash function with minimal additional hardware.

Thus, the foundational architectural question behind our work is: Can an AO hash function be designed to map efficiently onto the computational structure of an NTT? This objective imposes several constraints on the hash design. First, state elements should undergo a similar number of multiplications, allowing the available multipliers to be utilized uniformly, thus making highly asymmetric constructions, like extensive partial rounds, less attractive. Second, bitwise operations and lookup tables should be avoided, as they require functionality that is not naturally provided by an NTT datapath. Finally, nonlinear layers requiring many sequential multiplications, such as large or inverse power maps, are undesirable, since they either require additional arithmetic resources or multiple passes through the shared datapath. These considerations motivate an AO primitive whose computational structure is closely aligned with that of the NTT.

Related Work. Hash functions related to the NTT have been proposed in several works, albeit with different targets in mind. SWIFFT in particular stands out as a compression function with no practical attacks known to date [56]. It evaluates a structured linear map (a fixed negacyclic convolution in Rq=Zq[x]/(xn+1)R_q = \mathbb{Z}_q[x]/(x^n + 1) realizable efficiently with an NTT, with collision resistance based on the hardness of ideal-SIS [56]. However, its inputs are binary vectors, reducing efficiency per hashed bit, and its linear structure means it lacks pseudorandomness and is not typically modeled as a random oracle, limiting its suitability for ZK applications. Vision Mark-32 [7] is another hardware-friendly design and was designed with binary fields in mind, whereas we look specifically into prime field hash functions.

References (74)