Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Nullifier Analysis

TL;DR: our conclusion recommends Attempt 3 which directly use Poseidon permutation to derive nullifers per squeeze; thus nullifier derivations per PCD step.

Background

Excerpt from the Tachyon deep dive below.

A Tachyon note is:

where is the payment key, is the value of the note, is pseudo-random note identity that binds to the note nullifier value as an input to its derivation, and is a random commitment trapdoor.

The ideal functionality for an epoched nullifier is a deterministic function:

whose outputs are indistinguishable from random bytes. Such an binds to both the spending authority (via ) and the underlying note (via its per-note trapdoor ), while remaining unlinkable across epochs to anyone without .

We proposed a GGM-based nullifier whose derivation requires walking a tree where descending one level involves a Poseidon hash. The construction details are irrelevant thus skipped here. The main takeaway is: a single nullifier derivation (full tree walk) already saturates the circuit capacity for a PCD step!

GGM Cost: Calculation Details

The GGM tree size is determined by how large of the epoch space do we want to support. A depth- tree implies the largest epoch value being . Assuming 1 day/epoch, this translates to 45 years in the future which is reasonable. A full root-to-leaf walk of such tree requires Poseidon hashes.

Step circuit size (max_mul_gates) is . Since our constraint system allows linear constraints, this budget is overly abundant and we only focus on multiplication constraints. Step capacity for Poseidon is (see here) as per-permutation gate cost is .

With a mixed-arity optimization of the tree, where the arity is higher towards the root and binary towards the leaf, we can cut down the depth to 7, thus fit a full derivation in a single step.

Ideally, we want to fit more (at least two) nullifier derivations in a single step. For example, the NfDerive step derives both and for the spending epoch in a single step. Therefore, the challenge is to find alternative nullifier constructions with lower circuit complexity.

The high-level idea is to construct a degree- polynomial such that:

  • is keyed by so that only -holder (namely note owners) knows the full and its derivation is bound to the specific note identity .
  • Highly efficient to evaluate : only work.
    • epoch domain size
  • Given any set of evaluation points and their evaluations , any evaluation outside the set is indistinguishable from random.
    • strictly stronger requirement than "cannot compute ": unpredictability is insufficient; semantic security is necessary for spend unlinkability.
    • relaxing statistical indistinguishability to computational expands the design space.

This alternative is a promising direction because proving derivation is now an evaluation claim, which can be either proven directly in circuit (only field ops) or piggyback on the online polynomial oracle exposes by the Ragu proof system (low circuit cost).

Threat Model

We discuss security from the perspective of recipients whom we address to as "users". Senders and syncing services (OSS) are untrusted. Here are the assumptions/setup:

  • : picked by the sender.
  • : privately known to the user.
  • OSS can derive nullifiers for a finite range of delegated epochs. They cannot locate/link the note commitment or future nullifiers outside the range.
  • malicious users try to double-spend by publishing for the same note in any epoch that both pass the derivation integrity check.

Attempt 1: Statistically Indistinguishable

Attempt 1.1: User-sampled

  • User randomly samples a of bounded degree, commits to it and sends to the sender.
    • to support epoch range , take which is years assuming a 1 day/epoch pace
  • Sender prepares the Output note by setting . Effectively, the commits to the nullifier polynomial.
    • user wallet rejects incoming note with unknown/wrong/repeated
  • OSS directly receives a single PCD proof attesting for the delegated range .

Pros:

  • The circuit cost is minimum: load the note opening and as secret witness, enforce in circuit, then append a PCS eval claim of form to the polynomial oracle.
  • Proving multiple is practically free since querying multiple points on an already committed polynomial in our polynomial oracle incurs negligible cost.
    • Note that we don't need to witness the actual or evaluate it in circuit thanks to the oracle, thus no special structure required for .
  • Statistical indistinguishable due to random sampling and the assumption where is the epoch domain. In practice, coefficients are PRF-derived from some master seed.

Cons:

  1. UX nightmare: every new note requires user involvement (freshly samples then sends OOB).
  2. Fully proven by the user: proving the derivations of all nullifiers is the responsibility of the user.

Among the two disadvantages, the interactive UX is the hairy one. Naturally, a user can preload a sequence of future to the sender out-of-band. However, this would increase the state management overhead since the wallet needs to track all previously issued but yet unused to reject incoming notes of unknown/repeated .

Meanwhile, user-proved derivation is arguably inevitable (for all our attempts). The OSS cannot learn the full since otherwise all future nullifiers are computable and spend unlinkability is violated. Unlike GGM, the user cannot prove a partial derivation and defer to OSS to complete the rest. 1 Instead, the user has to prove the full derivation because we cannot come up with scheme that enables OSS to finish a partial evaluation without leaking the description.

In practice, proving nullifiers of the delegated range can happen before or after the OSS work. The concrete design is outside the scope of this analysis. Regardless, the OSS blindly trust the list of nullifiers supplied by the user and accumulate them as he syncs spendability proofs. These accumulated nullifiers would be proven correct when OSS hands back the spendability proof to the user who can fuse it with proof of nullifier derivations.

Attempt 1b: Constrained Sampling

An attempting reaction to avoid the user/recipient interaction is to switch to sender-sampled random polynomials. However, there's a conflict between privacy and -binding. If the full if sampled by the sender, we lose spend unlinkability since the sender can derive all nullifiers. If the sender only contributes a partial polynomial and leaves some degree of freedom to the recipient, then we cannot bind via at note creation time.

To circumvent this issue, we can let sender pick arbitrary , but binds it at the user/recipient side who must enforce coefficient sampling in-circuit:

Since coefficients binds to , it transitively binds to . The problem with this approach is its high circuit cost: when instantiating with Poseidon-based sponge construction for variable-length output, to witness the full in-circuit requires Poseidon permutation, a higher cost than the original GGM construction.

Attempt 2: Product of Sparse Polynomials

To eliminate recipient interaction during note creations, we avoid user-sampling of coefficients. Instead, we explore a structured where the description (i.e. coefficients) is fully determined by , thus its evaluation is enforced through proofs that and . For circuit efficiency, we need to find a with sublinear evaluation logic which implies structured polynomials with concise algebraic descriptions.

Here, "concise" means fewer than independent coefficients, not just a short generator program (that could expand a random seed into sufficient entropy). Particularly, we relax our indistinguishability from statistical to computational in pursuit of circuit efficiency. We argue that this relaxation is inevitable when going beyond attempt 1.

We explore the first approach here and the second approach in the remaining sections.

  • product of (low-degree) sparse polynomials
  • composition of (low-degree) round functions where each round includes linear confusion and non-linear diffusion (via algebraic s-box)

Unlike attempt 1 whose is randomly sampled with -bit entropy, thus remains statistically hiding so long as we reveal evaluations. Our structured candidates, with concise descriptions and less entropy, must withstand various algebraic attacks.2 We start with the GCD attack to demonstrate the necessity of polynomial degree much higher than the epoch domain size: even if we only reveal evaluation points.

GCD Attack. The GCD attack recovers the key by computing the GCD of two polynomials. We view as a bivariate polynomial . Given only two evaluations, we can establish:

The complexity of GCD over two polynomial of degree is . The quasilinear cost dictates that -bit security requires , thus .

Attempt 2a

An appealing candidate is:

This family of polynomial is attractive because it only requires coefficients in description while the expanded expression is dense (i.e., monomials of all degrees are present). Heuristically, sparse polynomials are usually more vulnerable to distinguishers due to linearization attack.

Another attractive profile is its evaluation cost. By keeping two running values: x_pow and result, each steps only requires x_pow = x_pow^2 and result = result * (x_pow + b_i) involving two multiplications per-step or multiplications in total.

Unfortunately, the prohibiting cost resides in binding coefficients to . Instead of forcing each nullifier derivation to re-derive which requires Poseidon permutations, we can amortize the cost by asking the sender to set , and later re-commit the witnessed . The Poseidon-based commitment only takes permutations per-nullifier. Even with the amortization, the cost already exceeds that of the GGM's.

As a side note, the following construction is equivalent for all algebraic attackers; yet worse in efficiency due to the doubled number of coefficients:

Attempt 2b

The primary cost of Attempt 2a comes from deriving or binding its coefficients. Naturally, we wonder if we can drop just a few factors while maintaining the same highest degree to remain resilient to GCD attack.

The dropped set could be arbitrarily picked and fixed at system setup. By tuning the dropped set size , we balance the trade-off between circuit efficiency and security. Larger linearly reduces the circuit cost thanks to fewer coefficients to derive and bind to; but the resulting also becomes more sparse, thus more vulnerable to a class of statistical and algebraic attacks. We discuss one such attack below.

Linearization Attack. The linearization attack is an algebraic attack that linearize a set of non-linear equations before applying Gaussian elimination. Take a concrete example of , , namely . There are only 7 unique monomials where are linear combination of . By replacing , we linearize an evaluation equation:

Given just 7 evaluations, we have a system of equation ready to be solved using Gaussian elimination.

With all solved, the attacker obtain the full description of which can be used to compute any nullifier value without recovering the key per-se.

Let be the number of unique monomials, the number of equations. With , the time complexity for linearized Gaussian elimination is where is the frontier matrix multiplication complexity whose state-of-the-art is .

The exponential decay in security with only linear benefit in circuit efficiency rules out this attempt 2b.

Attempt 3: ZK-friendly Hash

The previous attempt explores the "product-of-sparse-polynomial" approach and explains how it failed to meet our efficiency/security requirement. Now, we shift gears to the second approach: "composition-of-round-functions", a.k.a. arithmetization-oriented cipher (AOC) in the literature. Most ZK-friendly hash functions (e.g. MiMC, Rescue, Poseidon) are built on top of AOC. Inspired by the classical Substitution-Permutation Network (SPN) in the popular symmetry primitives like AES, these AOCs are block ciphers that applies alternating rounds of confusion and diffusion. Particularly, AOC switch out bitwise ops in AES (e.g. XOR, rotation, s-box) for algebraic counterparts that involves only field ops (e.g. field addition for keyed confusion, for s-box).

On a high-level, define some low-degree (e.g. degree 3 or 5) non-linear keyed round function , the AOC applies the round function -times to produce the ciphertext:

With , the overall degree of . This exponential increase in degrees and sufficient density gives exponential growth in its safety margin against algebraic attacks, resulting in logarithmic number of rounds.

In this attempt, we pick an off-the-shelf ZK-friendly hash function and use it as a black box. In the next attempt, we open the black box, and tweak parameters and design axis in pursuit of a more circuit-efficient AOC. We pick battle-tested Poseidon with proper domain separation:

To reiterate the overall flow:

  • Sender prepares the Output note with arbitrary (random if honest).
  • User proves nullifier derivation in-circuit as:
  • OSS directly receives a single PCD proof attesting for the delegated range.

Our 7 Poseidon per PCD step capacity directly translates to nullifier derivations per step. The indistinguishability is computational but its the one-wayness and collision resistance has fairly high confidence given the years of cryptoanalysis against Poseidon. The reliance on user to generate proofs of correct nullifiers seems inevitable as we argued at the end of attempt 1.1.

This is the first attempts that satisfy all our security and efficiency requirements. On the positive side, it requires no new/in-house cryptoanalysis, no additional assumptions or trusted primitives. However, the efficiency improvements over the GGM-based nullifiers is a moderate .

A natural optimization is producing nullifiers, rather than just one nullifier, per Poseidon squeeze.

In practice, we would prove a batch of nullifiers in one PCD step and separately show that the list of nullifiers OSS had proven exclusion for is a sub-sequence of these nullifiers.

Attempt 4: AOC with Reduced Rounds

Now, we open the AOC black-box, and systematically analyze the possible optimization axis and their effects on the security level. We target the MiMC block cipher for its minimal algebraic description. Our analysis might be transferable or at least serves as a starting point when extending to the HADES family like Poseidon with wider states and partial rounds.

Jump to our negative conclusion if you don't care about the cryptoanalysis details.

To recap, the MiMC permutation works as follows:

mimc

Each round involves a linear confusion via addition of the key and a round constant ; and a non-linear confusion via s-box permutation for some small that satisfies . For Pasta curves' scalar field , since , we pick . Round constants are generated and fixed at system setup.

The overall keyed function composes of rounds:

A variant with higher-dimension key has a round function with a rotating addition key:

Goal. Our goal is to achieve -bit security but fewer than the rounds as recommended in the original paper.3 This might be possible (and even worth considering at all) because our security requirement is less stringent than a full PRF or a block cipher. We only require a weaker form of IND-CPA security:

  • the input space is the epoch domain rather than the whole field
  • the number of output/ciphertexts the attacker/distinguisher obtains is

Elimination Criteria. To prune the design space, we can identify some criteria for quick elimination.

  1. RO/PRG/PRF usage: If we invoke a random oracle, or a PRF, or a PRG internally as a subroutine, the cost already exceeds that of attempt 3; because we instantiate a RO/PRF/PRG using Poseidon in practice which requires at least 1 Poseidon permutation.

Optimization Axis. Here are some possible axis for optimization:

  • Strong PRF v.s. Weak PRF: relax to a weak PRF
  • Different choice of s-box: higher , larger stride each round
  • Fewer rounds: under the same key size, pick a more aggressive
  • Larger keys: higher key dimension to reduce rounds

Axis 1: Weak PRF

While a strong PRF is indistinguishable from a random function that maps to a random value for any attacker-controlled input, a weak PRF severely restrict the attacker to only query the function at random points in the domain. We wonder if a weak PRF is sufficient in our setting, which opens the door for (possibly) simpler AOC-based PRFs thanks to the strictly weaker requirement?

However, the input values are epoch numbers which are predictable, distinguisher-chosen, and anything but random. Even if we have a highly efficient weakly secure PRF, we must map the input to a random value first: . This RO invocation is enough to rule out this axis as per our elimination criteria.

Axis 2: Larger

Observing the derivation of the recommended round (see footnote3) : larger the per-round stride, faster it reaches a high enough degree to be resilient to algebraic attacks. On the surface, it seems sensible to increase the to reduce rounds.

There are at least two issues with this intuition. One, fewer rounds (i.e. smaller ) is more vulnerable to the Gröbner attack as we explain in greater detail in the next axis. Two, and most importantly, larger means a higher per-round exponentiation cost, resulting in no reduction in overall number of multiplication constraints. Section 5.3 of MiMC paper analyzes this specifically; it concludes that in a constraint system where squaring is as expensive as a multiplication, changing does NOT reduce the constraint count or offer any benefit.4 For these reasons, we rule out this axis.

Axis 3: Single Key, Fewer Rounds

Before analyzing the lower limit on the number of bounds required, we need to introduce another two primary algebraic attacks.

Interpolation Attack

Interpolation attacks allow reconstruction of from enough pairs using polynomial interpolation without key recovery. Obviously, with pairs, we can run Lagrange interpolation in time. Since our input domain is not a FFT domain, we cannot achieve complexity. However, in our setting, the maximum number of pairs exposed to the attacker is , thus classic interpolations don't apply.

Meanwhile, interpolation for sparse polynomials is still relevant. In parameter regimes of aggressively fewer rounds , may become sparse. The expected number of unique monomials scales with . In the extreme case, consider , the resulting has distinct monomials. Here, is only dense if we simultaneously scale up to keep to compensate (as we did previously).

If we only reduce while keeping other parameters unchanged, the would be sparse and subject to Ben-Or-Tiwari's interpolation. Given a sparse polynomial of monomials, evaluations, the interpolation cost is or field ops in the general case. Again, attackers cannot use FFT due to domain restriction on the revealed evaluations (namely the epoch domain is not a FFT domain).

An inconsequential note: technically, for sparse polynomial of terms, and only evaluations, we can apply the linearization attack on the fully determined system of equations. However, even though attackers know the exact expression, the fully expanded form with coefficients per-equation implies at least total memory. In contrast, the preceding BOT interpolation algorithm is oblivious to the exact non-zero positions/monomials and requires working memory. Moreover, the time complexity of linearization attack is which is worse than interpolation.

Gröbner Basis Attack

Gröbner basis attack translates into a multivariate system and uses Gröbner basis reduction and univariate roots finding to solve the system of equations. We present a greybox understanding of the algebraic procedure with a focus on complexity of each sub-step. Our presentation here is heavily based on Zellic's blog and the SoK on Gröbner algorithm.

Define intermediate outputs of s-box as for a -round MiMC. Given an evaluation pair , we can convert the (high-degree) univariate into a system of lower-degree multivariate equations about variables . Solving the system, especially for variable , constitutes a successful key recovering. Observe that there's no singular way to map to a multivariate system. We can define fewer intermediate indeterminates at the cost of higher per-equation degree as we shown on the right.

grobner

Solving the multivariate system takes 3 steps:

  1. Compute the Gröbner Bases in devrevlex order
  2. Term order change to get lex order bases, as a result, one of the bases is a univariate equation
  3. Apply roots-finding algorithm on the univariate polynomial, substitute the solution into the reduced system and repeat roots-finding for the next indeterminate.

We avoid formally define Gröbner basis and their properties, and only offer a high-level intuition for these step via a concrete example below. Starting with a system of multivariate equations about three variables . Within the reduction process, we iteratively find another multivariate system that has the same solutions by calculating where are monomials. It's obvious that the solution of original system is also the solution of . By the end of the process, the reduced Gröbner bases share the same solution while being properly sorted such that the last one is a univariate equation. Then we run univariate roots-finding algorithms to solve the univariate basis and plug its solution (for ) back into preceding equations () and repeat the roots-finding.

Cost. Denote the number of variables, the number of equations, the degree of each equation, reminded that is the total degree of thus also the product of .

  • Step 1: Estimated where is the degree of regularity or the highest total degree of polynomial appearing during the basis reduction. A tight upper bound is . And .
  • Step 2: The popular FGLM algorithm takes where is the volume of the basis staircase and bounded by .
  • Step 3: State-of-the-art univariate roots-finding from [Kedlaya-Umans] takes where is also the degree of univariate basis.

We consider the case of , corresponding to the one-intermediate-variable-per-round choice. The cost in step 2 dominates that of step 3. Conveniently, the MiMC-specific multivariate system already is a Gröbner basis in the devrevlex order (see Section 4 of the SoK paper), thus step 1 is skipped. Thus, the simplified overall cost is .

This attack looks ridiculously expensive, more so than all other algebraic attacks, so why do we even care to mention it? Because we only have the upper bound, but no lower bound on the term-order change step. In practice, there might be significantly cheaper-than-FGLM approach that brings down the attacker cost, as demonstrated in FreeLunch (Crypto24) against an AOC used in Griffin, Anemoi, and ArionHash designs. In the absence of proven lower bound, the conservative assumption is that AOC attackers manage to get Gröbner reduced basis almost for free (i.e. skipping step 1 and 2), leaving as a practical lower bound.

We enumerate all attacks the and explore an aggressively fewer rounds right at the security boundary. We take 's lower bound , the round exponent , and -bit prime field size.

  • GCD attack requires , which implies .
  • interpolation attack requires where is the unique number of monomials in the expanded which scales with . This implies .
  • Linearization attack requires which implies .
  • Gröbner basis attack requires which implies .

In sum, our non-exhaustive list of algebraic attacks suggest a minimum number of rounds to maintain a -bit security level.

Axis 4: Higher Key Dimension

As seen in the MiMC recap, we can use a rotating key in the round function given a higher-dimension key with . The question is whether the cost of attacks scale super-linearly with key size such that a reduced-rounds parameter can maintain the same security level. We need to enumerate through all major algebraic attacks.

Before the analysis, astute reader might question: if , then larger keys require entropy expansion which involves RO/PRF invocation; doesn't this already rule out this axis as per our elimination criteria? The answer is two folds. Firstly, to squeeze a single , we already need to invoke Poseidon permutation once, which gives us pseudorandom outputs at once. Practically, we can expand to without any extra cost. Secondly, the cost of entropy expansion might be amortized if it drastically reduce the rounds, thus lower per-input evaluation cost. There remains the possibility that a high fixed-cost key expansion accompanied by low variable-cost nullifier computation enables deriving multiple in a single PCD step.

Unfortunately, we need to revisit all four algebraic attacks and their cost analysis for a key because the expression changes.

  • GCD attack: no longer applies because becomes a multivariate polynomial beyond the bivariate. In a multivariate ring, a common root is not a common factor, thus generically .
  • interpolation attack: since all keys are treated as realized constants, the polynomial degree and density w.r.t. is unaffected. Unchanged from the previous analysis .
  • Linearization attack: Similar to interpolation attack, linearized variables are all -monomials where are computed in their coefficients. Unchanged from before .
  • Gröbner basis attack: thanks to the conservative security buffer that drops the first two steps of Gröbner attack whose asymptotic scales in very complicated expression in . The practical lower bound (on attacker cost) we use only involves . Therefore, the bound remains unchanged from before .

In sum, due to the further absence of GCD attack, the minimum number of rounds is further reduced to with -dimensional key with (for a free key expansion) to maintain a -bit security MiMC function.

Conclusion for Attempt 4. To clarify, the analysis does NOT recommend a reduced MiMC. The main point of the exercise is to situate major algebraic attacks and explore the design space/parameterization of AOC. Aggressively-chosen parameters only reduce the circuit constraints to of a full MiMC. Such moderate saving is not worthy of pursuing given our analysis is yet peer-reviewed, non-exhaustive, and under simplified assumption.

Attempt 5: Proof of AOC Trace

Observe that the MiMC function is a highly structured computation with a uniform round function. This structure gives rises to an Interactive Oracle Proof (IOP) for the correct execution trace. In contrast to the previous attempts (#3 and #4), we can efficiently prove correct MiMC traces (loaded as non-deterministic advice/witness) by piggybacking on the IOP proof system, rather than re-compute them in-circuit and pay the extra overhead of arithmetizating circuit gates into polynomial identities in the IOP. Luckily, the Ragu proof system indeed exposes API (a.k.a. hooks) to support online Fiat-Shamir challenges and polynomial oracles. "Online" here means custom, application-level IOPs whose prover-verifier messages got fused with that of Ragu's native Polynomial IOP.

Denote a multiplicative subgroup of order with generator . Without loss of generality, we assume is a power-of-two such that the domain can be a FFT domain if is highly 2-adic.

Recap the MiMC construction again below for the ease of reference.

mimc

For an MiMC instance , interpolate an MiMC trace polynomial , and a round constant polynomial over the group as follows:

Intuitively, we interpolate an AIR trace with a uniform transition function between two consecutive rows. The execution trace is correct if and only if the following polynomial vanishes over . Equivalently, they perfectly divides the vanishing polynomial defined below.

IOP of MiMC Trace

Now, we describe a simple IOP that enforce the correct trace . Note that verifier can independently obtain since round constants are public system parameters; and also . The commitment to is also witnessed as a polynomial oracle. Meanwhile, both input and output in the MiMC evaluation instance are public inputs/instances. The derivation of is assumed to be enforced in-circuit already and shared by all future MiMC trace polynomials.

  • Prover interpolates , computes the quotient polynomial , commits them, and sends commitments to the verifier.
  • Verifier samples a challenge , computes , and query against their commitments using "polynomial oracles". Then checks the following relations:

There are two ways to batch-verify MiMC traces. One is more prover efficient; the other is more circuit efficient which is what we prefer.

Prover-efficient Batching

Let be the polynomials that vanish on for the -th MiMC instance . Then we can batch them into the quotient polynomial:

  • Prover interpolates for , commits them, and sends commitments to the verifier.
  • Verifier samples a challenge .
  • Prover computes the quotient polynomial (reusing the same and ), commits it, and send .
  • Verifier samples a challenge , computes , and query against their commitments. Then checks the relations:

Cost. For the single trace, the prover run a MSM of size to commit any of , and use FFT to compute the quotient polynomial. The circuit cost is dominated by invoking Ragu's polynomial oracles whose cost is further dominated by the number of queries on distinct polynomials; extra queries on committed polynomials are almost free. Note that we always need to invoke PRF once to enforce the derivation of . Its cost is amortized among all MiMC traces proven in the same step. Furthermore, enforcing takes multiplications using repeated squaring for the numerator and a non-deterministic advice for the division.

ProverCircuit Cost
1 trace PRF + query points on polys + mul
traces PRF + points on polys + mul

Circuit-efficient Batching (Preferred)

The problem with the foregoing batching is that the number of queried polynomials grow linearly with . Given that a PCD step can only support a fixed (and small, currently ) number of online polynomial oracle, we cannot even support MiMC traces per step, which is unacceptable.

An alternative batching flatten traces and interpolate them into a single trace polynomial over a larger FFT domain of size . Without loss of generality, assume is also a power-of-two.

mimc_batching

Define the containing the "transition function exceptions", or the domain elements that corresponds to the last value in each execution trace. For MiMC instances , interpolate a grand trace polynomial and round constant polynomial over the group: as follows:

The flatten execution trace is correct if and only if the following polynomial vanishes over . Equivalently, they perfectly divides the vanishing polynomial defined below:

Now the batched IOP works as follows:

  • Prover interpolates , computes the quotient polynomial , commits them, and sends commitments to the verifier.
  • Verifier samples a challenge , computes , and query for against their commitments using "polynomial oracles". Then checks the following relations:

Batched Cost. Assuming Pedersen vector commitment for the PCS with a quasilinear commit cost. We take recommended full round from the MiMC paper 3 and round to the nearest power-of-two which gives us .

ProverCircuit Cost
PRF & points on polys & mul

The prover first need to interpolate using ; then compute commitments using ; finally computes quotient polynomial using .

The circuit cost includes enforcing the which takes a PRF ( mul); constant number (only ) of polynomial oracles; and multiplication constraints for and the quotient relation check by the verifier. The numerator of takes mul via repeated squaring; the denominator is free because is already an intermediate result during the squaring; finally the division takes another multiplication where the reciprocal of the denominator is provided as an advice. In total, computing takes mul gates. Lastly, takes mul only.

Now a first-order estimation of largest permissible for a single PCD step. Assuming -mul-cost per polynomial oracle and a circuit size.

Parameter Tuning. The two parameters to tune are per-round exponent and key dimension .

Larger leads to fewer rounds to reach sufficient highest degree against algebraic attack. A safe heuristic demands for -bit security. Surprisingly, a larger will leads to more multiplication gates to compute in-circuit, thus higher circuit cost.

Higher also offers no benefit: prover cost and circuit cost unaffected. The only difference is that when prover interpolate , it needs to ensure . If , then we need to squeeze Poseidon multiple times to expand the full key, which incurs higher circuit cost.

Optimization: Multi-step Amortization. While mere parameter tuning renders futile, we can achieve lower amortized cost if we span over the derivation across many steps. This is motivated by the relatively large fix-cost from PRF and polynomial oracles, and the super low variable-cost for individual MiMC trace boundary conditions (i.e. public inputs enforcement on ).

Let be the number of PCD steps covered by one IOP. The first step commits to and each later step carries the same commitments unchanged in its header. Ragu's staged commitments enforce that the two curve-side views of this header agree at the following recursion step, which prevents a prover from mixing different IOPs across the span.

We assume an extra query of an already committed polynomial costs mul gates and no extra endoscaling. Since every trace adds its input and output query, this adds mul gates per trace to the first-order estimate above:

Spanned steps boundAmortized per step

There is one placement constraint: if all queries are emitted in the first step, that step alone caps at . Its multiplication-gate budget binds well before the linear-constraint budget. Therefore, the larger bounds above require distributing the polynomial queries over the steps while threading the same IOP commitments through them.

This split preserves IOP soundness. The first step publishes an IOP descriptor in its header and checks the one quotient relation at . Each later step must copy unchanged, and adds only the endpoint queries for its assigned, non-overlapping trace range. Ragu's nested staged commitments make the two curve-side copies of agree in the following recursion step; thus no later step can silently switch to a different , , or .

Conclusion

Overall, we recommend Attempt 3 which offers a improvement on circuit efficiency for nullifier derivations. This attempt demands minimum engineering effort, no extra assumption or in-house cryptanalysis, while meeting our security computationally.

If we accept the additional dependency on MiMC and its recommended security parameter, then our Attempt 5 delivers an amortized cost of nullifiers per PCD step. This performance is possible due to a combination of optimization including batch-proving MiMC traces and amortizing IOP verifier logic across steps. See the circuit cost breakdown here.

The concrete parameter suggestion for Attempt 5 is: Use MiMC with rounds over -bit scalar field.5 Concretely, the nullifier polynomial is:

then batch-prove multiple MiMC execution traces.


  1. In the original GGM-based nullifier, the DelegateCert step proves integrity of the internal node whose value is the delegation key. ↩

  2. For a survey of algebraic attacks on arithmtization-orientated cipher (AOC), start with Zellic's blog post, then Section 4.2 of MiMC, Appendix E of HADES, Appendix C.2 of Poseidon, and a detailed SoK on Gröbner basis algorithm. ↩

  3. The MiMC paper concludes that provides sufficient protection against known statistical and algebraic attacks. The original paper uses pervasively; it gives the recommendation in Table 1. By the same logic, for , the suggested round is . ↩ ↩2 ↩3

  4. Quoting Section 5.3 of MiMC:

    "To conclude, if the cost of a square operation is negligible with respect to the cost of a multiplication (that is, if the square operation is linear), then it is possible to minimize the total number of multiplications choosing an exponent of the form different from . Instead, when the number of square operations cannot be ignored (as in the case of SNARK settings or in the case), the choice of an exponent of the form different from does not offer any advantage due to the fact that the number is almost constant." ↩

  5. Three more clarifications on the final recommended rounds .

    1. Different from MiMC paper Section 5 which carries the implicit assumption that MiMC-p/p for large prime field requires a -bit security. In our case, we use a -bit field, but only requiring -bit security, thus attacker's work/cost should be bounded by rather than the full field. Our recommended rounds is derived from which is sufficient to thwart all aforementioned attacks.

    2. Later cryptoanalysis work presents high-order differential key recovery against MiMC. They recommends an extra 5 rounds to thwart their attacks (see end of Section 5 in their paper). This buffer is already counted for when we round up our recommended to the next power-of-two.

    3. A block-size of is already sufficient for the generic birthday bound.

    ↩