Post-quantum DAS with improved provable security

Post-quantum DAS with improved provable security

Author. Benedikt Wagner

TL;DR we give a modification of the PQ-DAS scheme from here, which has a tighter proven security bound. We prove this tighter bound in Lean. The advantage is a higher provable security level. The disadvantage is that it is less efficient.

Context

The current proposal for post-quantum DAS relies on Merkle trees and succinct non-interactive arguments of knowledge (SNARKs). Its main security property, code-binding, has been formally proven in Lean, in a recent post. That post (as well as this one) treats the building blocks (vector commitments, erasure code, SNARKs, code checkers) abstractly, and gives a generic security proof.

We assume the reader is familiar with the basic terminology, such as code-binding, vector commitments, code-checkers, etc. If not, we recommend first reading the original post.

Unfortunately, while the proven security bound establishes that the scheme is free from “structural” weaknesses, the concrete security level (aka bits of security) that it establishes is quantitatively weak. Namely, the proof shows that

\Pr[\text{adversary breaks code-binding}] \;\le\; \varepsilon_{\mathsf{ks}} + \varepsilon_{\mathsf{pb}} + \sqrt{(Q+2)\left(\varepsilon_{\mathsf{pb}}' + \delta + \tfrac{1}{|\mathcal{L}|}\right)}.

Here, \varepsilon_{\mathsf{ks}} denotes the knowledge soundness error of the SNARK, \varepsilon_{\mathsf{pb}}, \varepsilon_{\mathsf{pb}}' are advantages of reductions against position-binding of the vector commitment scheme, and \delta, \mathcal{L} are terms related to the code checker (i.e., the probabilistic Reed-Solomon code membership check).
In typical instantiations, we could make \delta + \tfrac{1}{|\mathcal{L}|} very small, whereas we would most likely pick a hash function for which \varepsilon_{\mathsf{pb}}' is upper bounded by something like (Q/2^{128})^2, for an attacker running in time Q. In particular, the square-root term in the bound would then be approximately Q\sqrt{Q+2}/2^{128}, yielding an additional factor of roughly \sqrt{Q} in the adversarial advantage. For large Q, this is quite significant: considering this term alone, the bound becomes vacuous at roughly Q=2^{85.3} rather than the desired Q=2^{128}.

In this post, we show a modification of this scheme, which yields the tighter bound

\Pr[\text{adversary breaks code-binding}] \;\le\; \varepsilon_{\mathsf{ks},0} + \varepsilon_{\mathsf{ks}} + \varepsilon_{\mathsf{pb}} + \varepsilon_{\mathsf{pb}}' + (Q+1)\cdot\delta.

Here, \varepsilon_{\mathsf{ks},0} is the knowledge soundness error of a second SNARK that the modified scheme uses, Q is the number of random oracle queries of the adversary, and the other terms are as above (for different reductions). Importantly, there is no square root anymore, and the factor Q only multiplies the statistical term \delta. Note that one can easily make \delta sufficiently small to compensate for the (Q+1) term, e.g., by using a sufficiently large extension field for code checker challenges.

Where the loss comes from

To understand where the square-root loss comes from, let’s first recall the scheme. We want to commit to a codeword, and later open individual positions. Any verifier should also be convinced that whatever we open is consistent with the code (this is code-binding).

In the scheme, a commitment to a message m is computed as follows:

  • encode m into a codeword c = \mathcal{C}(m) and commit to it with the vector commitment, \mathsf{com}_{\mathsf{VC}} = \mathsf{VC}.\mathsf{Com}(\mathsf{ck}_{\mathsf{VC}}, c);
  • derive the challenge for the code checker as L = \mathsf{H}(\mathsf{com}_{\mathsf{VC}});
  • compute a SNARK \pi showing knowledge of a vector c with \mathsf{com}_{\mathsf{VC}} = \mathsf{VC}.\mathsf{Com}(\mathsf{ck}_{\mathsf{VC}}, c) and \mathsf{Check}(L, c) = 1.

The commitment is (\mathsf{com}_{\mathsf{VC}}, \pi), and positions are opened using \mathsf{VC}. Note that the SNARK does not show that c is a codeword. It only shows that c passes the probabilistic check for the Fiat-Shamir-derived challenge L, which is cheaper to prove.

The security proof has to find a break of position-binding of VC given a break of code-binding.

A break of code-binding is a commitment (\mathsf{com}_{\mathsf{VC}}, \pi) with accepting openings that are not consistent with any codeword. From \pi, we can extract a vector c that commits to \mathsf{com}_{\mathsf{VC}} and passes the check for L = \mathsf{H}(\mathsf{com}_{\mathsf{VC}}). If c is a codeword, we are done: one of the openings must disagree with c, and this breaks position-binding.

The problem is the case where c is not a codeword. Soundness of the code checker only says that a non-codeword that is fixed before L is sampled passes the check with probability at most \delta. But we get c from \pi, and the adversary computes \pi after it has seen L. So nothing tells us that c was fixed before L: for all we can prove, the adversary chose c depending on L.

The original proof solves this by rewinding, which is where the square-root comes from. Namely, it runs the adversary a second time from the point where it queried \mathsf{H}(\mathsf{com}_{\mathsf{VC}}), now with a fresh challenge L', and extracts a second vector c'. If c' \neq c, we have two different vectors that commit to \mathsf{com}_{\mathsf{VC}}, which breaks position-binding. If c' = c, then c was fixed before L' was sampled, so this case has probability at most \delta.

As said, rewinding is the reason we have the square-root: the adversary has to succeed in both runs, and for the same one of its Q random oracle queries. Simplifying a bit, if it breaks code-binding with probability \mathsf{acc}, this only happens with probability about \mathsf{acc}^2/Q (this is what people call the “forking lemma”). So we get \mathsf{acc}^2/Q \leq \varepsilon_{\mathsf{pb}}' + \delta, and solving for \mathsf{acc} gives the square root and the factor Q.

For more explanation on why rewinding is needed, we refer to the original post.

Note that a response to the post by the author showed that this loose bound is somewhat necessary for this scheme, as long as one only assumes position-binding of the vector commitment.

The modified scheme

The fix is simple: we had to rewind because the argument of knowledge gave us the preimage after the code checker’s challenge was defined. We can change this order by inputting an argument of knowledge into the hash that defines the challenge. This argument of course cannot prove that the check induced by the challenge holds, which is why we need two SNARKs.

To specify the scheme more formally, assume that we use the very same building blocks \mathcal{C},\mathsf{VC},(\mathcal{L}, \mathsf{Check}),\mathsf{H},\mathsf{AS} as in the original post, but additionally use a non-interactive argument of knowledge \mathsf{AS}_0 = (\mathsf{Setup}, \mathsf{Prove}, \mathsf{Ver}) for the relation \mathcal{R}_0, which is as follows:

  • Statement: (\mathsf{ck}, \mathsf{com}_{\mathsf{VC}}), i.e., commitment key and commitment;
  • Witness: a string c \in \Gamma^n;
  • Constraint: \mathsf{com}_{\mathsf{VC}} = \mathsf{VC}.\mathsf{Com}(\mathsf{ck}, c).

Note that this is the same as \mathcal{R}, but without requiring anything about code membership. As in the previous post, we treat the argument systems as not accessing the random oracle \mathsf{H} itself, and we use the same (idealized) notion of knowledge soundness as there. Straight-line extraction in the random oracle model should equally suffice.

Here is the new scheme in detail:

  • \mathsf{Setup}(1^\lambda) \to \mathsf{ck}: run \mathsf{ck}_{\mathsf{VC}} \leftarrow \mathsf{VC}.\mathsf{Setup}(1^\lambda), \mathsf{par}_{\mathsf{AS}_0} \leftarrow \mathsf{AS}_0.\mathsf{Setup}(1^\lambda), and \mathsf{par}_{\mathsf{AS}} \leftarrow \mathsf{AS}.\mathsf{Setup}(1^\lambda), return \mathsf{ck} = (\mathsf{ck}_{\mathsf{VC}}, \mathsf{par}_{\mathsf{AS}_0}, \mathsf{par}_{\mathsf{AS}}).
  • \mathsf{Com}(\mathsf{ck}, m) \to (\mathsf{com}, \mathsf{St}):
    • encode c = \mathcal{C}(m) and commit \mathsf{com}_{\mathsf{VC}} = \mathsf{VC}.\mathsf{Com}(\mathsf{ck}_{\mathsf{VC}}, c);
    • compute \pi_0 = \mathsf{AS}_0.\mathsf{Prove}(\mathsf{par}_{\mathsf{AS}_0}, (\mathsf{ck}_{\mathsf{VC}}, \mathsf{com}_{\mathsf{VC}}), c);
    • derive L = \mathsf{H}(\mathsf{com}_{\mathsf{VC}},\pi_0);
    • compute \pi = \mathsf{AS}.\mathsf{Prove}(\mathsf{par}_{\mathsf{AS}}, (\mathsf{ck}_{\mathsf{VC}}, \mathsf{com}_{\mathsf{VC}}, L), c);
    • return \mathsf{com} = (\mathsf{com}_{\mathsf{VC}}, \pi_0, \pi) and \mathsf{St} = c.
  • \mathsf{Open} and \mathsf{Ver}: open positions using \mathsf{VC}; verification recomputes L = \mathsf{H}(\mathsf{com}_{\mathsf{VC}}, \pi_0), verifies both \pi_0 and \pi, and then verifies the opening.

Note that the main difference to the original scheme is the proof \pi_0, which goes into the random oracle \mathsf{H}.

Proof sketch

Consider the code-binding experiment. Assume w.l.o.g. that the adversary makes no random oracle query twice.

Step 1: extract from \pi_0 and \pi. On every query (\mathsf{com}_{\mathsf{VC}},\pi_0) that the adversary makes to the random oracle \mathsf{H}, we extract c_0 from the provided \pi_0. Similarly, we extract a witness c from \pi which is in the final commitment \mathsf{com} that the adversary provides to break code-binding. We abort if \pi verifies but c is not a valid witness. Also, note that during verification, the verifier makes a random oracle query to \mathsf{H}. Denote the c_0 that is extracted in this query (or in the same query made before) by c_0^*. We also abort if the \pi_0 in this query verifies but extraction fails, i.e., if c_0^* is not a valid preimage of the provided commitment \mathsf{com}_{\mathsf{VC}}. The probability that we abort can be bounded using reductions breaking knowledge soundness of the argument systems, giving a term \varepsilon_{\mathsf{ks},0} + \varepsilon_{\mathsf{ks}}.

We assume from now that we do not abort and that both proofs verify (otherwise the adversary cannot win anyway), in which case we know that c satisfies \mathsf{Check}(L, c) = 1 for the challenge L = \mathsf{H}(\mathsf{com}_{\mathsf{VC}},\pi_0), and both c_0^* and c are preimages of the same commitment \mathsf{com}_{\mathsf{VC}}.

Step 2: rule out that c_0^* \neq c. Now, we abort if c_0^* \neq c for the two extracted preimages of \mathsf{com}_{\mathsf{VC}} that was provided as part of the final output to break code-binding. By what we have seen before, such an abort would imply that we can easily break (position-)binding of the vector commitment. This gives a term \varepsilon_{\mathsf{pb}}.

Step 3: rule out that L is a bad challenge for c. For any random oracle query \mathsf{H}(\mathsf{com}_{\mathsf{VC}},\pi_0), note that the preimage c_0 of the commitment is now fixed before the output L of the hash is sampled. Therefore, the soundness property of the code checker ensures that the probability that L is “bad” for c_0 is at most \delta. Here, “bad” means that c_0 is not in the code, but \mathsf{Check}(L, c_0) = 1. Abort if this happens on any query, adding a term (Q+1)\cdot \delta to our bound (for the Q queries of the adversary and the one of the verifier). Note the implication of this for the final extracted c: because we have c_0^* = c due to the previous step, we know that if c = c_0^* is not in the code, then \mathsf{Check}(L, c) = \mathsf{Check}(L, c_0^*) = 0. But then c is not a valid witness, which would contradict Step 1. So we must have that c is in the code.

Step 4: conclude. Now we know that the adversary provides openings that are not consistent with any codeword, but we know that c is a codeword. Thus, at least one of the openings must contradict the corresponding position in c, so we can apply position-binding of the vector commitment again, giving the final term \varepsilon_{\mathsf{pb}}'. Adding up all the terms, we get the bound.

Looking back, the main trick is that we apply soundness of the code checker to c_0^*, which is fixed before L is sampled. And then we used binding of the vector commitment to argue that c_0^* and c are the same, so soundness of the code checker transfers to c.

Proof formalization

We formalize the proof in Lean. The code can be found here. We use the very same Lean definitions as in the original post. As in the original post, the formalization is in the classical random oracle model and treats the security of the building blocks abstractly. In particular, we do not establish the corresponding concrete security bound in the quantum random oracle model, nor do we formalize the compilation from erasure code commitments to a full DAS scheme. The main relevant theorems in Lean are tightScheme_perfectlyComplete, tightScheme_positionBinding, and tightScheme_codeBinding_posBinding.

Comparison and conclusion

On the positive side, this scheme can get us a much higher proven security level: for instance, with 128 bit secure vector commitments, code checkers and SNARKs, we may get close to 128 bits of security for code-binding. The downside is of course that this new scheme is less efficient: compared to the original scheme, the prover now has to compute two SNARKs instead of one.

Whether one wants to consider this scheme as a replacement for the original scheme depends on how big the efficiency impact would be. Also, one should always have in mind the more naive scheme with only one proof that proves exact RS code membership and does not use a probabilistic code check, and hence no Fiat-Shamir. This naive scheme also has no square-root loss, but is also less efficient than the main proposal.