Lev Soukhanov
—Jun 09, 2026
Few days ago, we have learned that our novel Witness Encryption scheme (https://eprint.iacr.org/2026/175) is not secure. The break is particularly severe - it affects not only our modifications but also the original ADP construction , and renders it unusable for sparse circuits.
Fortunately, we determined a patch that plausibly fixes the scheme and restores security. By a lucky coincidence (an optimization of the related scheme), we had worked on a generic transform that turns any projective circuit into a non-sparse one - though at that time, we only had the required modification available in characteristic 2. We have concentrated our efforts on extending the transform to characteristic , too, and I am happy to share the results here.
I will give a brief explanation of how AADPs work. A more detailed treatment can be found in our paper.
(Arithmetic) affine determinant program is a collection of square matrices, over a field . We will typically write it as a formal linear function . They are constructed from the circuits (via algorithm, defined further) and we have 2 desired properties:
Note: hypothesis 2 might be too strong (in fact, it is not clear that such a strong requirement is needed for the safety of the derived witness encryption scheme), but we have consistently found that any “significant” break of 2 typically swiftly leads to an attack on the derived witness encryption scheme.
Let’s start with a circuit with variables and constraints. For each constraint, we construct a certain “gate matrix” , with the following properties:
AADP construction uses the constraints of the form , and the matrix that we use is
Note: the linear function is generated randomly, and is needed to fulfill the second condition - i.e. even if all vanish at the same time, the rank does not drop below 2 except with negl. probability.
The original ADP construction is only capable of expressing the constraint and uses a simpler gate matrix (though the authors never formulated it in this form).
works simply as follows:
L_i \overset{\}\gets \mathbb{F}^{(k m + 1) \times 2k}R_i \overset{$}\gets \mathbb{F}^{2k \times (k m + 1)}\xi_i(x) \overset{$}\gets \mathbb{F}^{n+1}$
I don’t want to specifically talk about a WE scheme (the message is just added to a matrix cell of one of the matrices), because once again in our experience building a distinguisher is typically enough to break AADP, and it is conceptually easier to explain.
Before we explain the attack, it makes sense to give the intuition why this might be secure (at least in some cases). The baseline is the following:
There is no (non correct witness) input such that for non-negligible fraction of setups.
The reason why this is true - each gate contribution has rank if the gate holds, and rank if it does not. Because the total dimension is , the sum for any invalid witness will have a full rank except with negligible probability.
In general, the problem to detect the rank of tensor is considered hard in this regime, at least for random tensors. Question is, can someone exploit a specific structure of the setup?
The idea is the following. Consider an individual matrix . One can notice that formula for it contains a lot of rank 2 terms of the form . However, if the circuit is sparse, most of the terms just vanish, because the variable does not participate in most of the gates .
This suggests that all the matrices have a hidden structure - they diagonalize simultaneously up to a low rank error!
To make this precise, note that our construction has independent left and right gauge symmetry - we can simultaneously multiply all -s by some global , i.e. , and all -s by a global as . Let’s choose such transforms that , and .
If we do, then a matrix has the following form: , where the rank of the error is related to - the amount of gates that this variable participates in.
As a first step, we can consider a fraction of two such matrices, say . This will clear one part of the gauge symmetry - the result is now an honest linear operator, with symmetries acting as .
There is now a hidden basis where all -s are diagonal at the same time, up to low rank errors!
… and this is where analysis in the paper goes astray - we take two such matrices and construct a messy nonlinear system to analyze them, when actually building a distinguisher can be done in one shot:
“ has a low rank”
Indeed, if two linear operators diagonalize in the same basis up to a low-rank error, their commutator is just low-rank. The details of the remaining part of the attack are circuit-specific, but the essence is that such commutators, specifically of the form have kernel spaces that are related to kernels of matrices , which allows to eventually recover the hidden basis.
The attack was implemented against our repeated-squaring challenge circuit by tekkac, successfully decrypting the challenge value.
While this attack only works against specific class of circuits (sparse ones), practical circuits that we want to use typically are sparse. It is also worth mentioning that the original ADP (https://eprint.iacr.org/2020/889) is also subject to this attack.
The natural solution, of course, is to, given a constraint system , produce a new constraint system such that it is equivalent, yet any invalid witness candidate to this new constraint system breaks some large fraction of the gates (say, at least half).
Apparently, there is no official name for such constraint systems (though the topic is definitely related to linear PCPs and gap problems in general); we call them "pufferfishes" because of a local brainrot meme.
Now, imagine for a moment that we work with R1CS circuits. Then, the solution to this problem is well-known, it is just QAPs. To quickly remind you, given a constraint system of the form , one picks points and constructs interpolation polynomials satisfying .
Now, denote . Then, the expression
vanishes on the set , which can be expressed as the following condition (called QAP, quadratic arithmetic program):
where
Now, it is easy to explain how to construct a new constraint system which is a pufferfish: let’s say that our new witness is (so it has a total size ) and evaluate the QAP in different points .
At each point, we will have an expression , which is indeed a R1CS constraint on the extended witness. This is our new set of constraints
Moreover, any invalid solution is automatically forced to break at least half of all constraints (assuming ), because the polynomial has the degree and is evaluated in points.
The problem, of course, is that we do not work with R1CS circuits! Our circuits are projective, and this is a strictly necessary requirement for anything resembling AADP to work. The QAP is linear in the coefficients of , so we need to invent a version of QAP with replaced with some quadratic expression. It is, apparently, very easy to do in characteristic 2, because we can write:
Indeed, for any polynomial there is its inverse Frobenius twist - a polynomial with coefficients that are square roots of coefficients of , i.e. . Because in characteristic 2 squaring is a homomorphism, we have
This works pretty much as well as R1CS.
Situation for characteristic is much more complicated. There are few options, all quite bad and the only feasible one that we have found is to write:
This can always be done over an algebraically closed field, but the interesting part is whether it can be done without leaving our field . Let’s rewrite this expression slightly.
Split into the sum of odd and even parts:
Then, we can rewrite:
the existence of such and is a well-known problem from number theory, and it is equivalent to being a square modulo .
Let’s assume decomposes into a product of irreducible polynomials,
.
We can, of course, solve the problem for each of those separately - and the probability of success for each factor is (because is a field, so half of the elements are squares and half are not).
It can be shown that the probability of this happening in total is . So we can just regenerate the witness few times (using some free parameters deliberately injected into the circuit), and get such a witness that decomposes.
Purely from the ciphertext size perspective we
So naively, this increases the ciphertext times.
There are some more aggressive tricks that could further offset this growth. Because we are in the QAP world already, it seems strange that we are telling the decryptor in which points do we evaluate our QAP - after all, it doesn’t really need this information! Then, it is plausible that the amount of points can be decreased - at least all known attacks do not really work if we query in just random hidden points. Under this optimistic regime, the fix would cost just .
Another related optimization is the structured matrices approach that we initially invented pufferfishes for. This is a story for another day - as for now we need to clear the baseline and make sure that our main scheme is not leaking; but generally moving to pufferfishes seems to enable various optimizations all around.