arXiv:2611.00289cs.CCOct 2026

Manuscript Offprint

arXiv:2611.00289

The Complexity of Choosing Parity Projections

Karthik Sheshadri, Nicholas Smirnov

Abstract

Cube attacks in cryptanalysis seek small sets of Boolean variables (cubes) whose parity sum is constant. We study the bounded constant derivative problem introduced by Smirnov (2026), which seeks a smallest cube with sum 1, and its sum-0 analogue. Despite their similarity, the problems differ sharply in parameterized complexity: the sum-1 problem admits a 2O(k2)2^{O(k^2)} poly(N)(N)-time algorithm, where kk is cube size, whereas the sum-0 problem is not fixed-parameter tractable unless FPT = W[1]. Without a bound on cube size, both problems are Σ2⊕P\Sigma_2^{\oplus P}-complete and NP-hard to approximate within N1−εN^{1-\varepsilon} for every fixed 0<ε<10 < \varepsilon < 1.

Our hardness proofs use a crown construction that embeds maximal monomials of parity-projected circuits into positive 2CNF. This yields completeness and inapproximability results, as well as a dichotomy for Boolean constraint languages of arity at most two: the bounded constant derivative problem is in P when all relations are affine and Σ2⊕P\Sigma_2^{\oplus P}-complete otherwise. We also give algorithms parameterized by the number of quadratic rounds, treewidth, or ordered branching-program width, with lower bounds for all three unless NP ⊆\subseteq SUBEXP. The treewidth lower bound holds for circuits; the case of 2CNF remains open.

1 Introduction

Let ff be a Boolean function of the variables x1,…,xnx_1, \ldots, x_n and let SS be a nonempty set of these variables. Fixing the variables outside SS to a value yy and summing ff over all 2∣S∣2^{|S|} assignments to the variables in SS gives, modulo two, a Boolean function of yy,

(DSf)(y)=⨁z∈{0,1}Sf(z,y).(D_{S}f)(y)=\bigoplus_{z\in\{0,1\}^{S}}f(z,y).

Cryptanalysts call SS a cube and DSfD_{S}f its superpoly [DS09].

The bounded constant derivative problem (BCD) of [Smi26] asks, given ff as a formula or a circuit and a number kk, whether some set SS of at most kk variables has DSf≡1D_{S}f \equiv 1. We study BCD and its constant-zero counterpart, which asks the same question for DSf≡0D_{S}f \equiv 0.

Following Smirnov [Smi26], we call a set SS with DSf≡1D_{S}f \equiv 1 a derivative certificate of ff (certificate for short) and write cert(f)\text{cert}(f) for the size of the smallest one. We call a set SS with DSf≡0D_{S}f \equiv 0 a zero cube and write ζ(f)\zeta(f) for the size of the smallest one. Both quantities are +∞+\infty when no set exists.

The problem of the constant superpoly is well-motivated in cryptanalysis. Dinur and Shamir [DS09] showed that a cube whose superpoly is a simple function of the secret key yields an equation in the key bits. Sufficiently many such cubes recover the key of a reduced round stream cipher. For any small cube, a random polynomial is extremely unlikely to have a constant superpoly; for a uniformly random function of nn variables and a cube of size kk, the probability is 21−2n−k2^{1-2^{n-k}}. The problem involves searching for a cube with a constant superpoly given the function, which is provided either explicitly as a circuit or as a composition of low degree round maps.

In [DRS24], Dutta, Rajasree and Sarkar address the question of how hard this search is in the worst case. They show that monomial prediction is ⊕\oplusP-complete. Since every coefficient above the chosen set must be controlled and the set itself must be found, our problem is more demanding than monomial prediction.

Smirnov [Smi26] observed that both conditions have a simple description in terms of the algebraic normal form of ff. SS is a certificate exactly when xSx_S is a term of ff that is contained in no larger term, and it is a zero cube exactly when no term of ff contains xSx_S. Therefore, a certificate is a small maximal term and a zero cube is a small set that no term covers. When the terms of ff are listed, both are easy to find. However, a short formula may have exponentially many terms, and the description does not by itself give an algorithm. Smirnov showed that BCD is coNP-complete on circuits for each fixed kk, and that for variable kk it belongs to Σ2⊕P\Sigma_2^{\oplus P}. Smirnov also posed an open question, namely, whether BCD is complete for Σ2⊕P\Sigma_2^{\oplus P}. A preliminary manuscript by Sheshadri [She26] proved hardness results for circuits and for restricted 3CNF formulas. To the best of our knowledge, nothing in published literature addressed formulas with two literals per clause, the zero cube version, or the parameterized complexity of either problem.

Our proofs evolve from three lineages of prior work. Faben [Fab08] introduced reductions that preserve the number of solutions of a generalized satisfiability problem modulo kk, and used them to classify the complexity of counting those solutions modulo kk. His work was developed further by Kazeminia and Bulatov [KB25], who extended modular counting to general constraint problems and reduced them to problems with binary constraints only. However, note that a minimization problem is sensitive to the maximal terms of the resulting formula, which related work does not address.

Approximation bounds of the same kind appear in Umans [Uma99, Uma01], who proved strong inapproximability results for Σ2\Sigma_2 minimization problems such as the shortest implicant.

Whereas for algorithms based on structural width the closest results are those for quantified satisfiability [LM18] and projected model counting [FHM+23^{+23}], where the summed variables are given, our problems require the set of summed variables to be part of the solution.

Input, and what is askedCertificates (DSf≡1D_{S}f \equiv 1)Zero cubes (DSf≡0D_{S}f \equiv 0)
linear system Hx=bHx=b, exact signed 2CNF, cube size ≤k\le kP (column basis)2O(k2)poly(ℓ)2^{O(k^2)} \text{poly}(\ell), kernel of 2O(k)2^{O(k)} bitsNP-hard (minimum distance)coW[1]-hard to tell ≤k\le k from >g(k)> g(k), any computable gg
positive 2CNF, exact positive 2CNF, poly-time approximationΣ2⊕P\Sigma_2^{\oplus P}-completeN1−εN^{1-\varepsilon} and ℓ1−ε\ell^{1-\varepsilon} hardΣ2⊕P\Sigma_2^{\oplus P}-completeN1−εN^{1-\varepsilon} and ℓ1/2−ε\ell^{1/2-\varepsilon} hard
3CNF, each fixed kkP, but Horn 3CNF is coW[1]-hard in kkcoNP-complete
4CNF, each fixed kkcoNP-completecoNP-complete
rr quadratic rounds, nn inputsnO(2r)poly(ℓ)n^{O(2^r)} \text{poly}(\ell), no n2o(r)poly(ℓ)n^{2^{o(r)}} \text{poly}(\ell)not treated here
treewidth ww (circuits)22O(w)poly(ℓ)2^{2^{O(w)}} \text{poly}(\ell), tightsame algorithm
ordered branching programs, width ww2O(w2)n2^{O(w^2)} n, no 2wo(1)poly(ℓ)2^{w^{o(1)}} \text{poly}(\ell)same algorithm

Table 1: Summary of results. Approximation entries hold for every fixed ε>0\varepsilon > 0 unless P=NP; for certificates on positive 2CNF they hold under the weaker assumption Σ2⊕P≠P\Sigma_2^{\oplus P} \neq P. The lower bounds in the last three rows hold unless NP ⊆\subseteq SUBEXP. The zero-cube hardness entries of the 2CNF rows hold on positive unit-free 2CNF that is satisfiable, has every variable essential, and comes with a zero cube supplied. The first row is the example of Section 2.

Notation. Throughout, NN is the number of variables of the input and ℓ\ell is its encoding length. A signed 2CNF may contain both positive and negative literals, a positive 2CNF contains only positive literals, and a 2CNF is unit-free if every clause has two variables. FPT and W[1] are the standard notions of parameterized complexity [CFK+15^{+15}]. A problem is coW[1]-hard if it is at least as hard as the complement of kk-Clique, and such a problem is not fixed-parameter tractable unless FPT=W[1]. SUBEXP is the class of problems that can be solved in time 2ℓε2^{\ell \varepsilon} for every fixed ε>0\varepsilon > 0. The Exponential Time Hypothesis (ETH) asserts that for some δ>0\delta > 0, 3SAT on NN variables cannot be solved in time 2δN2^{\delta N} [CFK+15^{+15}]. ETH was recently refuted [Ope26]. Our conditional lower bounds therefore assume only that NP ⊈\not\subseteq SUBEXP, a weaker hypothesis that remains open.

Our contributions. We determine the complexity of both problems on binary formulas.

Theorem 1.1. (a) On signed 2CNF, a minimum certificate of size at most kk can be found, or shown not to exist, in 2O(k2)poly(ℓ)2^{O(k^2)} \text{poly}(\ell) time, and the problem has a kernel with 2O(k)2^{O(k)} bits.

(b) On positive unit-free 2CNF, for every computable function g(k)≥kg(k) \geq k, deciding whether ζ(f)≤k\zeta(f) \leq k or ζ(f)>g(k)\zeta(f) > g(k) is coW[1]-hard. The hard instances are satisfiable, every variable is essential, and a zero cube is supplied with the instance.

In part (a) we establish an FPT algorithm and a kernel for minimum certificates on signed 2CNF (Theorem 3.1 and Theorem D.1). Part (b) concerns the exclusion of FPT algorithms that tell a small zero cube from a large one (Theorem 4.1). Note that the exclusion covers any FPT algorithm that approximates the smallest zero cube within a computable factor, even one whose running time depends on the true optimum rather than on kk (Theorem 4.3). Notice that the classical classification does not distinguish the two problems. Both are Σ2⊕P\Sigma_2^{\oplus P}-complete on positive unit-free 2CNF (Theorem 5.4 and Theorem C.1), and are hard for the same reason, as both reductions go through the lifting theorem described below. The difference appears only when the cube is required to be small.

For the purposes of polynomial time approximation, we show that neither minimum can be approximated within N1−εN^{1-\varepsilon} on positive 2CNF, for any fixed 0<ε<10 < \varepsilon < 1. In terms of ℓ\ell the bounds are ℓ1−ε\ell^{1-\varepsilon} for certificates on positive 2CNF and for zero cubes on satisfiable 3CNF, and ℓ1/2−ε\ell^{1/2-\varepsilon} for zero cubes on positive 2CNF.

All of the classical hardness results come from a single construction, the weighted lifting theorem of Section 5 (Theorem 5.3). It takes an arbitrary circuit, sums out some of its inputs, and produces a positive 2CNF whose certificates are exactly the maximal terms of the summed circuit.

The same construction gives a dichotomy for Boolean constraint languages of arity at most two. BCD is in P when all relations are affine and Σ2⊕P\Sigma_2^{\oplus P}-complete otherwise (Theorem 6.1).

Additionally, we contribute algorithms parameterized by the number of quadratic rounds rr and by the treewidth ww, running in time nO(2r)n^{O(2^r)} poly(ℓ\ell) and 22O(w)2^{2^{O(w)}} poly(ℓ\ell) respectively, with lower bounds, unless NP ⊆\subseteq SUBEXP, that rule out n2o(r)n^{2^{o(r)}} poly(ℓ\ell) time in a stated range of rr (Theorem 6.2) and 22o(w)2^{2^{o(w)}} poly(ℓ\ell) time for circuits (Theorem 6.3). For branching programs of width ww we give a 2O(w2)2^{O(w^2)} n algorithm (Theorem I.1), and under the same assumption we rule out 2wo(1)2^{w^{o(1)}} poly(ℓ\ell) time (Theorem I.2).

We note two boundaries. Clause width three already defeats the algorithm of part (a), because on Horn 3CNF certificates have the same arbitrary parameterized gap that zero cubes have on positive 2CNF (Theorem F.1). However, for each fixed kk the problem remains in P on 3CNF and becomes coNP-complete on 4CNF (Theorem F.2).

The positive-2CNF hardness survives on formulas whose independence complex strongly collapses to a point (Section J). These results are listed in Table 1.

The remainder of this paper is organized as follows. Section 2 explains the ideas behind the three main proofs. Sections 3 to 5 contain the proofs of part (a), of part (b), and of the classical results, and Section 6 treats the other representations. All deferred proofs are in the appendix.