Should we account for the extractor-caused security loss?

Should we account for the extractor-caused security loss?

Authors. Benedikt Wagner, Eylon Yogev.

Acknowledgements. Thanks to Ron Rothblum, Mikhail Kudinov, Justin Drake, and the EF cryptography team for discussions on this topic.

I. Introduction and Context

Soon, Ethereum will use hash-based signatures, and aggregate those signatures using SNARKs. While designing those hash-based signature schemes, we currently aim for a certain proven security level, for instance close to 128 bits of security in the random oracle model for strong unforgeability. Importantly, this proven security level holds for the base signature scheme, and it is unclear if it also holds for the resulting aggregate signature scheme (we call it an aggregate signature here, even though strictly speaking what we consider is a non-interactive multi-signature). In other words, it is unclear if we can formally prove that forging an aggregate is as hard as forging an individual signature. Looking ahead, this is because (1) one might forge the SNARK, and (2) the running time of the knowledge extractor impacts the proven security guarantees. Here, we want to explore this quantitatively, and give arguments for and against compensating for this effect by increasing parameters.

Bit Security

So what is the precise meaning of 128 bits of security? While there are several possible definitions, the community has mostly agreed on the following:

We say that a scheme \Pi has \lambda bits of security if any adversary running in time t \geq 1 (worst-case) and with success probability \epsilon for breaking the scheme satisfies \epsilon/t \leq 2^{-\lambda}. One of the main challenges with this definition is to model the running time of the adversary in a precise way.

Importantly, bit security is always defined with respect to a given security notion, e.g., single-user strong unforgeability for signatures. For instance, a scheme may have \lambda bits of security for unforgeability in the single-user setting, but only \lambda' \ll \lambda bits of security for strong unforgeability in the multi-user setting.

Note on the model. For aggregation, we need to model the hash function used by the signature scheme as a circuit, and not as a random oracle. Thus, our assumption below is that the instantiated base signature scheme achieves the claimed security level for the concrete hash function that is used. Its proven random-oracle bound provides some evidence for this assumption (where t is replaced by random oracle queries), but it does not prove it for a concrete hash function.

Why we care about extractors

To aggregate hash-based signatures, we want to use succinct non-interactive arguments of knowledge (SNARKs): the aggregate is a short proof, showing knowledge of a list of signatures. The signatures serve as a witness. Intuitively, if someone gives me an aggregate covering signers \{A,B,C\}, then by security of the SNARK, I know that someone must have had the witness, i.e., the individual signatures \sigma_A,\sigma_B,\sigma_C. Thus the only way to forge such an aggregate is by either breaking the SNARK or by forging a base signature.

When we want to turn this intuition into a formal security proof, we would have to use the knowledge extractor of the SNARK, which given the proof can extract the witness. As we will see below in detail, the running time of this extractor has a direct impact on the security level that we can prove for the aggregate signature scheme.

It is important to note that this does not necessarily yield a better attack (at least not that we are aware of right now), but the proven security level is impacted. The main question for this post is:

How does the running time of the extractor affect the concrete security level of the aggregate signature scheme? And should we adjust parameters accordingly or not?

Note on the extractor. In this post, we omit making the definition of knowledge soundness very explicit. This is because there are various notions (e.g., the extractor having access to the adversary’s query trace or to the adversary’s code, …). We only use the extractor’s running time and success guarantees and are otherwise independent of the actual notion.

Note on the scheme. We limit ourselves to non-recursive (i.e., single-hop) aggregation. That is, we do not allow aggregating aggregates via SNARK recursion. This is because the main thing we want to discuss (running times of extractors) already shows up in this simple case, and for SNARK recursion we are missing even a solid asymptotic (i.e., non-concrete) treatment.

Why we care now

We care now because:

  1. We need to fix the parameters for hash-based signatures in Ethereum’s consensus and execution layer soon. Before we do so, we should make an informed decision about whether to take the loss caused by extractors into account.

  2. We are searching for new constructions with autoresearch challenges like sig.golf. When designing these challenges, we must define formal security requirements that submitted schemes have to satisfy in Lean 4. This includes minimum bit security levels, and when searching for SNARKs even extractor running times.


II. Security Loss Caused by Extractors

Heads up: this is the most technical section of the post.

Above, we have outlined that the running time of an extractor may impact the concrete security level that we can prove for an aggregate signature scheme. Here, we give more details on that, first considering a generic SNARK with its extractor, and then zooming in on the specific SNARKs we use in practice.

Loss for a general extractor

Let’s see how and why the running time of the extractor affects the proven security level:

Assumption on base signature. Assume that the base signature scheme is \lambda bits secure (with respect to, say, standard unforgeability), i.e., \epsilon/t \leq 2^{-\lambda} for every adversary with running time t and success probability \epsilon.

Assumption on the SNARK. We assume the SNARK is complete and knowledge sound. We omit a very formal definition, but roughly, this means that there is some extractor \mathcal{E} that can extract a witness from an accepting succinct argument output by an adversary. The probability that the adversary produces an accepting argument but extraction fails is at most \epsilon_{ks}, which may depend on the adversary’s running time.

Construction. We aggregate signatures using SNARKs as described here. That is, an aggregate is a succinct argument of knowledge of a list of signatures. The signatures are the witness, the message and the public keys are the public input / statement. To verify an aggregate, one uses the SNARK verifier.

Goal. We want to show that the resulting aggregate signature scheme is secure, i.e., if a fixed honest party A has never signed message m, then one cannot forge an accepting aggregate for m that includes A.

Reduction. The proof is by reduction: assume we have such an adversary \mathcal{A} forging the aggregate. Then, we construct an adversary \mathcal{B} against the base signature scheme. This adversary \mathcal{B} runs the extractor \mathcal{E} on the output of \mathcal{A}, i.e., it extracts individual signatures from the aggregate (which fails only with small probability \epsilon_{ks}). Among those, it finds the signature of party A, which is then a forgery against the base scheme. Thus, the security guarantee for the base scheme should give us a bound on the success probability of \mathcal{A}.

Quantitative Analysis. The running time of the extractor shows up when we now look at the concrete security level. For that, let’s examine the running time and success probability of our reduction \mathcal{B}: one can show that the success probability is \epsilon_{\mathcal{B}} \geq \epsilon_{\mathcal{A}} - \epsilon_{ks}, as it can forge if both \mathcal{A} and extraction succeed. The running time is roughly that of \mathcal{A} plus any overhead from running the extractor, the sum of which we denote by t_{\mathcal{A},\mathcal{E}} \geq t_{\mathcal{A}}. So, we have t_{\mathcal{B}} = t_{\mathcal{A},\mathcal{E}}. We know that \epsilon_{\mathcal{B}}/t_{\mathcal{B}} \leq 2^{-\lambda} by assumption. Rearranging, we want to get some similar bound for \mathcal{A}, which would give us a bit security level for the aggregate scheme.

Let’s try that:

By the assumed security of the base signature scheme, 2^{-\lambda}\geq\frac{\epsilon_{\mathcal B}}{t_{\mathcal B}} \geq\frac{\epsilon_{\mathcal A}-\epsilon_{ks}}{t_{\mathcal A,\mathcal E}}=\frac{\epsilon_{\mathcal A}-\epsilon_{ks}}{t_{\mathcal{A}} } \cdot \frac{t_{\mathcal{A}}}{t_{\mathcal A,\mathcal E} }.

Rearranging gives

\frac{\epsilon_{\mathcal A}}{t_{\mathcal A}} \leq 2^{-\lambda}\cdot\frac{t_{\mathcal A,\mathcal E}}{t_{\mathcal A}} + \frac{\epsilon_{ks}}{t_{\mathcal A}}.

This expression nicely separates two effects: the reduction’s running-time overhead and the knowledge error. For the discussion below, assume that the SNARK parameters make the knowledge-error contribution much much smaller than the first term, so let’s omit it from now on and just treat it as 0. In practice, including it would change the resulting security level by less than one bit. Now, say that the the extractor overhead is \frac{t_{\mathcal A,\mathcal E}}{t_{\mathcal A}} = c. Then, from the calculation above it is clear that a factor c slowdown in the reduction costs at most \log_2 c bits in the bound. A factor of two costs one bit; a factor of 1024 costs ten bits.

The catch is that c need not be the same for every adversary. To obtain a single bit-security guarantee, we would need a bound for c that covers all adversaries under consideration.

An illustrative example. Suppose the base signature scheme has 128 bits of security. Assume also that, for every adversary running for at least 2^{40} steps, the reduction including the extractor takes at most twice as long, i.e., t_{\mathcal A,\mathcal E}\le2t_{\mathcal A} whenever t_{\mathcal A}\ge2^{40}. Then, for these “high-effort” adversaries, c = 2 and we only loose 1 bit. But bit security (in the standard sense) concerns all adversaries.

So what about “fast” adversaries? Our assumption does not directly give us an extraction-time bound for them. However, we can pad their execution to 2^{40} steps without changing their success probability, and then apply the same guarantee. This gives a reduction with total running time at most 2\max\{t_{\mathcal A},2^{40}\}.
Consequently, ignoring the small knowledge error, \epsilon_{\mathcal A}\leq \min\left\{1,\frac{2\max{t_{\mathcal A},2^{40}}}{2^{128}}\right\}. Thus, in the standard sense we only get 128 - 40 - 1 = 87 bits of security, while we actually get 127 bits for the high-effort adversaries. We can visualize this “capped guarantee” effect as follows:

Loss for BCS-style extractors

In practice, we will most likely use hash-based SNARKs. These SNARKs are based on interactive oracle proofs (IOPs) and the BCS transformation. We focus on instantiations with round-by-round knowledge soundness, whose underlying IOP extractor only needs the final committed messages. Their extractors work in the random oracle model: they receive the statement, proof, and the adversary’s oracle-query-and-answer trace, and use these to extract a witness.

While these extractors are straightline (they do not rewind the adversary) this should not be confused with linear time. Looking at Chiesa and Yogev’s book (Section 26.1 and Remark 18.5.5), the runtime of an implementation may contain (depending on the machine model) a q\log q term, where q denotes the number of oracle queries made by the adversary. It also includes the cost of reconstructing the committed messages and running the IOP’s witness extractor. It also contains a term that is related to the statement and witness size (which may be independent of q). For now, let us fix the protocol parameters and upper-bound the sizes of the relevant computations, statements, witnesses, and IOP messages.

It is then natural to ask whether these extractors admit a capped guarantee similar to our illustrative example.

Under these assumptions, the answer seems indeed positive. We only need to consider adversaries with t_{\mathcal A}\le2^\lambda: adversaries that take more time automatically satisfy our time–success requirement. Thus q\le2^\lambda, and the logarithmic factor is bounded by approximately \lambda. After applying these bounds, the additional extraction work can be bounded by a q+b, for appropriate constants a and b. Accounting also for executing the adversary and the simulation overhead gives t_{\mathcal A,\mathcal E} \leq c\,t_{\mathcal A}+a q+b \le(c+a)t_{\mathcal A}+b=\alpha t_{\mathcal A}+\beta. Here c accounts for executing and simulating the adversary, and we set \alpha=c+a and \beta=b. For adversaries with t_{\mathcal A}\ge\beta, we get t_{\mathcal A,\mathcal E}\le(\alpha+1)t_{\mathcal A}. Thus \alpha+1 replaces the factor 2 in our illustrative example. We lose at most \log_2(\alpha+1) bits when considering adversaries running for at least \beta steps (ignoring the small knowledge-error contribution).

These extractors can therefore support a similar capped guarantee. This does not establish the particular factor 2 or threshold 2^{40} used in our example. Determining useful concrete values for \alpha and \beta (which depend on the size bounds, hash lengths, field sizes, IOP extraction algorithm, and implementation) requires fixing a machine model and accounting for its costs. This is beyond the scope of this post, but would be a useful target for autoresearch challenges and Lean formalizations.


III. Should we account for it

Now that we know how the running time of the extractor impacts security, the obvious question is if this means that we should adjust the parameters of the base signature scheme. That is, if we lose \delta bits of security when doing aggregation, should we just make the base signature scheme 128+\delta bit secure?

Below, we collect arguments for and against accounting for it. We leave out the obvious efficiency argument (which is in favor of ignoring it).

Arguments for accounting for it

Let’s start with the arguments that are in favor of accounting for it, i.e., in favor of increasing the requirement on the base scheme to 128+\delta bit:

Being conservative. The system in which we deploy these schemes is highly valuable, and a break of the cryptography we deploy here would be catastrophic. Therefore, we should always be conservative when it comes to security.

Security losses may add up. We are not using a random oracle, but a concrete hash function. This may cause a few bits of security loss. We are not in a single-user setting, we have a lot of users. This may also cause a few bits of security loss. So we lose a few bits here and a few bits there, and overall they may add up. Thus, compensating is a countermeasure against this.

End-to-end number of bits of security. What we will use is the aggregate scheme, not just the individual scheme. So it makes sense to focus on the bit security of this scheme.

Arguments against accounting for it

Let’s now collect arguments against compensating, i.e., arguments for ignoring the security loss caused by extractors.

Reduction loss does not necessarily correspond to an attack. The loss that we discuss in this post shows up in our security proof based on extraction. The extraction argument itself provides no evidence that there is a matching attack. Instead, for all we know this could be a proof artifact. That said, we should acknowledge that some losses in analyses of hash-based signatures have actual matching attacks and must therefore affect parameter choices.

We cannot account for everything. Our base signature scheme may be used in many different protocols in the future. It is simply not possible to pick parameters that guarantee 128 bits of security for every future application.
And even if we only look at aggregation, we may change the SNARK in the future, which can change the extractor’s running time overhead, and thus how many bits we lose.
Even worse, if we accounted for and compensated for single-hop aggregation, we still would not account for the fact that we may do recursive aggregation and other forms of composition, e.g., signature schemes and zkEVMs using the same underlying hash or compression function. Also, how would we count the exact running time of the extractor in the first place? There is emulation overhead, overhead from generating random tapes for the adversary, and for recording oracle queries. The costs of these operations of the extractor depend on the machine model and are usually ignored in pen-and-paper security arguments.

Even if we compensate, there is a modeling gap. The proven bit security for the base signature scheme holds in the random oracle model (ROM). When we aggregate using SNARKs, the hash function used by the signature scheme is represented by a concrete circuit, as explained here, for instance. The ROM guarantee does not automatically apply to this instantiation. We therefore first make the heuristic assumption that the instantiated scheme still achieves the claimed bit security, and then consider the extractor-caused security loss. Increasing the parameters to compensate for extraction does not remove this heuristic step. One could therefore question how precisely we should compensate for extraction while this modeling gap remains.

Capped guarantee may be sufficient. Above, we discussed a “capped” security guarantee: we get \lambda bits of security but only for attacks that take at least 2^\kappa time, for some \lambda and \kappa.
For attacks of time less than 2^\kappa, we still have at most 2^{-\lambda + \kappa} success probability (ignoring the knowledge error as before). Depending on \kappa and \lambda, this may be acceptable, compared to the strict requirement of \lambda bits of security.
More generally, this argues for describing the security of our systems through a bound relating running time to success probability, rather than a single number.


IV. Conclusion

The number of arguments on either side should not be read as a recommendation for or against compensating for the extractor-caused security loss. What seems clear is that we should think about this loss explicitly, and even if we decide not to compensate for it, we should understand what our security argument guarantees. Fast extractors improve those guarantees and should therefore be an objective or constraint in autoresearch challenges. In general, we should be conservative when choosing cryptographic parameters, especially for systems where a break would be catastrophic. Finally, we should acknowledge that concrete security is not easily reduced to just a single number. A curve relating an adversary’s running time to an upper bound on its success probability tells us more, particularly when we have a capped guarantee. When comparing two schemes, we should thus compare these curves rather than just their bit-security numbers.

1 Like