An average-case variant of the k-SUM conjecture asserts that finding k numbers that sum to 0 in a list of r random numbers, each of the order rk, cannot be done in much less than \(r^{\lceil k/2 \rceil }\) time. However, in the dense regime of parameters, where the list contains more numbers and many solutions exist, the complexity of finding one of them can be significantly improved by Wagner’s k-tree algorithm. Such algorithms for k-SUM in the dense regime have many applications, notably in cryptanalysis.
In this article, assuming the average-case k-SUM conjecture, we prove that known algorithms are essentially optimal for k= 3,4,5. For k> 5, we prove the optimality of the k-tree algorithm for a limited range of parameters. We also prove similar results for k-XOR, where the sum is replaced with exclusive or.
Our results are obtained by a self-reduction that, given an instance of k-SUM that has a few solutions, produces from it many instances in the dense regime. We solve each of these instances using the dense k-SUM oracle and hope that a solution to a dense instance also solves the original problem. We deal with potentially malicious oracles (that repeatedly output correlated useless solutions) by an obfuscation process that adds noise to the dense instances. Using discrete Fourier analysis, we show that the obfuscation eliminates correlations among the oracle’s solutions, even though its inputs are highly correlated.
1 Introduction
1.1 Background
The k-SUM problem. For parameters \(k = O(1),r\) , the classical worst-case search variant of the k-SUM problem asks: Given a list of r numbers, find (with high probability) k of them whose SUM is zero, assuming such numbers exist.1 Given that a solution exists, a simple sort-and-match (or meet-in-the-middle) algorithm finds it in time \(T=\tilde{O}(r^{\lceil k/2 \rceil })\) (the notation \(\tilde{O}\) hides logarithmic factors in r), and the well-known k-SUM conjecture (that generalizes the 3-SUM conjecture [18]) states that no algorithm can do substantially better in standard computational models (such as the word RAM model).
In this article, we consider average-case variants of the k-SUM problem.
Definition 1.1 (Average-case k-SUM Problem)
In the \((k,N,r)\) -SUM problem, the input consists of r elements \(z_1,\ldots ,z_r\) , each of them chosen independently and uniformly at random from \(\lbrace -N,\ldots ,N\rbrace\) . The goal is to find a k-tuple (an ordered set of distinct indices) \(K = \lbrace i_1,\ldots ,i_k\rbrace\) , such that \(\sum _{j \in K} z_j = 0\) , where the sum is over \(\mathbb {Z}\) .
In a sparse regime of parameters only a few solutions exist on average, i.e., \(r^k \approx N\) . It is considered folklore that the uniform distribution is a hard distribution for k-SUM under a standard model of computation (see References [24] and [34] for a formulation for \(k=3\) ):
Any algorithm that solves the \((k,N,r)\) -SUM problem where \(r = N^{1/k}\) with probability \(\Omega _k(1)\) has expected running time of at least \(T= \Omega _k(r^{\lceil k/2 \rceil - o(1)})\) .
We note that for constant k and \(N = \omega (r^k)\) , a solution exists with probability \(o(1)\) , hence the problem cannot be solved with probability \(\Omega _k(1)\) , regardless of the running time.
In the dense regime where many solutions exist on average (namely, when \(r^k \gg N\) ), one can do much better.
For \(k=3\) , there is a simple algorithm that filters the input by keeping only numbers that are smaller than some threshold in absolute value. This gives a smaller sparse instance to which the standard algorithm is applied to solve the problem in time \(T = \tilde{O}(N/r)\) (for \(N^{1/3} \le r \le N^{1/2}\) ). For \(k \gt 3\) , improvements are obtained via the celebrated Wagner’s k-tree algorithm [36] discussed below.
The k-XOR problem. The discussion above equally applies to the average-case k-XOR problem.
Definition 1.3 (Average-case k-XOR Problem)
In the \((k,2^n,r)\) -XOR problem, the input consists of r vectors \(z_1,\ldots ,z_r\) , each chosen independently and uniformly at random from \(\lbrace 0,1\rbrace ^n\) . The goal is to find a k-tuple, \(K = \lbrace i_1,\ldots ,i_k\rbrace\) , such that \(\bigoplus _{j \in K} z_j = 0_n\) .
Similarly to k-SUM, the following conjecture is considered folklore:
Any algorithm that solves the \((k,N = 2^n,r)\) -XOR problem where \(r = N^{1/k}\) with probability \(\Omega _k(1)\) has expected running time of at least \(T= \Omega _k(r^{\lceil k/2 \rceil - o(1)})\) .
In the dense 3-XOR problem, the input consists of \(r \gg 2^{n/3}\) uniform vectors. Similarly to 3-SUM, a simple filtering algorithm has complexity \(T = \tilde{O}(N/r)\) for \(N^{1/3} \le r \le N^{1/2}\) . The dense 3-XOR problem has various applications in cryptography and cryptanalysis [10, 15, 23, 25, 32]. While mild (logarithmic in N) improvements to the simple filtering algorithm are known [23, 25, 32], any substantial (i.e., polynomial in N) improvement would be considered a breakthrough.
Wagner’s k-tree algorithm. For \(k \gt 3\) , the k-tree algorithm of Wagner [36] allows finding a solution to k-XOR in time \(T= \tilde{O}(N^{1/(1+\lfloor \log _2 k \rfloor)})\) , when r is of similar size. The generalized algorithm of Minder and Sinclair [30] provides a tradeoff between r and T, for all \(N^{1/k} \le r \le N^{1/(1+\lfloor \log _2 k \rfloor)}\) . For the most basic case of \(k=4\) , the tradeoff curve is \(T=\tilde{O}(N/r^2)\) for \(N^{1/4} \le r \le N^{1/3}\) . As was noted in Reference [36], the algorithm is also applicable to the modular k-SUM problem in \(\mathbb {Z}_N\) . Similarly, it can be easily modified to work for the average-case variant of k-SUM stated above. For the sake of completeness, we give a high-level overview of the k-tree algorithm and its generalization in Appendix A.
In the 20 years since its introduction, the k-tree algorithm (notably for small k values) has become a central tool in cryptanalysis for solving both dense k-SUM and k-XOR problems (see Reference [23]). Specifically, it is used in breaking hash functions [29, 36], stream ciphers [27], block ciphers [16], signature schemes [7] (where the optimal value of k depends on the amount of available data), and so on. Furthermore, it has found multiple applications that are not directly related to cryptanalysis. Notably, the representation technique [20] crucially relies on variants of the algorithm for small values of k to find one out of many representations of a solution to a problem. This technique gave rise to breakthrough algorithms for solving subset-sum [20, 31] and related problems such as decoding binary linear codes [6].
Finally, the k-tree algorithm is closely related to the Blum-Kalai-Wasserman (BKW) algorithm for solving the LPN (learning parity with noise) problem [8] and its extensions, such as Lyubashevsky’s algorithm [28] (although these use \(k = \omega (1)\) ).
In this article, we address the question: Are the best-known algorithms for dense \(\mathbf {k}\) -SUM and \(\mathbf {k}\) -XOR optimal?
1.2 Our Results
We show that in some of the most basic cases, \(k=3,4,5\) , as well as in other settings, the best-known algorithms for k-SUM (respectively, k-XOR) in the dense regime are optimal up to logarithmic factors in the input list size, unless the sparse average-case k-SUM (respectively, k-XOR) conjecture fails.
Informal statement of the main results. Our main theorem for k-SUM is as follows:
Assume that any algorithm that solves \((k,N,N^{1/k})\) -SUM with probability \(\Omega _k(1)/(\log N)^2\) has expected running time of at least \(T = T(N,k)\) .
Then, there is \(C=C(k)\) such that for any \(0 \le \epsilon \le 1/2\) , any algorithm that solves \((k,N^{\prime },(N^{\prime })^{(1 + \epsilon)/k})\) -SUM with probability \(1/2\) has expected running time of at least \(C \cdot T((N^{\prime })^{1 + \epsilon }, k) \cdot (N^{\prime })^{- \epsilon }\) .
Remark 1.6.
We make several related remarks about the theorem.
—
While the success probability in the hardness assumption of Theorem 1.5 is slightly smaller than the constant success probability in Conjecture 1.2, disproving this stronger assumption with the same time complexity would be considered a breakthrough (e.g., for cryptanalytic applications).
—
It is possible to amplify the success probability in the hardness assumption from \(\Omega _k(1)/(\log N)^2\) to \(1/2\) (or any constant) at the cost of increasing the number of input elements r and the expected running time of the algorithm by a factor of \((\log N)^2 \cdot O_k(1)\) . The amplification is obtained by partitioning the elements into disjoint groups of size \(N^{1/k}\) and running the algorithm for \((k,N,N^{1/k})\) -SUM on each group independently.
—
The input size of \(N^{1/k}\) in the conditional hardness assumption can be adjusted to \(C_1 \cdot N^{1/k}\) for any constant \(C_1 \gt 0\) . This only requires adjusting the hidden constant behind the success probability \(\Omega _k(1)/(\log N)^2\) .
We obtain similar results for k-XOR (with constant success probability in the hardness assumption, as in Conjecture 1.4). Our main theorem for k-XOR is as follows:
Assume that any algorithm that solves \((k,N,N^{1/k})\) -XOR with probability \(\Omega _k(1)\) has expected running time of at least \(T = T(N,k)\) .
Then, there is \(C=C(k)\) such that for any \(0 \le \epsilon \le 1/2\) , any algorithm that solves \((k,N^{\prime },(N^{\prime })^{(1 + \epsilon)/k})\) -XOR with probability \(1/2\) has expected running time of at least \(C \cdot T((N^{\prime })^{1 + \epsilon }, k) \cdot (N^{\prime })^{- \epsilon }\) .
Discussion. To better understand the tradeoff obtained by the theorem, set \(N^{\prime } = N\) and \(T(N,k) = \Omega (N^{\alpha (k) -o(1)})\) (for some function \(\alpha (k)\) ). The theorem implies that any algorithm for \((k,N,r)\) -SUM with \(r \approx N^{(1 + \epsilon)/k}\) (for \(0 \le \epsilon \le 1/2\) ) that succeeds with probability \(1/2\) has expected running time of
Specifically, for \(k=3\) , by a slightly stronger variant of the sparse average-case k-SUM conjecture (with the success probability in the hardness assumption adjusted to \(\Omega _k(1)/(\log N)^2\) ), we deduce that any algorithm for \((3,N,r)\) -SUM that succeeds with probability \(1/2\) has expected running time of \(\Omega ({N^{1-o(1)}}/r)\) . We conclude that the tradeoff \(T = \tilde{O}(N/r)\) for \(N^{1/3} \le r \le N^{1/2}\) obtained by the simple (filtering) sort-and-match algorithm is essentially optimal. Similar tightness holds for the 3-XOR problem.
By a similar calculation for \(k=4\) , the (extended) k-tree algorithm (obtaining the tradeoff \(T=\tilde{O}(N/r^2)\) ) is essentially optimal, under the sparse average-case k-SUM (respectively, k-XOR) conjecture. Theorems 1.5 and 1.7 yield optimality of the best-known algorithm also for \(k=5\) and for part of the range for other values of k. In particular, for even values of k, we conclude that any algorithm for \((k,N,r)\) -SUM (respectively, XOR) that succeeds with probability \(1/2\) has expected running time of \(T = \Omega (N^{1 - o(1)} / r^{k/2})\) . This essentially matches the extended k-tree algorithm for k values divisible by 4 in the range \(N^{1/k} \le r \le N^{4/3k}\) .
We further note that the loss in the reduction provided by the above theorems is almost linear, i.e., a \(O_k(1)\) factor for k-XOR and logarithmic in N for k-SUM. This means that for \(k = 3,4,5\) any improvement of known algorithms, even by a sufficiently large logarithmic factor in N, can be leveraged through the theorem to obtain a similar improvement in the algorithms for the sparse average-case k-SUM (respectively, k-XOR) problem.
Figure 1 shows our k-SUM and k-XOR density-complexity tradeoff lower bounds compared to the best-known upper bounds for \(k = 3,4,8\) (ignoring logarithmic factors).
Fig. 1.
Fig. 1. k-SUM and k-XOR density-complexity tradeoff lower and upper bounds for \(k = 3,4,8\) .
1.3 Our Methods
We achieve our results by a self-reduction from the average-case k-SUM (k-XOR) problem in the sparse regime to the average-case k-SUM (k-XOR) problem in the dense regime. In the following description, we focus on k-XOR, as technical details are simpler for this problem. We then summarize the main different ingredients for k-SUM.
The reduction for k-XOR. The basic observation is that we can generate a dense instance with r input vectors from a sparse instance with r input vectors by truncating the n-bit input vectors to obtain shorter m-bit input vectors for \(m \lt n\) . This increases the effective input list size (relative to the vector length) and the number of solutions.
We rewrite our main result in a more convenient form based on this observation by a change of variables for the dense regime:
Assume that any algorithm that solves \((k,N=2^n,N^{1/k} = 2^{n/k})\) -XOR with probability \(\Omega _k(1)\) has expected running time of at least \(T = T(N,k)\) .
Then, there is \(C=C(k)\) such that for any \(n/2 \le m \le n\) , any algorithm that solves \((k,M = 2^m, 2^{n/k})\) -XOR with probability \(1/2\) has expected running time of at least \(C \cdot T(2^m,k) \cdot 2^{m - n}\) .
Observe that this is indeed a reformulation of Theorem 1.7, obtained by setting \(n^{\prime }=m\) and \(n = (1 + \epsilon)m\) (hence, \((N^{\prime })^{- \epsilon } = 2^{- \epsilon n^{\prime } } = 2^{- \epsilon m} = 2^{m - n}\) ).
The basic idea of the reduction is to take the sparse input of r uniform n-bit vectors, generate from it many dense k-XOR inputs of r uniform m-bit vectors, and solve each one using a black-box algorithm B. We then check whether each solution yields a k-XOR solution for the original n-bit vectors. If we could make the input sets of m-bit vectors completely independent, then \(O(2^{n-m})\) calls to B would be sufficient (as the probability that a solution for m-bit vectors corresponds to a solution for n-bit vectors is \(2^{m-n}\) ), and the assertion of Theorem 1.8 would be achieved. In fact, it is easy to show that pairwise independence suffices. However, one cannot make these input sets pairwise-independent and maintain their relation to the original n-bit vectors at the same time (unless \(m \le n/2\) , which is not useful in our case). Thus, even though it is called about \(2^{n-m}\) times, B could potentially repeatedly output solutions to dense k-XOR instances that reside in a small set that does not contain any solution to the sparse instance.
We overcome this obstacle by an obfuscation process, which applies to the input vectors two different types of noise consecutively and allows us to achieve almost pairwise independence of B’s outputs even though its inputs are significantly correlated. In the reduction, we are given a sequence \(z_1, \ldots , z_r \in \lbrace 0,1\rbrace ^n\) for which we wish to solve the k-XOR problem. We apply the following procedure:
(1)
Draw a uniformly random matrix \(T \in \lbrace 0,1\rbrace ^{m \times n}\) of full rank m and a uniformly random permutation P on r elements.
(2)
Let \(x_{i} = T(z_{P(i)})\) for all \(i \in [r]\) .
(3)
FeedB with \(x_1, \ldots , x_r\) . In case it outputs a k-tuple K with \(\bigoplus _{i \in K} x_i = 0_m\) , test whether \(\mathcal {K} = P(K)\) satisfies \(\bigoplus _{j \in \mathcal {K}} z_{j} = 0_n\) , and if so—output the k-tuple \(\mathcal {K}\) . Otherwise, repeat.
We prove that after \(2^{n-m}\) trials, with probability of \(\Omega _k(1)\) , the process outputs a solution of the sparse k-XOR problem. We use discrete Fourier analysis to bound the correlation between B’s outputs.
Remark 1.9.
If we hash down a hard sparse instance to get a dense instance, then clearly any procedure that enumerates all solutions to the dense instance (if there are not too many) is hard as well. However, our reduction does not follow this standard paradigm, as the oracle for the dense instance can only produce a single solution. Thus, we hash the sparse instance down in many different ways and repeatedly invoke the oracle to force it to produce many different potential solutions to the sparse instance.
The reduction for k-SUM. The reduction for k-SUM follows the same general strategy (with modified obfuscation), but its proof is more involved. In particular, in addition to discrete Fourier-analytic techniques, it uses tools from Littlewood-Offord theory [17].
Concisely, the reason for further complexity in the k-SUM case is that there are only a few group-homomorphisms from \(\mathbb {Z}_{N}\) to \(\mathbb {Z}_{M}\) (that may be used to obfuscate the input), while group-homomorphisms from \(\mathbb {F}_2^n\) to \(\mathbb {F}_2^m\) are abundant. We now elaborate on this point.
Both k-XOR and k-SUM reductions employ an obfuscation procedure to the input of the sparse problem. For k-XOR, we hash r elements of \(\left\lbrace 0,1\right\rbrace ^n\) to r elements of \(\left\lbrace 0,1\right\rbrace ^m\) ( \(m \lt n\) ), while for k-SUM, we hash r elements of \(\mathbb {Z}_{N}\) to r elements of \(\mathbb {Z}_{M}\) . Since we are required to pull-back linear information from the output of the process (i.e., a solution to a dense problem) to its input (i.e., solve the sparse problem), it is important that the obfuscation would be linear. However, the class of obfuscation functions must be rich enough to mask additional information that can be exploited by the dense algorithm to output correlated solutions. In the k-XOR case, we make use of a random, rank-m, linear map from \(\mathbb {F}_2^n\) to \(\mathbb {F}_2^m\) . There are \(2^{\Theta (mn)}\) options to choose this linear map. In the k-SUM problem, if we would insist on a (surjective) linear map from \(\mathbb {Z}_N\) to \(\mathbb {Z}_M\) , then there would be at most M such functions, which gives insufficient obfuscation (in particular, any \(x \in \mathbb {Z}_N\) that is divisible by M, would be mapped to 0). Hence, we must settle for a somewhat-linear obfuscation. We choose a function \({\phi }:{\mathbb {Z}_N} \rightarrow {\mathbb {Z}_M}\) of the form
\begin{equation*} \phi (x) = \gamma \lfloor \alpha \cdot x \cdot M/N \rceil \bmod M, \end{equation*}
where \(\alpha \in \mathbb {Z}_{N}^\ast\) , \(\gamma \in \mathbb {Z}_{M}^\ast\) are chosen uniformly at random and \(\lfloor \cdot \rceil\) denotes rounding to the nearest integer. This new class of non-strictly-linear obfuscation functions still enables us to pull back a solution from a dense problem to the sparse problem. Moreover, it turns out that this class is rich enough to allow obfuscation. However, proving this latter point is more involved, since the non-linearity of the obfuscation makes the use of Fourier-analytic tools more complex.
1.4 Related Work
Our result is naturally related to three lines of work.
Algorithms for dense k-SUM and k-XOR. The first line of work is the quest for designing better algorithms for generalized birthday problems, where the goal is to find a single k-SUM or k-XOR solution out of many. The systematic analysis of this problem was initiated by Wagner [36] in his k-tree algorithm2 and has led to numerous refined algorithms and applications thereof [14, 23, 25, 30, 32].
In this respect, we show that—perhaps surprisingly—the best-known algorithms are essentially optimal for \(k=3,4,5\) , unless a standard conjecture in computational complexity fails. Moreover, under similar conjectures, the best-known algorithms for any \(k \gt 5\) are essentially optimal for some range of parameters.
Fine-grained complexity. The second related line of work deals with complexity reductions to the k-SUM problem and its variants, which has become a flourishing field of research in the past decade, as part of the fine-grained complexity research direction [35]. Reductions to k-SUM or to k-XOR were shown for problems in computational geometry [4, 18], dynamic algorithms [1, 33], graph algorithms [22, 37], pattern matching [2], and more. In the past few years, such reductions were shown also for several cryptographic problems [5, 19, 24], as part of the emerging fine-grained cryptography research area [13].
Our work provides yet another reduction for a cryptography-related problem, however, the context of reduction in our case is somewhat different. While previous works prove security of (mainly theoretical) classes of cryptographic primitives, based on well-founded hardness assumptions, our work shows a bound on the possible effectiveness of an important class of cryptanalytic algorithms that are widely used for breaking cryptosystems. Thus, our results also have more practical significance.
Asymptotic hardness for dense k-SUM. Finally, a recent work related to ours is the paper cited in Reference [11] by Brakerski, Stephens-Davidowitz, and Vaikuntanathan, which proves asymptotic optimality of the k-tree algorithm for average-case k-SUM (whose complexity is \(N^{O(1/\log k)}\) ) by reducing it from worst-case complexity of lattice problems. While Reference [11] is related to our work, the results of the two papers are complementary due to several important differences, which we summarize below.
First, Reference [11] yields asymptotic bounds as \(k \rightarrow \infty\) , while our work concentrates on small values of k, which appear in applications of the k-tree algorithm to a different type of cryptanalytic problem. In this respect, our result resolves an open problem stated in Reference [11, Section 1.3], yet our reduction is not from a worst-case problem (due to various technical differences, it is not clear how to combine our techniques with the ones of Reference [11] to obtain a reduction from a worst-case problem). Second, while the bounds of Reference [11] are tight up to a constant multiplicative factor in the exponent, our reduction is tight up to constant (or logarithmic) factors for certain parameter ranges such as \(k=3,4,5\) . Third, while the reduction of Reference [11] is from a different problem, involving lattices, our reduction is from a conjecture in the sparse regime to the dense regime of the same problem (i.e., a self-reduction). We note that the density (or size) of the instance also plays a role in Reference [11], as a faster algorithm for sparser k-SUM instances yields a faster algorithm for the corresponding lattice problem. Fourth, in addition to k-SUM, we also obtain conditional hardness results for the k-XOR problem.
In terms of techniques, both papers aim at obtaining “sufficiently different” variants of the same input sample z. However, in Reference [11] these are obtained by re-randomization (repeatedly generating almost independent inputs to the k-SUM algorithm from the same list of vectors), and their independence is proved via the leftover hash lemma [21]. However, our variants are obtained via the obfuscation method described above in which the inputs to the k-SUM algorithm are highly correlated, unlike the setting of Reference [11]. We prove the low correlation of the algorithm’s outputs via discrete Fourier analytic methods.
1.5 Additional Application and Open Problems
Additional application. The security proof of the hash construction T5, recently proposed by Dodis et al. [15], is based on dense 3-XOR and 4-XOR assumptions. Our results directly imply that the security of the construction can be based on standard sparse 3-XOR and 4-XOR assumptions instead of non-standard dense ones. In this sense, our work (in combination with the original security proof of Reference [15]) allows to prove security for a cryptosystem, similarly to References [5, 19, 24], yet this proof is obtained for a practical cryptosystem.
Open problems. The main remaining open problem is to improve our lower bound in the setting of a large k and a large number of solutions, or alternatively, to improve the k-tree algorithm in this range.
The structure of the article. Next, we summarize our notations and conventions. In Section 3, we prove our main result for k-XOR, while in Section 4, we prove our main result for k-SUM.
2 Notations and Conventions
In this section, we introduce notations and conventions that will be used throughout the article.
Notations.
—
\(x \sim S\) means that x is a random variable uniformly distributed in the set S.
—
We interchangeably write \(\left\lbrace 0,1\right\rbrace\) and \(\mathbb {F}_2\) , where \(0=1 \oplus 1\) .
—
When \(z\in \mathbb {F}_2^{r \times n}\) , \(z_{ij}\) denotes the \((i,j)\) ’th entry of z, and \(z_i\mathrel {\mathop :}=(z_{i1}, \ldots , z_{in})\) .
—
For \(x \in \mathbb {F}_2^{r \times m}\) and a permutation \(P \in S_r\) , we denote by \(P(x)\) the value \(y \in \mathbb {F}_2^{r \times m}\) satisfying \(y_{P(i)}=x_i\) for all i.
—
For a linear map \({T}:{\mathbb {F}_2^n} \rightarrow {\mathbb {F}_2^m}\) and for \(z\in \mathbb {F}_2^{r \times n}\) , we denote by \(T(z)\) the value \(x \in \mathbb {F}_2^{r \times m}\) satisfying \(x_{i}=T(z_i)\) for all i.
—
\(\mathbb {Z}_L\) is the group whose elements are \(\lbrace 0,1,\ldots ,L-1\rbrace\) and whose operation is addition modulo L.
—
\(a \,\%\,b\) (or \(a \bmod b\) ) stands for the single element in \((a + b\mathbb {Z}) \cap [0, b)\) . We switch to this shorter notation in Section 4.3, as it is more convenient to use inside long arithmetic expressions.
—
For a real number u, the rounded value \(\lfloor u\rceil\) is the unique integer in \(u+(-1/2, 1/2]\) .
—
For functions \(f,g: \mathbb {N} \rightarrow \mathbb {R}_+\) and a fixed parameter k, \(f=O(g)\) means that \(\forall n: f(n) \le Cg(n)\) for an absolute constant C, \(f=\tilde{O}(g)\) means that \(\forall n: f(n) \le C_1 \cdot (\log n)^{C_2} \cdot g(n)\) for absolute constants \(C_1,C_2\) , and \(f=O_k(g)\) means that \(\forall n: f(n) \le h(k) \cdot g(n)\) for some function \(h:\mathbb {N} \rightarrow \mathbb {R}_+\) .
Conventions.
—
Operations within domains. Throughout the article, we consider variables in various domains. For example, when analyzing k-XOR, we consider variables in \(\lbrace 0,1\rbrace ^{\ell }\) and \(\lbrace 0,1\rbrace ^{r \times \ell }\) for different values of \(\ell ,r\) , while for k-SUM, we consider variables in \(\mathbb {Z}_L\) and \(\mathbb {Z}_L^r\) for different values of \(L,r\) . Whenever an operation is applied on two elements of the same domain, the result belongs to the same domain. For example, addition between two elements of \(\mathbb {Z}_L\) is always performed modulo L.
—
Names of variables. In the reductions presented in the article, we begin with vectors that belong to a “large” space— \(\lbrace 0,1\rbrace ^{r \times n}\) for k-XOR ( \(\mathbb {Z}_N^r\) for k-SUM)—and use them to define vectors that belong to a “smaller” space— \(\lbrace 0,1\rbrace ^{r \times m}\) for k-XOR ( \(\mathbb {Z}_M^r\) for k-SUM).
Throughout the article, vectors that belong to a “large” space are denoted by z, while vectors that belong to a “small” space are denoted by x or y. Auxiliary vectors denoted by u or v may belong to an arbitrary domain, which will be explicitly defined.
—
Inner products. All inner products in Section 3 are between functions \(f,g:\lbrace 0,1\rbrace ^{r \times m} \rightarrow \mathbb {R}\) (for a particular choice of m), and consequently, their results belong to \(\mathbb {R}\) . Most inner products in Section 4 are between vectors in \(\mathbb {Z}_p^r\) (for a particular choice of p), and consequently, their results belong to \(\mathbb {Z}_p\) .
3 Hardness of Dense K-XOR
In this section, we prove Theorem 1.7 (or equivalently, Theorem 1.8). The precise formulation of the main theorem is as follows:
Theorem 3.1 (Sparse to Densek-XOR Reduction)
Let \(m,n\) be integers such that \(n/2 \le m \le n\) . Assume there is an algorithm for \((k,2^m, 2^{n/k})\) -XOR with success probability \(\beta\) and expected running time \(\mathcal {T}\) . Then, there is an algorithm for \((k, 2^n, 2^{n/k})\) -XOR with success probability \(\frac{\beta ^4}{(16k)^{k+2}}\) and expected running time at most \(2^{n-m} \cdot (\mathcal {T}+ \tilde{O}_k(2^{n/k}))\) .
We make a few remarks. First, we work in the standard word RAM computational model, where an operation on each vector (of size \(O(n)\) ) takes unit time. However, our results do not change substantially in other standard computational models (e.g., in a model that counts the number of bit operations). Second, when applying the contrapositive of this theorem to prove hardness results for dense k-XOR with \(k=O(1)\) and \(\beta = 1/2\) to obtain the theorems 1.7 and 1.8, the factor \(\tilde{O}_k(2^{n/k})\) in this theorem is bounded by \(O_k(\mathcal {T})\) (and hence consumed by the factor \(C = C(k)\) of theorems 1.7 and 1.8). Indeed, the input in the \((k,M = 2^m, 2^{n/k})\) -XOR problem already contains \(2^{n/k}\) vectors. Finally, the loss factor \(\tfrac{\beta ^4}{(16k)^{k+2}}\) in the success probability can be significantly improved by a more refined analysis.
The proof of the theorem is based on two reductions: the main sparse to dense k-XOR reduction and the simple (but inefficient) sparse to dense reduction, which is required for parameter ranges where the main reduction is not applicable. We summarize these reductions in the two lemmas below and prove the simpler lemma first.
Lemma 3.2 (Maink-XOR Reduction)
Let \(m,n,r\) satisfy \(n/2 \le m \le n \le \log _2 \binom{r}{k}\) . Assume there is an algorithm for \((k,2^m, r)\) -XOR with success probability \(\beta\) and expected running time \(\mathcal {T}\) . Then, there is an algorithm for \((k, 2^n, r)\) -XOR with success probability
and expected running time at most \(2^{n-m} \cdot (\mathcal {T}+ \tilde{O}(r))\) .
Lemma 3.3 (Simple Reduction).
Let \(d \gt 0\) by an integer. Assume there is an algorithm for \((k,2^n, d \cdot r)\) -XOR with success probability \(\beta\) and expected running time \(\mathcal {T}\) . Then, there is an algorithm for \((k, 2^n, r)\) -XOR with success probability at least \(\tfrac{\beta }{(2d)^k}\) and expected running time at most \(\mathcal {T} + \tilde{O}_k(d \cdot r)\) .
Proof of Lemma 3.3.
Let B be an algorithm for \((k, 2^n, d \cdot r)\) -XOR. We construct an algorithm for \((k, 2^n, r)\) -XOR as follows: Given an instance \(z_1,\ldots ,z_r\) , pick \((d-1) \cdot r\) vectors in \(\lbrace 0,1\rbrace ^n\) uniformly at random and append them the original instance. Then, apply a uniform permutation to the \(d \cdot r\) vectors and run B on this instance. If B succeeds to return a k-XOR, and this k-tuple is included in \(z_1,\ldots ,z_r\) , then the algorithm returns it. Otherwise, it fails.
As the input to B is uniformly permuted, the events (1) B succeeds, and (2) the returned k-tuple is included in \(z_1,\ldots ,z_r\) , are independent. By assumption, the probability of the first event is \(\beta\) . Note that we may assume \(r \ge 2k\) , as otherwise, a trivial algorithm for \((k,2^n,r)\) -XOR that goes over all possible k-tuples of input vectors runs in time \(O_k(1) \le \mathcal {T}+\tilde{O}_k(d \cdot r)\) . Given that \(r \ge 2k\) , the probability of the second event is at least \(((r-k)/(d \cdot r - k))^k \ge (2d)^{-k}\) . Thus, the algorithm succeeds with probability at least \(\beta /(2d)^k\) . □
We now prove that Theorem 3.1 follows from the lemmas.
Proof of Theorem 3.1.
Our goal is to devise an algorithm for \((k, 2^n, 2^{n/k})\) -XOR given an algorithm B for \((k, 2^m, 2^{n/k})\) -XOR with success probability \(\beta\) and expected running time \(\mathcal {T}\) .
We first construct an algorithm for \((k, 2^n, 2^{n/k} \cdot k)\) -XOR and then use Lemma 3.3 to sparsify the input.
Clearly, B is also applicable to \((k, 2^m, 2^{n/k} \cdot k)\) -XOR with similar success probability and complexity (by ignoring all but the first \(2^{n/k}\) input vectors). Denote \(r = 2^{n/k} \cdot k\) and note that as \(k! \gt (k/e)^k\) for all k, we have
Therefore, based on algorithm B for \((k, 2^m, 2^{n/k} \cdot k)\) -XOR, by Lemma 3.2, there is an algorithm \(B_1\) for \((k, 2^n, 2^{n/k} \cdot k)\) -XOR with success probability
and expected running time at most \(2^{n-m} \cdot (\mathcal {T}+ \tilde{O}_k(2^{n/k}))\) .
Using algorithm \(B_1\) for \((k, 2^n, r = 2^{n/k} \cdot k)\) -XOR, Lemma 3.3 (applied with \(d = k\) ) implies that there is an algorithm for \((k, 2^n, 2^{n/k})\) -XOR with success probability at least
and expected running time at most \(2^{n-m} \cdot (\mathcal {T}+ \tilde{O}_k(2^{n/k})) + \tilde{O}_k(k \cdot 2^{n/k}) = 2^{n-m} \cdot (\mathcal {T}+ \tilde{O}_k(2^{n/k}))\) , as claimed. □
3.1 Overview of the Main Reduction Lemma
The proof of the main reduction lemma (Lemma 3.2) is constructive—namely, we construct an algorithm and show that it satisfies the assertion of the lemma. A natural way to solve the sparse k-XOR problem using an oracle for the dense k-XOR problem is to truncate some of the bits. That is, given r vectors, \(z_1, \ldots , z_r \in \left\lbrace 0,1\right\rbrace ^n\) , with \(2^n \approx r^k\) (so we expect only \(\Theta (1)\) solutions), we may feed the oracle with \(x_1, \ldots , x_r \in \left\lbrace 0,1\right\rbrace ^m\) , where \(x_i\) is obtained from \(z_i\) by truncating the last \(t\mathrel {\mathop :}=n-m\) bits. In the new problem corresponding to \(x_1, \ldots , x_r\) , we expect to have \(\Theta (2^t)\) (i.e., many) solutions, and hence the oracle is applicable. A k-tuple output by the dense k-XOR oracle has a probability of \(2^{-t}\) to be a solution to the original z-problem (since we truncated exactly t bits, and z is uniformly distributed). Thus, it seems that if we feed the oracle \(\Theta (2^t)\) times with truncated inputs, then we expect \(\Theta (1)\) out of the \(\Theta (2^t)\) output k-tuples to solve the original z-problem, and consequently, solving the x-problem is at most \(2^t\) times easier than solving the z-problem.
The flaw in this argument is that we cannot expect the oracle to output a newly forged k-tuple in every application (especially if the oracle is deterministic and is fed with the same inputs in all applications). Hence, although the expected number of solutions we find is \(\Theta (1)\) , it might be that we solve the z-problem only with a small probability (e.g., it might be that with a high probability the oracle outputs many identical solutions).
Therefore, we have to trick the oracle so the k-tuples it outputs in the different applications will be pairwise-independent of each other—almost as if we feed it with a fresh uniformly chosen input every time.
For this purpose, we devise a method that receives r vectors in \(\left\lbrace 0,1\right\rbrace ^n\) (denoted \(z_1,\ldots ,z_r\) ) and randomly obfuscates them, returning r vectors in \(\left\lbrace 0,1\right\rbrace ^m\) (denoted \(x_1,\ldots ,x_r\) ). This obfuscation meets two criteria:
(1)
A solution to the k-XOR x-problem gives rise to a solution to the k-XOR z-problem with good probability (i.e., \(p \approx 2^{-t}\) ).
(2)
The obfuscation is powerful enough to disguise the fact all the x’s are generated from the same z, so each application of the oracle (pairwise) independently has a chance to solve the z-problem.
As we show below, this obfuscation method guarantees that after applying the oracle sufficiently many times on obfuscated x-problems, with a high probability a solution of the original z-problem will be obtained.
Remark 3.4.
The proof crucially relies on the strength of the obfuscation—specifically, on the fact that the probability of outputting the same k-tuple in an iteration pair is \(O(2^{-2t})\) . This is the motivation behind using the obfuscation we propose, as weaker obfuscations, such as truncating t randomly chosen bits, have oracles that output the same k-tuple in an iteration pair with probability much higher than \(2^{-2t}\) , even if we apply an invertible linear transformation after truncation.
In detail, consider a k-tuple of vectors whose XOR is \(v \in \left\lbrace 0,1\right\rbrace ^n\) ( \(v \ne 0\) ). Then, the probability that after randomly truncating bits from this k-tuple, they would XOR to 0 is higher for v of low Hamming weight. Now, suppose that there is a vector in the x-problem that belongs to several k-tuples whose XOR has low (non-zero) Hamming weight. Then, the corresponding vector in the z-problem is expected to belong to more k-XORs than the average vector. This vector can thus be singled out by the oracle, which would repeatedly output one of the k-XORs it belongs to (with relatively high probability).
Structure of the proof. First, we present the obfuscation algorithm and the lemma that asserts that it indeed satisfies the aforementioned properties. Then, we prove the main reduction lemma, assuming the obfuscation lemma. Finally, we prove the obfuscation lemma, which is the most complex part of the conditional k-XOR hardness proof.
3.2 The Obfuscation Algorithm
Let \(m,n,r\) satisfy \(n/2 \le m \le n \le \log _2 \binom{r}{k}\) , and let L be a parameter to be specified below. Let B be an algorithm for \((k,2^m, r)\) -XOR. The algorithm A for \((k,2^n, r)\) -XOR, which receives as input an r-tuple of n-bit vectors \((z_1,\ldots ,z_n) \in \lbrace 0,1\rbrace ^{r \times n}\) , is defined as follows:
Algorithm 3.5.
\(\phantom{}\)
(1)
RepeatL times:
(2)
Draw a uniformly random full-rank matrix \(T \in \mathbb {F}_2^{m \times n}\) (rank \(= m\) ) and a uniformly random permutation \(P \in S_r\) .
(3)
Let \(x_{i} = T(z_{P(i)})\) for all \(i \in [r]\) .
(4)
FeedB with \((x_1, \ldots , x_r)\) . In case it outputs a k-tuple K with \(\bigoplus _{i \in K} x_i = 0_m\) , test whether \(\mathcal {K} = P(K)\) satisfies \(\bigoplus _{i \in \mathcal {K}} z_{i} = 0_n\) , and if it does—then output the k-tuple \(\mathcal {K}\) . Otherwise, continue.
Thus, we try to solve A’s problem by considering many derived problems (in which we consider only m-bit vectors, instead of n-bit ones), trying to solve these using B, and in case its output solves A’s problem, we output the result. Each of these trials succeeds with some probability, and only one success is required. Repeating this procedure enough times, we are expected to find a solution with reasonable probability—unless failures are correlated. This is where the obfuscation lemma comes into play—it shows the trials are sufficiently independent for A to succeed.
The obfuscation lemma. The heart of the proof is the following lemma:
Lemma 3.6.
Let \((z_1,\ldots ,z_r) \in \lbrace 0,1\rbrace ^{r \times n}\) be chosen uniformly at random. Let \((x_1^{(1)},\ldots ,x_r^{(1)}) \in \lbrace 0,1\rbrace ^{r \times m}\) and \((x_1^{(2)},\ldots ,x_r^{(2)}) \in \lbrace 0,1\rbrace ^{r \times m}\) be obtained from it by the procedure described above (in two out of the L iterations). Let \(\mathcal {K}_1, \mathcal {K}_2\) be the two corresponding \(\mathcal {K}\) ’s obtained in the process. Then, assuming \(t \mathrel {\mathop :}=n-m \le m \le n \le \log _2 \binom{r}{k}\) , we have
where the probability is taken over \(z,x^{(1)}, x^{(2)}\) , and B’s randomness.
Note that cases where at least one of \(\mathcal {K}_1,\mathcal {K}_2\) is not obtained (that is, when in at least one of the two iterations, Algorithm B fails to find a solution to the \((k,2^m, r)\) -XOR problem) are not counted as equality between \(\mathcal {K}_1\) and \(\mathcal {K}_2\) .
We note that each of \((x_1^{(1)},\ldots ,x_r^{(1)})\) and \((x_1^{(2)},\ldots ,x_r^{(2)})\) is likely to have about \(2^{t}\) solutions to k-XOR, but only \(O(1)\) of these are common to both and typically correspond to k-XOR solutions for \((z_1,\ldots ,z_r)\) . Therefore, the lemma essentially asserts that B cannot do much better than output a uniform solution to each x-problem.
3.3 Proof of the Main Reduction Lemma
We prove now that the assertion of Lemma 3.2 follows from Lemma 3.6. The proof is a rather standard probabilistic argument. Afterwards, we present the considerably more complex proof of Lemma 3.6.
Proof of Lemma 3.2, assuming Lemma 3.6
Consider a slightly tweaked obfuscation process that has exactly L iterations (and may output multiple solutions). Clearly, the success probability of the tweaked obfuscation process is identical to the original one, and thus we analyze it instead. For any \(1 \le l \le L\) , let \(\mathcal {K}_l\) be the k-tuple obtained in the l’s iteration ( \(\mathcal {K}_l\) exists only when B succeeds, i.e., with probability \(\beta\) ). Denote by \(S_l\) the event that \(\mathcal {K}_l\) admits a solution to the \((k, 2^n, r)\) -XOR problem. We have \(\Pr [S_l]= 2^{m-n}\beta\) for each \(l = 1,\ldots ,L\) , since z is uniformly random, and m out of the n dimensions of \(\bigoplus _{i \in \mathcal {K}_l} z_i\) are known to nullify, independently of the other, beforehand-erased, \(n - m\) dimensions. (In other words, we know that \(\bigoplus _{i \in \mathcal {K}_l} z_i\) belongs to the kernel of a randomly chosen full-rank linear transformation \(T:\mathbb {F}_2^{n} \rightarrow \mathbb {F}_2^m\) , and hence, \(\Pr [\bigoplus _{i \in \mathcal {K}_l} z_i=0_n]=2^{m-n}\) .)
where \(\mathbb {1}\lbrace E\rbrace\) is the indicator of the event E. A simple inclusion-exclusion-like principle shows that \(Z^{\prime }\) lower bounds the number of distinct solutions found for the \((k, 2^n, r)\) -XOR problem in (tweaked) Algorithm 3.5. As the number of solutions is non-negative, Z lower bounds it as well. The Paley-Zygmund inequality [9, chapter 2], applied for the non-negative random variable Z, implies
Since \(\Pr [Z \gt 0]\) lower bounds the probability that (tweaked) Algorithm 3.5 solves the \((k, 2^n, r)\) -XOR problem, our task is reduced to lower bounding \({\mathbb {E}}[Z]^2\) and upper bounding \({\mathbb {E}}[Z^2]\) . The value of \({\mathbb {E}}[Z]\) is easily bounded as
We henceforth upper bound \({\mathbb {E}}[Z^2]\) . Let D be the number of distinct k-tuples \(T\subseteq [r]\) with \(\bigoplus _{i \in T} z_i = 0_n\) (that is, the number of actual solutions for the \((k, 2^n, r)\) -XOR problem in the set \(\lbrace z_1,\ldots ,z_r\rbrace\) ). Since Z is not larger than the number of solutions found in (tweaked) Algorithm 3.5, we have \(Z \le D\) , and in particular, \({\mathbb {E}}[Z^2] \le {\mathbb {E}}[D^2]\) .
Note that for different k-tuples \(T, T^{\prime }\) , the events \(\bigoplus _{i \in T} z_i = 0_n\) and \(\bigoplus _{i \in T^{\prime }} z_i = 0_n\) are independent, and each of them has probability \(2^{-n}\) . Hence,
In this section, we prove Lemma 3.6. We start by introducing a distribution that models two independent outputs of the obfuscation process and restate the obfuscation lemma.
Definition 3.7.
We say that a pair of random variables \((x^{(1)},x^{(2)})\) , each taking values in \(\mathbb {F}_2^{r \times m}\) , has an \((m,r,t)\) -distribution if there exist random variables \(z,\, T^{(j)}\) for \(j \in \lbrace 1,2\rbrace\) where:
(1)
\(z,\, T^{(1)},\, T^{(2)}\) , are independent random variables.
(2)
\(z\sim \mathbb {F}_2^{r \times (m+t)}\) is uniformly distributed.
(3)
\({T^{(j)}}:{\mathbb {F}_2^{m+t}} \rightarrow {\mathbb {F}_2^m}\) is a uniformly random, full-rank (i.e., rank \(=m\) ), linear transformation.
(4)
\(x^{(j)}_i = T^{(j)}(z_i)\) .
Lemma 3.8.
Let B be an algorithm that receives as input a list of r vectors, each of length m bits, and outputs the indices of \(k\gt 0\) vectors among them whose XOR is \(0_m\) (or a failure string). If \((x,y)\) has an \((m,r,t)\) -distribution, and \(P,Q\sim S_r\) are two uniformly random and independent permutations, then
where the probability is taken over B’s randomness, \(x,y\) and \(P,Q\) (the event on the left-hand side is contained in the event that both executions \(B(P(x))\) , \(B(Q(y))\) succeed).
Notice that Lemma 3.6 immediately follows from Lemma 3.8 (compare Equation (1) with Equation (2)).
3.4.1 Proof Outline.
The proof of Lemma 3.8 uses techniques from discrete Fourier analysis and consists of several steps.
(1)
Transformation to real-valued functions. We show that instead of analyzing the obfuscation on a tuple-valued function, it is sufficient to analyze its action on the simpler class of real-valued functions. We utilize the fact that our obfuscation randomly permutes the input vectors, so any oracle \({B}:{\left\lbrace 0,1\right\rbrace ^{r\times m}} \rightarrow {\binom{[r]}{k}}\) must, informally, treat all candidate output k-tuples in the same way. Hence, it suffices to analyze the modified, real-valued, oracle \({B^{\prime }}:{\left\lbrace 0,1\right\rbrace ^{r\times m}} \rightarrow {[0,1]}\) , which indicates the probability that B outputs the specific k-tuple \(K \mathrel {\mathop :}=\lbrace 1,\ldots ,k\rbrace\) when applied on its input. Specifically, our task is reduced to showing that
We divide the Fourier expansion into two parts—the Cartesian part
\begin{equation*} (B^{\prime })^C = \sum _{\lbrace S = U \times V: U \subseteq [r], V \subseteq [m]\rbrace } \widehat{B^{\prime }}(S)\chi _S, \end{equation*}
and the non-Cartesian part \((B^{\prime })^{\perp }=B^{\prime }-(B^{\prime })^C\) (which is orthogonal to \((B^{\prime })^C\) ). Informally, the contribution of the Cartesian part to the correlation corresponds to the information on aligned XORs of variables (such as \((z_{1,2} \oplus z_{1,3}) \oplus (z_{4,2} \oplus z_{4,3})\) ) preserved between the two obfuscations, while the contribution of the non-Cartesian part carries the rest of the information. Then, we handle each part of the correlation separately:
(a)
Obfuscation hides everything but aligned XORs. We show that for any function \(B^{\prime }\) , the obfuscation reduces the contribution to the left-hand side of Equation (3), associated with the non-Cartesian part, to at most \(2^{-2t}\) . This argument depends only on the obfuscation and does not rely on the specific problem we try to solve.
(b)
Aligned XORs do not reveal much. We show that in the case of the k-XOR problem, the contribution of the Cartesian part is also small. Here, we use the specific structure of the problem—specifically, the set \(\lbrace x:B^{\prime }(x) \gt 0\rbrace\) being small and admitting a nice algebraic structure (namely, \(B^{\prime }(x)=0\) whenever \(\bigoplus _{i=1}^k x_i \ne 0_m\) ).
Combination of the two bounds completes the proof.
3.4.2 Transformation to Real-valued Functions.
Lemma 3.9.
Let \({B}:{\left\lbrace 0,1\right\rbrace ^{r\times m}} \rightarrow {\binom{[r]}{k}}\) be an algorithm that outputs either a k-tuple R with \(\bigoplus _{i \in R} x_i = 0_m\) , or a failure string. Let \(K \mathrel {\mathop :}=\lbrace 1,\ldots , k\rbrace\) and define \({B^{\prime }}:{\left\lbrace 0,1\right\rbrace ^{r\times m}} \rightarrow {[0,1]}\) by
where \(P \sim S_r\) is a uniformly random permutation, and \(\bar{T} \sim GL_m(\mathbb {F}_2)\) is a uniformly random invertible linear map. The expectation in Equation (4) is taken also over B’s randomness. Then,
We note that while the obfuscation algorithm uses a full-rank shrinking transformation T from \(\mathbb {F}_2^{m+t}\) to \(\mathbb {F}_2^m\) , this transformation does not appear explicitly in Lemma 3.9. Instead, it appears implicitly via the assumption that \((x,y)\) has an \((m,r,t)\) -distribution (made just before Equation (7)) and plays a central role in the proof of Equation (7).
Proof.
To show Equation (5) note that if \(\bigoplus _{i \in K} x_i \ne 0,\) then B cannot output \(P(K)\) on the input \(\bar{T}(P(x))\) , by our assumption on B, and \(\bar{T}\) being invertible. Hence, \(B^{\prime }(x) = 0\) in such a case.
To verify Equation (6), denote \(x^{\prime } = \bar{T}(P(x))\) and observe that when \(x \sim \lbrace 0,1\rbrace ^{r \times m}\) , we have \(x^{\prime } \sim \lbrace 0,1\rbrace ^{r \times m}\) independently of P. Hence, by interchanging order of summation,
where the latter inequality holds, because for any fixed \(x^{\prime }\) , \(P(K)\) attains the value of \(B(x^{\prime })\) with probability at most \(1/\binom{r}{k}\) .
To prove Equation (7), we reason about \({\mathbb {E}}_{x,y}[B^{\prime }(x) B^{\prime }(y)]\) . Observe that for any \(K^{\prime } \subseteq [r]\) with \(|K^{\prime }| = k\) , the function \(B^{\prime }_{K^{\prime }}\) defined by \(B^{\prime }_{K^{\prime }}(x) = {\mathbb {E}}_{P,\bar{T}}[\mathbb {1}\lbrace B(\bar{T}(P(x))) = P(K^{\prime })\rbrace ]\) satisfies
Notice that if \((x,y)\) has an \((m,r,t)\) -distribution, and \(\bar{T}^{\prime },\bar{T}^{\prime \prime } \sim GL_m(\mathbb {F}_2)\) are uniformly random invertible linear maps independent of all other variables, then \((\bar{T}^{\prime }(x), \bar{T}^{\prime \prime }(y))\) has an \((m,r,t)\) -distribution as well. We verify Equation (7):
where the penultimate equality holds, since P (respectively Q) commutes with \(\bar{T}^{\prime }\) (respectively, \(\bar{T}^{\prime \prime }\) ), and the ultimate equality uses Equation (8). □
3.4.3 Obfuscation Hides Everything but Aligned XORs.
We begin with the standard definition of the Fourier-Walsh expansion of functions on the discrete cube, adapted to our setting.
Definition 3.11 (Fourier Expansion).
Given \(S \subseteq [r] \times [m]\) , define \({\chi _{S}}:{\left\lbrace 0,1\right\rbrace ^{r\times m}} \rightarrow {\left\lbrace -1,1\right\rbrace }\) by \(\chi _S(x) = (-1)^{\sum _{(i, j) \in S} x_{i,j}}\) . The set \(\lbrace \chi _S\rbrace _{S \subseteq [r]\times [m]}\) is an orthonormal basis for the set of functions \(\left\lbrace f\,\middle |\, {f}:{\left\lbrace 0,1\right\rbrace ^{r\times m}} \rightarrow {\mathbb {R}}\right\rbrace\) , with respect to the standard inner product \(\langle f,g \rangle = {\mathbb {E}}_{x\sim \left\lbrace 0,1\right\rbrace ^{r\times m}}[f(x)g(x)]\) . Hence, each \({f}:{\left\lbrace 0,1\right\rbrace ^{r\times m}} \rightarrow {\mathbb {R}}\) can be decomposed to
where \(\widehat{f}(S) = \langle f,\chi _S \rangle\) , and in particular, \(\widehat{f}(\emptyset) = \mathbb {E}[f]\) .
Definition 3.12 (Cartesian Decomposition).
Given \(S \subseteq [r] \times [m]\) , we call S a Cartesian product if there exist \(U \subseteq [r]\) and \(V \subseteq [m]\) such that \(S = U \times V\) .
The Fourier expansion allows decomposing any function \({f}:{\left\lbrace 0,1\right\rbrace ^{r\times m}} \rightarrow {\mathbb {R}}\) into Cartesian and non-Cartesian parts:
Recall that the goal of the obfuscation process is to reduce the correlation between different obfuscations of the same input z (which correspond to different iterations of Algorithm 3.5 described above) to \(O_k(1) \cdot 2^{-2t}\) . In this respect, the lemma asserts that the obfuscation hides the non-Cartesian part, which corresponds to everything except for aligned XORs (that is, expressions of the form \(\bigoplus _{i \in I} \bigoplus _{j \in J} x_{i,j}\) ).
Proof.
Write \(f = \sum _{S} \widehat{f}(S) \chi _S\) . We have
where the last step uses the inequality \(\widehat{f}(S) \widehat{f}(S^{\prime }) \le (\widehat{f}(S)^2+\widehat{f}(S^{\prime })^2)/2\) , applied for all \(S,S^{\prime }\) .
In order to analyze \({\mathbb {E}}\big [ \chi _S(x) \chi _{S^{\prime }}(y) \big ]\) , let us recall how \((x,y)\) is distributed according to Definition 3.7. We draw a uniformly random \(z\sim \mathbb {F}_2^{r\times (m+t)}\) and two uniformly random rank-m linear maps \({T_1, T_2}:{\mathbb {F}_2^{m+t}} \rightarrow {\mathbb {F}_2^m}\) and define \((x, y) = (T_1(z), T_2(z))\) .
Observe that there exist linear maps \(T^{\ast }_1, T^{\ast }_2: (\mathbb {F}_2^{m})^{\ast } \rightarrow (\mathbb {F}_2^{m+t})^{\ast }\) such that for each \(S=(S_1,\ldots ,S_r) \subseteq [r] \times [m]\) , we have
where the \(S_i\) ’s are regarded as elements of \((\mathbb {F}_2^{m})^{\ast } \cong \mathbb {F}_2^{m}\) .
Formally, consider the dual linear maps \(T^{\ast }_1, T^{\ast }_2: (\mathbb {F}_2^{m})^{\ast } \rightarrow (\mathbb {F}_2^{m+t})^{\ast }\) , defined by
where \({f}:{\mathbb {F}_2^m} \rightarrow {\mathbb {F}_2}\) is a linear functional, and \(a \in \mathbb {F}_2^{m+t}\) is a vector. (Matrix-wise, the representing matrix of \(T^{\ast }_l\) according to the (dual) standard basis is the transpose of the representing matrix of \(T_l\) in the standard basis.) Note that each \(S \subseteq [r] \times [m]\) naturally corresponds to an r-tuple of linear functionals \((S_1, \ldots , S_r)\) , where \(S_i(b)=\bigoplus _{j=1}^{m} (b_j \cdot \mathbb {1}\lbrace (i,j) \in S\rbrace)\) for any \(b \in \mathbb {F}_2^m\) . Thus, we may slightly abuse notation and write \(S=(S_1,\ldots ,S_r)\) and, subsequently, define \(T^{\ast }_l(S) = (T^{\ast }_l(S_1), \ldots , T^{\ast }_l(S_r))\) and regard its outputs as elements of \([r] \times [m+t]\) .
Since for each \(S=(S_1,\ldots ,S_r)\) , we have \(\chi _S(x)=\chi _S(T_1(x))=\chi _{T^{\ast }_1 S}(z)\) and \(\chi _{S^{\prime }}(y)=\chi _{T^{\ast }_2 S^{\prime }}(z)\) as was written above, and since \({\mathbb {E}}[\chi _{A}(z) \chi _{B}(z)] = \mathbb {1}\lbrace A=B\rbrace\) , we can write Equation (9) as
To see that \(\Pr [T_1^{\ast }(S) \in \mathrm{Im}(T_2^{\ast })] \le 2^{-t}\) for all \(S \ne \emptyset\) , choose a nonempty row \(S_i\) in S, and observe that the probability \(\Pr [T_1^{\ast }(S_i) \in \mathrm{Im}(T_2^{\ast })]\) is the same as the probability that a specific non-zero vector in \(\mathbb {F}_2^{m+t}\) is inside a random subspace of \(\mathbb {F}_2^{m+t}\) of dimension m. This probability is \(\frac{2^m-1}{2^{m+t}-1} \le 2^{-t}\) .
We furthermore claim that \(\Pr [T_1^{\ast }(S) \in \mathrm{Im}(T_2^{\ast })] \le 2^{-2t}\) whenever S is not a Cartesian product. Indeed, if we choose two different nonempty “rows” \(S_i\) , \(S_j\) of S (which is possible, as S is not a Cartesian product), then the probability \(\Pr [T_1^{\ast }(S) \in \mathrm{Im}(T_2^{\ast })]\) is upper bounded by the probability that both \(T_1^{\ast }(S_i) \in \mathrm{Im}(T_2^{\ast })\) and \(T_1^{\ast }(S_j) \in \mathrm{Im}(T_2^{\ast })\) . Since \(T_1^{\ast }(S_i)\) , \(T_1^{\ast }(S_j)\) are distinct, the aforementioned probability is \(\frac{2^m-1}{2^{m+t}-1} \cdot \frac{2^m-2}{2^{m+t}-2} \le 2^{-2t}\) . Overall,
Write \(f(x) = \mathbb {1}\lbrace \bigoplus _{i=1}^k x_i = 0\rbrace\) and \(B^{\prime }(x) = f(x) \cdot g(x)\) , where \(g(x)\) does not depend on \(x_1\) . This is possible, since we may restrict our attention to those x with \(\bigoplus _{i=1}^k x_i = 0\) ( \(B^{\prime }\) and f are zero elsewhere), and for such values of x, the value of \(x_1\) can be inferred from \(x_2,\ldots , x_k\) .
Consider the expansion \(B^{\prime } = \sum _{S \subseteq [r]\times [m]} \alpha _S \chi _S\) . One can easily verify that the Fourier expansion of f is
Denote the Fourier expansion of g by \(g = \sum _{V \subseteq ([r]\setminus \lbrace 1\rbrace) \times [m]} \gamma _V \chi _V\) .
Since \(B^{\prime }=f \cdot g\) , for any S, we have \(\alpha _S = \sum _{U \triangle V = S} \beta _U \gamma _V\) . We claim that for any S, this sum consists of a single term, that is, \(\alpha _S = \beta _{U_0} \gamma _{V_0}\) for some unique pair \((U_0,V_0)\) with \(S = U_0 \triangle V_0\) . To see this, assume \(U \triangle V=S\) and \(\beta _U, \gamma _V \ne 0\) . Since g does not depend on \(x_1\) , V does not contain elements of the form \((1, i)\) . Hence, given S, we may decode U as \(U = [k] \times U^{\prime }\) , where \(U^{\prime } = \lbrace i: (1,i) \in S\rbrace\) (recall U is Cartesian, as otherwise \(\beta _U=0\) ). Since we unambiguously determine U, we uniquely determine \(V = S \triangle U\) .
Let us now compute \(\left\Vert {(B^{\prime })^C}\right\Vert _2^2 = \sum _{S\text{ Cartesian}} \alpha _S ^ 2\) . Write each \(\alpha _S\) as \(\beta _U \gamma _V\) . We split the total contribution of the terms \(\alpha _S^2 = (\beta _U \gamma _V)^2\) to \(\sum \alpha _S^2\) into two cases, depending on V.
To see this, fix a value \(x_2^0,x_3^0,\ldots ,x_r^0\) and let \(x_1^0\) be such that \(\bigoplus _{i=1}^k x_i^0 = 0_m\) . Since g does not depend on \(x_1\) , then for any \(x_1\) , we have
However, \(B^{\prime }(x_1,x_2^0,\ldots ,x_r^0)=0\) for any \(x_1 \ne x_1^0\) (as \(B^{\prime }(x)=0\) for every x s.t. \(\bigoplus _{i=1}^k x_i \ne 0_m\) ). Hence, each value x with \(B^{\prime }(x) \ne 0\) corresponds to exactly \(2^m\) values \(x^{\prime }\) s.t. \(g(x^{\prime })=B(x)\) , obtained from x by changing only the first coordinate. Consequently, \({\mathbb {E}}[g]=2^m \mu\) .
Thus, the total contribution of terms with \(V=\emptyset\) is at most
using the fact that \(\sum _U \beta _U^2 = {\mathbb {E}}[f^2] = {\mathbb {E}}[f] = 2^{-m}\) by Parseval’s identity.
Case 2: \(V \ne \emptyset\) . We claim that in this case, for any V, there are at most two U’s for which \(V \triangle U\) is Cartesian. Indeed, let \(i \in [r]\) be such that \(V_i \mathrel {\mathop :}=V \cap (\lbrace i\rbrace \times [m]) \ne \emptyset\) . Note that \(V \cap (\lbrace 1\rbrace \times [m]) = \emptyset\) . Hence, if \(U = ([k] \times U^{\prime }) \ne \emptyset\) , then \((V \triangle U) \cap (\lbrace 1\rbrace \times [m]) = U^{\prime }\) . However,
\begin{equation*} (V \triangle U) \cap (\lbrace i\rbrace \times [m]) = {\left\lbrace \begin{array}{ll} V_i \triangle U^{\prime }, &\qquad i \le k, \\ V_i, &\qquad i\gt k. \end{array}\right.} \end{equation*}
As \(V \triangle U\) is Cartesian, we have \((V \triangle U) \cap (\lbrace i\rbrace \times [m]) = (V \triangle U) \cap (\lbrace 1\rbrace \times [m]) = U^{\prime }\) . As \(V_i \ne \emptyset\) , this is possible only if \(i\gt k\) and \(V_i=U^{\prime }\) , that is, \(U=[k] \times V_i\) . In addition, \(U=\emptyset\) is possible if V is Cartesian.
Thus, the total contribution of terms \(\alpha _S^2 = (\beta _U \gamma _V)^2\) with \(V \ne \emptyset\) , is at most (recall \(|\beta _U| \le 2^{-m}\) )
In this section, we prove Theorem 1.5. The precise formulation of the theorem is as follows:
Theorem 4.1 (Sparse to Densek-SUM Reduction)
Let \(M,N\) be integers such that \(\sqrt {N} \le M \le N\) . Assume there is an algorithm for \((k,M, N^{1/k})\) -SUM with success probability \(\beta\) and expected running time \(\mathcal {T}\) . Then, there is an algorithm for \((k, N, N^{1/k})\) -SUM with success probability at least \(\frac{\beta ^{4}}{(\log M)^2 \cdot k^{O(k)}}\) and expected running time at most \(N/M \cdot (\mathcal {T}+ \tilde{O}_k(N^{1/k}))\) .
The proof is based on the modular k-SUM problem, which we call k-MSUM.
Definition 4.2 (Average-case k-MSUM Problem)
In the \((k,N,r)\) -MSUM problem, the input consists of r elements \(z_1,\ldots ,z_r\) , each chosen independently and uniformly at random from \(\mathbb {Z}_{N}\) . The goal is to find a k-tuple \(K = \lbrace i_1,\ldots ,i_k\rbrace\) , such that \(\sum _{j \in K} z_j \bmod N = 0\) .
Informally, the proof consists of three stages.
(1)
Reduction to k-MSUM. In Section 4.1, we show that for obtaining the reduction from the \((k,N,N^{1/k})\) -SUM problem to the \((k,M,N^{1/k})\) -SUM problem (i.e., proving Theorem 4.1), it is sufficient to devise a reduction from \((k,pq,r=(pq)^{1/k})\) -MSUM to \((k,p,r)\) -MSUM for a pair of primes \(p,q\) that satisfy \(pq \approx N\) and \(p \approx M\) .
(2)
Obfuscation process. In Section 4.2, we introduce an obfuscation process that transforms r-tuples of vectors in \(\mathbb {Z}_{pq}\) to r-tuples of vectors in \(\mathbb {Z}_p\) , similarly to the reduction for the k-XOR problem presented in Section 3. Specifically, we show that it is sufficient to prove an obfuscation lemma, which asserts that the outputs of the \((k,p,r)\) -MSUM oracle are sufficiently independent when it is applied to the “obfuscated” inputs.
(3)
Proof of the obfuscation lemma. In Section 4.3, we prove the obfuscation lemma by employing techniques from discrete Fourier analysis and combinatorics. It is the most involved part of the proof of the main theorem.
4.1 Reduction to Modular k-SUM and Proof of Theorem 4.1
The main ingredient in the proof of Theorem 4.1 is the following lemma, which provides reduction from k-MSUM modulo pq to k-MSUM modulo p for prime numbers \(p,q\) with \(p \gt q\) :
Lemma 4.3 (Maink-MSUM Reduction)
Let \(p,q,r\) be positive integers such that \(p \gt q\) are prime numbers and \(pq \le \binom{r}{k}\) . Assume there is an algorithm for \((k,p,r)\) -MSUM with success probability \(\beta\) and expected running time \(\mathcal {T}\) .
Then, there is an algorithm for \((k, pq, r)\) -MSUM with success probability
and expected running time at most \(q \cdot (\mathcal {T}+ \tilde{O}(r))\) .
In this subsection, we prove that Lemma 4.3 implies Theorem 4.1. The (more complex) proof of Lemma 4.3 spans the following subsections.
The derivation of Theorem 4.1 from Lemma 4.3 relies on two additional reductions.
Lemma 4.4 (Simple Reduction).
Let \(r,r^{\prime }\) be positive integers such that \(r \ge r^{\prime }\) . Assume there is an algorithm for \((k,N, r)\) -SUM (respectively, MSUM) with success probability \(\beta\) and expected running time \(\mathcal {T}\) . Then, there is an algorithm for \((k, N, r^{\prime })\) -SUM (respectively, MSUM) with success probability at least \(\frac{\beta }{(2r/r^{\prime })^k}\) and expected running time at most \(\mathcal {T} + \tilde{O}_k(r)\) .
The proof of this lemma is essentially the same as the proof of the analogous Lemma 3.3 for k-XOR, and we omit it.
Lemma 4.5. (k-SUM to k-MSUM Reduction)
Let \(M,N\) be positive integers such that \(M \le 2N+1\) . Assume there is an algorithm for \((k,M,r)\) -MSUM with success probability \(\beta\) and expected running time \(\mathcal {T}\) . Then, there is an algorithm for \((k,N,r)\) -SUM with success probability \(\Omega (\frac{\beta }{k(8N \cdot k/M)^k})\) and expected running time at most \(\mathcal {T} + \tilde{O}_k(r)\) .
Proof.
Denote \(r^{\prime } = \lceil r \cdot M/4N \rceil\) . Given an algorithm for \((k,M,r)\) -MSUM with success probability \(\beta\) and running time \(\mathcal {T}\) , by Lemma 4.4, there is an algorithm B for \((k,M,r^{\prime })\) -MSUM with success probability at least \(\frac{\beta }{(8N/M)^k}\) and expected running time at most \(\mathcal {T} + \tilde{O}_k(r)\) . We use B to devise an algorithm A for \((k,N,r)\) -SUM.
We first assume that M is odd. On input that consists of r integers \(z_1,\ldots ,z_r\) uniform in \(\lbrace -N,\ldots ,N\rbrace\) , A performs the following steps:
(1)
Discard all \(z_i\) such that \(z_i \notin \lbrace -(M-1)/2, \ldots ,(M-1)/2\rbrace\) . Denote the number of remaining elements by \(r_1\) . If \(r_1 \lt r^{\prime }\) , then return failure. Otherwise, take the first \(r^{\prime }\) remaining elements and denote them by \(u_1,\ldots ,u_{r^{\prime }}\) .
(2)
Define the mapping \(u_i \mapsto y_i\) (onto \(\mathbb {Z}_{M}\) ) by \(y_i = u_i \bmod M\) . Note that \(y_1,\ldots ,y_{r^{\prime }}\) is a \((k,M,r^{\prime })\) -MSUM instance.
(3)
Pick k elements \(v^{\prime }_1,\ldots ,v^{\prime }_k\) in \(\mathbb {Z}_M\) uniformly at random, conditioned on \(\sum _{j \in [k]} v^{\prime }_j \bmod M = 0\) . Then, for each \(i \in [r^{\prime }]\) , pick \(j \in [k]\) uniformly at random and define \(v_i = v^{\prime }_j\) and \(x_i = y_i + v_i \bmod M\) .
(4)
Run B on the input \(x_1,\ldots ,x_{r^{\prime }}\) and assume it returns a k-tuple \(K^{\prime }\) such that \(\sum _{i \in K^{\prime }} x_{i} \bmod M = 0\) . Trace \(K^{\prime }\) back to the corresponding k-tuple K for \(z_1,\ldots ,z_r\) and if \(\sum _{i \in K} z_{i} = 0\) , return K. Otherwise, return failure.
Note that we do not run B directly on \(y_1,\ldots ,y_{r^{\prime }}\) , since it may be malicious and return k-tuples that sum to 0 modulo M, but never give a k-SUM over the integers for \(z_1,\ldots ,z_r\) .
Analysis. Clearly, the algorithm returns a correct output if it succeeds and its complexity is as claimed. To analyze the success probability, we consider the following events:
(1)
\(r_1 \ge r^{\prime }\) .
(2)
B returns a k-tuple \(K^{\prime }\) such that \(\sum _{i \in K^{\prime }} x_{i} \bmod M = 0\) .
(3)
\(\lbrace v_i\rbrace _{i \in K^{\prime }} = \lbrace v^{\prime }_j\rbrace _{j \in [k]}\) (as possible multi-sets). Note that this implies \(\sum _{i \in K^{\prime }} v_{i} \bmod M = \sum _{j \in [k]} v^{\prime }_j \bmod M = 0\) and therefore,
Observe that if the fourth event occurs, then \(\sum _{i \in K} z_{i} = \sum _{i \in K^{\prime }} u_{i} = 0\) and A succeeds. In the following, we lower bound the probability of these events.
First, \({\mathbb {E}}[r_1] = r \cdot M/(2N + 1)\) and a simple tail bound gives \(\Pr [r_1 \ge r^{\prime }] \ge 1/4\) for r sufficiently large (i.e., larger than some constant value). Conditioned on the first event, the second event occurs with probability at least \(\frac{\beta }{(8N/M)^k}\) . The third event occurs with probability at least \(1/(k!) \gt k^{-k}\) . Note that, since \(v_1,\ldots ,v_{r^{\prime }}\) are picked independently of \(y_1,\ldots ,y_{r^{\prime }}\) , then the third event is independent of the second. Thus, the first three events occur with probability \(\Omega \left(\frac{\beta }{(8N \cdot k/M)^k}\right)\) .
Finally, recall that \(v^{\prime }_1,\ldots ,v^{\prime }_k\) are picked uniformly at random from \(\mathbb {Z}_M\) , conditioned on \(\sum _{j \in [k]} v^{\prime }_j \bmod M = 0\) . Thus, conditioning on \(\sum _{i \in K^{\prime }} x_{i} \bmod M = 0\) , and on the event that \(\lbrace v_i\rbrace _{i \in K^{\prime }} = \lbrace v^{\prime }_j\rbrace _{j \in [k]}\) (but not on the individual values of each \(v^{\prime }_{j}\) ), the k-tuple \(\lbrace u_{i}\rbrace _{i \in K^{\prime }}\) is uniformly distributed in \(\lbrace -(M-1)/2, \ldots ,(M-1)/2\rbrace ^k\) , conditioned on \(\sum _{i \in K^{\prime }} u_{i} \bmod M = 0\) . Given this distribution of \(\lbrace u_{i}\rbrace _{i \in K^{\prime }}\) , it remains to lower bound the probability that \(\sum _{i \in K^{\prime }} u_{i} = 0\) by \(1/k\) .
Write \(U = \sum _{i \in K^{\prime }} u_{i}\) as a sum of k uniform integers in \(\lbrace -(M-1)/2, \ldots ,(M-1)/2\rbrace\) . Note that for any t,
To see this, observe that the function \(t \mapsto \Pr [U = t]\) is log-concave, as a convolution of (discrete) log-concave functions (see for example Reference [3, Proposition 10(vii)]) and is symmetric around \(t = {\mathbb {E}}[U]\) .
Since in our case \({\mathbb {E}}[U] = 0\) , then for any t, we have \(\Pr [U = 0] \ge \Pr [U = t]\) . Hence,
\begin{align*} \Pr \left[ U=0\,\middle |\, U \bmod M = 0 \right] = & \frac{\Pr [U = 0]}{\Pr [U \bmod M = 0]} \ge \frac{\Pr [U = t]}{\Pr [U \bmod M = 0]} \\ \ge & \Pr \left[ U=t\,\middle |\, U \bmod M = 0 \right]. \end{align*}
As \(U \in \lbrace -k(M-1)/2, \ldots ,k(M-1)/2\rbrace\) , given that \(U \bmod M = 0\) , U can only attain k possible values, implying that \(\Pr \left[ U=0\,\middle |\, U \bmod M = 0 \right] \ge 1/k\) .
Finally, if M is even, then we change the algorithm to remove \(z_i \notin \lbrace -M/2, \ldots ,M/2 - 1\rbrace\) . The analysis is similar, but we have \({\mathbb {E}}[U] = -k/2\) . Nevertheless, the final result is unchanged, since \(\Pr [U = 0] \ge \Pr [U = t]\) for every t such that \(t \bmod M = 0\) (assuming M is larger than k; we indeed may assume \(M \ge k\) , as otherwise \((k,N,r)\) -SUM can be solved with the poor probability \(1/N^k\) by searching for k zeros in the input). □
Let \(M,N\) be such that \(\sqrt {N} \le M \le N\) . Our goal is to devise an algorithm for \((k, N, N^{1/k})\) -SUM, given an algorithm B for \((k, M, N^{1/k})\) -SUM with success probability \(\beta\) and expected running time \(\mathcal {T}\) .
Clearly, B can be applied to solve \((k,M,N^{1/k} \cdot 2k)\) -SUM with the same success probability and complexity.
Let p be a prime number that satisfies \(M \le p \lt 2M\) .3 By Lemma 4.4, based on B, there is an algorithm \(B_1\) for \((k,(p-1)/2,N^{1/k} \cdot 2k)\) -SUM with success probability at least \(\beta _1 = \frac{\beta }{k^{O(k)}}\) and expected running time at most \(\mathcal {T} + \tilde{O}_k(N^{1/k})\) . \(B_1\) immediately gives an algorithm for \((k,p,N^{1/k} \cdot 2k)\) -MSUM with the same parameters (as a K-tuple that sums to 0 over the integers sums to zero \(\bmod\) p).
Let q be a prime number such that \(N/2p \le q \lt N/p\) . Note that we have
\begin{equation*} pq \lt N \lt \binom{N^{1/k} \cdot 2k}{k} \lt N \cdot k^k \qquad \mbox{and} \qquad q \lt N/p \le N/M \le M \le p. \end{equation*}
Hence, we can apply Lemma 4.3 based on \(B_1\) to deduce that there is an algorithm \(B_2\) for \((k,pq,N^{1/k} \cdot 2k)\) -MSUM with success probability at least
and expected running time at most \(q \cdot (\mathcal {T}+ \tilde{O}_k(N^{1/k})) \le N/M \cdot (\mathcal {T}+ \tilde{O}_k(N^{1/k}))\) .
Noting that \(N/2 \le pq \le N\) , we invoke Lemma 4.5 based on \(B_2\) and conclude that there is an algorithm \(B_3\) for \((k,N,N^{1/k} \cdot 2k)\) -SUM with success probability at least \(\beta _3 = \frac{\beta _2}{k^{O(k)}} = \frac{\beta ^{4}}{(\log M)^2 \cdot k^{O(k)}}\) and expected running time at most \(N/M \cdot (\mathcal {T}+ \tilde{O}_k(N^{1/k}))\) .
Finally, we apply Lemma 4.4 based on \(B_3\) and deduce that there is an algorithm for \((k,N,N^{1/k})\) -SUM with success probability at least \(\frac{\beta _3}{k^{O(k)}} = \frac{\beta ^{4}}{(\log M)^2 \cdot k^{O(k)}}\) and expected running time at most \(N/M \cdot (\mathcal {T}+ \tilde{O}_k(N^{1/k}))\) . □
4.2 The Obfuscation Process
Our goal in the rest of this section is to prove Lemma 4.3. The proof strategy is similar to the proof of Lemma 3.2 in the k-XOR case presented in Section 3. Namely, we devise an algorithm that receives r vectors in \(\mathbb {Z}_{pq}\) , denoted by \(z_1,\ldots ,z_r\) , and randomly obfuscates them, returning r vectors in \(\mathbb {Z}_p\) , denoted by \(y_1,\ldots ,y_r\) . The main properties of the obfuscation are that a solution to the k-MSUM y-problem gives rise to a solution of the k-MSUM z-problem with a good probability (i.e., \(\approx 1/q\) ) and that the applications of the oracle are sufficiently independent to yield a solution of the z-problem with the desired probability.
In this subsection, we present the obfuscation algorithm, state the main obfuscation lemma, which asserts that our algorithm achieves its goals, and derive Lemma 4.3 from the obfuscation lemma. The proof of the obfuscation lemma is presented in the next subsection.
4.2.1 The Obfuscation Algorithm and the Obfuscation Lemma.
Let \(p,q,r\) be positive integers such that \(p,q\) are prime numbers, \(p \ge q\) , and \(pq \le \binom{r}{k}\) . Let B be an algorithm for \((k,p,r)\) -MSUM. Let L be a parameter to be specified below. We define the algorithm A for \((k,pq,r)\) -MSUM, which receives as an input an r-tuple \((z_1,\ldots ,z_r) \in \mathbb {Z}_{pq}^r\) of elements in \(\mathbb {Z}_{pq}\) , as follows:
Algorithm 4.6.
\(\phantom{}\)
(1)
RepeatL times:
(2)
Draw uniformly random invertible \(\alpha \sim \mathbb {Z}_{p\cdot q}^\ast\) and \(\gamma \sim \mathbb {Z}_p^\ast\) and a uniformly random permutation \(P \in S_r\) .
(3)
Let \(y_{i} = \gamma \cdot \lfloor (\alpha \cdot z_{P(i)} \,\%\,pq) / q \rceil \,\%\,p\) for all \(i \in [r]\) .
(4)
FeedB with \((y_1, \ldots , y_r)\) . In case it outputs a k-tuple K with \(\sum _{i \in K} y_i \% p = 0\) , test whether \(\mathcal {K}=\) \(P(K)\) satisfies \(\sum _{i \in \mathcal {K}} z_{i} \% pq = 0\) , and if it does—output the k-tuple \(\mathcal {K}\) . Otherwise, continue.
The obfuscation lemma in the arithmetic case is as follows:
Lemma 4.7.
Let \(p,q,r\) be positive integers such that \(p \ge q\) are prime numbers and \(pq \le \binom{r}{k}\) .
Let \((z_1,\ldots ,z_r) \in \mathbb {Z}_{pq}^r\) be chosen uniformly at random. Let the r-tuples \((y_1^{(1)},\ldots , y_r^{(1)}) \in \mathbb {Z}_{p}^r\) and \((y_1^{(2)},\ldots ,y_r^{(2)}) \in \mathbb {Z}_{p}^r\) be obtained from it by the procedure described above (in two out of the L iterations). Let \(\mathcal {K}_1, \mathcal {K}_2\) be the two corresponding \(\mathcal {K}\) ’s obtained in the process. Then,
where the probability is taken over \(z,y^{(1)}, y^{(2)}\) , and B’s randomness.
Note that cases where at least one of \(\mathcal {K}_1,\mathcal {K}_2\) is not obtained (that is, when in at least one of the two iterations, Algorithm B fails to find a solution to the \((k,p,r)\) -MSUM problem) are not counted as equality between \(\mathcal {K}_1\) and \(\mathcal {K}_2\) .
4.2.2 Proof of the Main Reduction Lemma.
We now deduce Lemma 4.3 from the obfuscation lemma (Lemma 4.7).
Proof of Lemma 4.3.
As in the corresponding proof of Lemma 3.2 for k-XOR, we analyze a tweaked version of the algorithm (with the same success probability) in which all L iterations are performed. For any \(1 \le l \le L\) , let \(\mathcal {K}_l\) be the \(\mathcal {K}\) obtained in the l’s iteration ( \(\mathcal {K}_l\) exists only when B succeeds, i.e., with probability \(\beta\) ). Denote by \(S_l\) the event that \(\mathcal {K}_l\) admits a solution to the \((k, pq, r)\) -MSUM problem. We claim that for all \(l=1,\ldots ,L\) ,
Indeed, \(S_l\) occurs if the B oracle succeeds, and in addition, \(\sum _{i \in \mathcal {K}} z_i \,\%\,pq = 0\) holds, given that \(\sum _{i \in K} y_i \,\%\,p = 0\) .
The probability of the first event is \(\beta\) , as \(y_1, \ldots , y_r\) are uniformly and independently distributed in \(\mathbb {Z}_{p}\) . (Indeed, conditioning on the variables \(\alpha , P\) (but not on \(z_{P(i)}\) ), the variables \(\widetilde{y}_i = \lfloor (\alpha \cdot z_{P(i)} \,\%\,pq) / q \rceil \,\%\,p\) are uniformly and independently distributed in \(\mathbb {Z}_{p}\) , and so are \(y_i=\gamma \cdot \widetilde{y}_i\) .)
To see that the probability of the second event is \(\Omega (1/(\sqrt {k} q))\) , notice that \(\alpha z_{P(i)} \,\%\,pq = (q\gamma ^{-1} y_i + \sigma _i) \,\%\,pq\) , with \(\sigma _i \in \lbrace (1-q)/2, \ldots , (q-1)/2\rbrace\) . Conditioning on \(\alpha , \gamma , P, y_i\) (and not on \(z_{P(i)}\) ), \(\sigma _i\) is uniformly distributed in this set. Observe that given \(\sum _{i \in K} y_{i} \,\%\,p = 0\) , the event \(\sum _{i \in K} \alpha z_{P(i)} \,\%\,pq = 0\) is equivalent to \(\sum _{i \in K} \sigma _i \,\%\,pq = 0\) . The probability of this latter event is \(\Omega (1/(\sqrt {k} q))\) , for example by Equation (10) and Chebyshev’s inequality with the standard deviation of \(\sum _{i \in K} \sigma _i\) equal to \(\Theta (\sqrt {k} q)\) .
Similarly to the proof of Lemma 3.2 in Section 3.3, it is easy to verify that (tweaked) Algorithm 4.6 succeeds to solve the \((k, pq, r)\) -MSUM problem with probability at least
In this section, we prove Lemma 4.7. We start by introducing a distribution that models two independent outputs of the obfuscation process, and restate the obfuscation lemma.
Definition 4.8.
Let \(p, q\) be prime numbers. We say that a pair of random variables \((x^{(1)},x^{(2)})\) , each taking values in \(\mathbb {Z}_{p}^r\) , has a \((p,q,r)\) -arithmetic-distribution, if there exist random variables \(z,\, \alpha ^{(j)},\, \gamma ^{(j)}\) , \(j=1,2\) , with:
(1)
\(z,\, \alpha ^{(1)},\, \alpha ^{(2)},\, \gamma ^{(1)},\, \gamma ^{(2)}\) are independent random variables.
(2)
\(z\sim \mathbb {Z}_{p\cdot q}^r\) is uniformly distributed.
(3)
\(\alpha ^{(j)} \sim \mathbb {Z}_{p\cdot q}^{\ast }\) is a uniformly random invertible element of \(\mathbb {Z}_{p\cdot q}\) .
(4)
\(\gamma ^{(j)} \sim \mathbb {Z}_{p}^{\ast }\) is a uniformly random nonzero residue modulo p.
Let B be an algorithm that receives as input a list of r integers in \(\mathbb {Z}_{p}\) and outputs the indices of \(k\gt 0\) numbers among them whose SUM is 0 (modulo p). If \((x,y)\) has a \((p,q,r)\) -arithmetic-distribution with \(p \ge q\) , and \(P,Q\sim S_r\) are two uniformly random and independent permutations, then
where the probability is taken over B’s randomness, \(x,y\) and \(P,Q\) (the event on the left-hand side is contained in the event that both executions \(B(P(x))\) , \(B(Q(y))\) succeed).
Notice that Lemma 4.7 immediately follows from Lemma 4.9 (compare Equation (11) with Equation (12)).
4.3.1 Proof Outline.
The proof of Lemma 4.9 uses techniques from discrete Fourier analysis and combinatorial techniques. Technically, the proof is more complicated than for k-XOR, since the k-SUM analog of Lemma 3.14 does not hold. Instead, it is replaced by the sequence of Lemmas 4.16–4.21. The proof consists of three steps presented in the order of appearance in the article.
(1)
Transformation to real-valued functions. Similarly to the k-XOR obfuscation, we show that instead of analyzing the obfuscation on a tuple-valued function, it is sufficient to analyze its action on the simpler class of real-valued functions. We utilize the fact that our obfuscation randomly permutes the input vectors, so any oracle \(B:\mathbb {Z}_{p}^r \rightarrow {\binom{[r]}{k}}\) must, informally, treat all candidate output k-tuples in the same way. Hence, it suffices to analyze the modified, real-valued oracle \(B^{\prime }:\mathbb {Z}_{p}^r \rightarrow [0,1]\) , which essentially indicates the probability that B outputs the specific k-tuple \(K \mathrel {\mathop :}=\lbrace 1,\ldots ,k\rbrace\) when applied on its input. Specifically, our task is reduced to showing that
It turns out that the correlation between two obfuscations (which appear in different iterations of Algorithm A described above) is a weighted sum of the squared Fourier coefficients \(\widehat{B}^{\prime }(S)^2\) :
where \(M_{p,q,r}(S)\) roughly serve as the “weight” for \(\widehat{B}^{\prime }(S)^2\) and are defined as \(M_{p,q,r}(S) = {\mathbb {E}}[\chi _S(x) \overline{\chi _S(y)}]\) .
(3)
Bounding the correlation using discrete Fourier analysis. We bound the correlation, the right-hand side of Equation (14), in two steps:
(a)
Partitioning into 2-dimensional subspaces. We use the structure of solutions to the k-SUM problem to show that it is sufficient to bound \(\sum _{S \in U} M_{p,q,r}(S)\) over two-dimensional subspaces \(U = \lbrace a S_1 + b S_2:a,b \in \mathbb {Z}_{p}\rbrace \subseteq \mathbb {Z}_p^r\) of a certain kind.
(b)
Bounding \(\sum _S M_{p,q,r}(S)\) over 2-dimensional subspaces. We bound \(\sum _{S \in U} M_{p,q,r}(S)\) over two-dimensional subspaces U using a combinatorial approach. Specifically, we represent this sum as the bias introduced in an event, caused by the dependence between \(x,y\) . We show that this bias is related to a Littlewood-Offord-type problem [26]. Specifically, in Lemma 4.18, we relate \(M_{p,q,r}(S)\) to the probability \(\Pr [\langle S, u\rangle = 0]\) for a random vector \(u \in \mathbb {Z}_p^r\) . This probability concerns the event where the sum of random variables \(\langle S, u\rangle = \sum _i S_i u_i\) equals 0. Bounding this type of probability is common in Littlewood-Offord theory. To this end, we use a classical antichain argument (see Reference [17]) along with simple number theoretic estimates.
4.3.2 Transformation to Real-valued Functions.
Lemma 4.10.
Let \({B}:{\mathbb {Z}_p^{r}} \rightarrow {\binom{[r]}{k}}\) be an algorithm that outputs either a k-tuple R with \(\sum _{i \in R} x_i \% p = 0\) or a failure message. Let \(K \mathrel {\mathop :}=\lbrace 1,\ldots , k\rbrace\) and define \({B^{\prime }}:{\mathbb {Z}_p^{r}} \rightarrow {[0,1]}\) by
where \(P \sim S_r\) is a uniformly random permutation, and \(\gamma \sim \mathbb {Z}_{p}^*\) is a uniformly random invertible element of \(\mathbb {Z}_p\) . Then,
We note that the probability in Equation (15) is also taken over B’s randomness. The proof of the lemma is similar to the proof of Lemma 3.9.
Proof.
To show Equation (16) note that if \(\sum _{i \in K} x_i \ne 0,\) then B cannot output \(P(K)\) on the input \(P(\gamma \cdot x)\) , by our assumption on B, and \(\gamma\) being invertible. Hence, \(B^{\prime }(x) = 0\) in such a case.
To verify Equation (17), denote \(x^{\prime } = P(\gamma \cdot x)\) and observe that when \(x \sim \mathbb {Z}_{p}^r\) , we have \(x^{\prime } \sim \mathbb {Z}_{p}^r\) independently of P. Hence, by interchanging order of summation,
where the latter inequality holds, because for any fixed \(x^{\prime }\) , \(P(K)\) attains the value of \(B(x^{\prime })\) with probability at most \(1/\binom{r}{k}\) .
To prove Equation (18), we reason about \({\mathbb {E}}_{x,y}[B^{\prime }(x) B^{\prime }(y)]\) . Observe that for any \(K^{\prime } \subseteq [r]\) with \(|K^{\prime }| = k\) , the function \(B^{\prime }_{K^{\prime }}\) defined by \(B^{\prime }_{K^{\prime }}(x) = {\mathbb {E}}_{P,\gamma }[\mathbb {1}\lbrace B(P(\gamma \cdot x)) = P(K^{\prime })\rbrace ]\) satisfies
Notice that if \((x,y)\) has a \((p,q,r)\) -arithmetic distribution, and \(\gamma ^{\prime },\gamma ^{\prime \prime } \sim \mathbb {Z}_{p}^*\) are uniformly random invertible elements of \(\mathbb {Z}_p\) independent of all other variables, then \((\gamma ^{\prime } \cdot x, \gamma ^{\prime \prime } \cdot y)\) has a \((p,q,r)\) -arithmetic distribution as well. We verify Equation (18):
Due to the structure of the k-SUM problem, the function \(B^{\prime }\) has several properties that will be crucially used in the sequel. Before stating these properties, let us introduce Fourier expansion over \(\mathbb {Z}_p\) .
Definition 4.11 (Fourier Expansion).
Given \(S \in \mathbb {Z}_{p}^r\) , define \({\chi _{S}}:{\mathbb {Z}_{p}^r} \rightarrow {\mathbb {C}}\) by \(\chi _S(x) = e_p(\langle S, x\rangle)\) , where
\begin{equation*} e_p(a) \mathrel {\mathop :}=\exp \left(\frac{2\pi i a}{p}\right). \end{equation*}
The set \(\lbrace \chi _S\rbrace _{S \in \mathbb {Z}_{p}^r}\) is an orthonormal basis for the set of functions \(\left\lbrace f\,\middle |\, {f}:{\mathbb {Z}_{p}^r} \rightarrow {\mathbb {C}}\right\rbrace\) with respect to the standard inner product \(\langle f,g \rangle = {\mathbb {E}}_{x\sim \mathbb {Z}_{p}^r}[f(x) \overline{g(x)}]\) . Hence, each \({f}:{\mathbb {Z}_{p}^r} \rightarrow {\mathbb {C}}\) can uniquely be decomposed as
Let \(B^{\prime }\) be defined as in Lemma 4.10. Then:
(1)
For any \(x \in \mathbb {Z}_p^r\) and any \(\gamma \in \mathbb {Z}_p^*\) , we have \(B^{\prime }(x)=B^{\prime }(\gamma \cdot x)\) .
(2)
\(B^{\prime }\) can be written in the form \(B^{\prime }(x)=I_k(x) \cdot g(x)\) , where \(I_k(x)=\mathbb {1}\lbrace \sum _{i=1}^k x_i = 0\rbrace\) .
(3)
Let \(S^{\prime } \in \mathbb {Z}_p^r\) be defined by \(S^{\prime }_j =\mathbb {1}\lbrace j \in [k]\rbrace\) . For any \(S \in \mathbb {Z}_p^r\) , we have \(\widehat{B^{\prime }}(S) = \widehat{B^{\prime }}(S+S^{\prime })\) .
Proof.
The first assertion holds trivially by the definition of \(B^{\prime }\) . The second holds, since \(B(x) = 0\) whenever \(I_k(x) = 0\) , with \(I_k(x) = \mathbb {1}\lbrace \sum _{i=1}^{k} x_i = 0 \rbrace\) . Finally, the third holds as the Fourier expansion of \(I_k\) is given by \(I_k = \frac{1}{p}\sum _{\nu \in \mathbb {Z}_p} \chi _{\nu \cdot S^{\prime }}\) with \(S^{\prime }_j = \mathbb {1}\lbrace j \in [k]\rbrace\) . □
Following Claim 4.12, we shall study and exploit properties of functions \(f:\mathbb {Z}_p^r \rightarrow [0,1]\) that satisfy \(f(\gamma x)=f(x)\) and \(\widehat{f}(S+S^{\prime }) = \widehat{f}(S)\) for \(S^{\prime }\) as defined in Claim 4.12 and all \(x,\gamma ,S\) .
4.3.3 Representing the Correlation in Terms of the Fourier Expansion.
In this subsection, we present a sequence of lemmas that shall be used in our proof. These lemmas allow us to represent the correlation between different obfuscations in terms of the Fourier expansion and will be helpful in bounding the correlation using discrete Fourier analysis in the following subsections. Note that all inner products from now on are between elements of \(\mathbb {Z}_p^r\) , and consequently, their results lie in \(\mathbb {Z}_p\) .
An alternative representation of the obfuscation. In our proof, we shall frequently use the following alternative view of the obfuscation:
Claim 4.13.
A pair \((x,y)\) taking a \((p,q,r)\) -arithmetic-distribution may be sampled by drawing \(x \sim \mathbb {Z}_p^r\) uniformly at random, choosing \(v \sim \lbrace (1-q)/2, (3-q)/2, \ldots , (q-1)/2 \rbrace ^r\) uniformly, along with \(\alpha \sim \mathbb {Z}_{p\cdot q}^{\ast }\) and \(\gamma , \gamma ^{\prime } \sim \mathbb {Z}_{p}^{\ast }\) , and setting
Assume \((x,y)\) has a \((p,q,r)\) -arithmetic distribution, that is, \(x_i = \gamma _1 \cdot \lfloor \alpha _1 \cdot z_i / q \rceil \% p\) and \(y_i = \gamma _2 \cdot \lfloor \alpha _2 \cdot z_i / q \rceil \% p\) , where \(z,\alpha _1,\alpha _2,\gamma _1,\gamma _2\) are as in Definition 4.8. Write \(\alpha _1 z_i \% (pq) = q (\gamma _1^{-1} x_i \% p) + v_i\) with \(v_i \in \lbrace (1-q)/2, \ldots , (q-1)/2 \rbrace\) . Note that, under the fixing of any (invertible) \(\gamma _1, \alpha _1\) , each pair of \((x_i, v_i) \in \mathbb {Z}_p \times \lbrace (1-q)/2, \ldots , (q-1)/2 \rbrace\) arises from exactly one \(z_i \in \mathbb {Z}_{pq}\) . Since \(z_i\) is uniformly distributed and independent of \(\gamma _i, \alpha _i\) , we see that \(x_i, v_i\) are uniformly distributed (as stated in the claim) and independent of each other and of \(\gamma _i, \alpha _i\) .
Denoting \(\gamma \mathrel {\mathop :}=(\gamma _2 \alpha _2 \alpha _1^{-1} \gamma _1^{-1} \% p)\) , \(\gamma ^{\prime } \mathrel {\mathop :}=\gamma _2\) and \(\alpha \mathrel {\mathop :}=\alpha _2 \alpha _1^{-1}\) , we have \(y_i = (\gamma x_i + \gamma ^{\prime } \lfloor \alpha v_i / q \rceil) \,\%\,p\) . Note that \(\gamma , \gamma ^{\prime }, \alpha\) have the asserted distribution and are independent of \(x, v\) . □
A quantity representing the contribution of \(\widehat{B}^{\prime }(S)\) to the correlation. We now formally introduce the notion \(M_{p,q,r}(S)\) that will play a central role in the proof. The relevance of the notion to the correlation we study is shown in Lemma 4.16 below.
Definition 4.14.
Let \(S \in \mathbb {Z}_{p}^r\) , and let \((x,y)\) be a pair that has a \((p,q,r)\) -arithmetic distribution. Define the magnitude of S as (the real number)
Let \(S, S^{\prime } \in \mathbb {Z}_{p}^r\) , and assume \((x,y)\) has a \((p,q,r)\) -arithmetic distribution. If \(S^{\prime } = \gamma ^{\prime } S\) with \(\gamma ^{\prime } \in \mathbb {Z}_p^\ast\) , then we have
To verify Equation (20), assume \(S^{\prime } = \gamma ^{\prime } S\) with \(\gamma ^{\prime } \in \mathbb {Z}_p^\ast\) . Note that by Definition 4.8, if \((x,y)\) has a \((p,q,r)\) -arithmetic-distribution, then \((x, \gamma ^{\prime -1} y)\) admits a \((p,q,r)\) -arithmetic-distribution as well. Hence,
To verify Equation (21), recall that Claim 4.13 shows that \(x \sim \mathbb {Z}_p^r\) and \(y_i = \gamma x_i + \gamma ^{\prime } u_i\) , where \(\gamma , \gamma ^{\prime } \sim \mathbb {Z}_p^\ast\) , and u is independent of x (its distribution is irrelevant for the current proof). Condition on the values of \(\gamma , \gamma ^{\prime }, u\) , so
Notice that given \(\gamma , \gamma ^{\prime },\) and u, the expression \(\langle S, x \rangle - \langle S^{\prime }, y \rangle\) is linear in x and is non-constant (for all \(\gamma , \gamma ^{\prime }, u\) ), since \(S, S^{\prime }\) are non-proportional. Hence, \({\mathbb {E}}[e_p (\langle S, x \rangle - \langle S^{\prime }, y \rangle)] = 0\) , since \(x \sim \mathbb {Z}_p^r\) , and the expected value of \(e_p(x^{\prime })\) when \(x^{\prime } \sim \mathbb {Z}_p\) is uniformly distributed is 0. □
Given two vectors \(S, S^{\prime } \in \mathbb {Z}_p^r\) and two scalars \(\alpha , \beta \in \mathbb {Z}_p\) , we denote by \(\alpha S + \beta S^{\prime } \in \mathbb {Z}_p^r\) the vector \(S^{\prime \prime }\) having for all \(i \in [r]\) ,
Representing the correlation in terms of \(M_{p,q,r}\) and the Fourier expansion. The following lemma shows how \(M_{p,q,r}\) can be used to estimate the correlation \(\text{Cov}(B^{\prime }(x), B^{\prime }(y))\) we aim at bounding, thus establishing Equation (14).
Lemma 4.16.
Let \({f}:{\mathbb {Z}_{p}^r} \rightarrow {\mathbb {C}}\) have \(f(\gamma x) = f(x)\) for all \(x \in \mathbb {Z}_{p}^r\) , and \(\gamma \in \mathbb {Z}_p^\ast\) . Suppose \((x, y)\) has a \((p,q,r)\) -arithmetic-distribution. Then
By comparing coefficients, the assumption that \(f(\gamma x) = f(x)\) (for all x) implies \(\widehat{f}(S) = \widehat{f}(\gamma S)\) . Combining with Lemma 4.15, we get
Bounding \(M_{p,q,r}(S)\) . The following two lemmas allow us to bound \(M_{p,q,r}(S)\) :
Lemma 4.17.
Suppose \((x, y)\) has a \((p,q,r)\) -arithmetic-distribution. For any \(r \in \mathbb {N}\) , any primes \(p,q \gt 0\) , and any non-zero \(S \in \mathbb {Z}_p^r\) , we have
where \((\langle S, x\rangle = 0 \text{ XOR } \langle S, y\rangle = 0)\) denotes the event that exactly one of \(\langle S,x \rangle =0\) , \(\langle S,y \rangle = 0\) holds. To verify Equation (23), note that if \((x,y)\) has a \((p,q,r)\) -arithmetic distribution, then so does \((\gamma _1 x, \gamma _2 y)\) , for any \(\gamma _1,\gamma _2 \in \mathbb {Z}_p^*\) . Hence,
Letting \(\gamma _1, \gamma _2\) be uniformly distributed in \(\mathbb {Z}_p^{\ast }\) (independently of \((x,y)\) ), one can verify that for any fixed \(x,y\) , we have
Note that \(A+B+C=1\) , and that for any \(S\ne 0\) , we have \(2A+B = 2\cdot \Pr [\langle S,x\rangle = 0] = 2/p\) , since each of \(x,y\) is uniformly distributed in \(\mathbb {Z}_p^r\) . Substituting into Equation (23) and simplifying, we obtain
Let \(r \in \mathbb {N}\) , let \(p \ge q \gt 0\) be prime numbers, and let \(S \in \mathbb {Z}_p^r\) be a nonzero vector. If \((x,y)\) has a \((p,q,r)\) -arithmetic-distribution, then
Recall the distribution of \(x,y\) given by Claim 4.13, namely, \(y_i = (\gamma x_i + \gamma ^{\prime } u_i) \,\%\,p\) with \(u_i = \lfloor \alpha v_i / q \rceil \,\%\,p\) , where \(x,v,\gamma , \gamma ^{\prime }, \alpha\) are independent random variables. By the independence of \(x, u\) , we get
\begin{equation} \Pr _{x,y}[\langle S, x \rangle = \langle S, y \rangle = 0] = \Pr _{x}[\langle S, x \rangle = 0] \Pr _{u}[\langle S, u \rangle = 0]. \end{equation}
(26)
Since x is uniformly random and S is nonzero, \(\Pr _{x}[\langle S, x \rangle = 0] = 1/p\) . It thus remains to show
To prove Equation (27), we note that it is a Littlewood-Offord-type statement: The entries \(u_i\) are independent random variables, and \(\langle S, u \rangle\) is their weighted sum, and we are concerned with the probability it attains a specific value.
We tackle the problem by using a standard antichain argument. Roughly, choose an i with \(S_i \ne 0\) , and condition on the values of \(u_j\) for all \(j \ne i\) . Then, there is at most one value of \(u_i\) that would make \(\langle S, u \rangle = S_i u_i + \sum _{j: j \ne i} S_j u_j \,\%\,p = 0\) . Recall \(u_i = \lfloor \alpha v_i / q \rceil \,\%\,p\) , where \(v_i\) is uniformly distributed in \(\lbrace (1-q)/2, \ldots , (q-1)/2 \rbrace\) . Hence, assuming that the map \(v_i \mapsto u_i\) is injective, we have that \(\langle S, u \rangle = 0\) with probability \(\le 1/q\) , as required. This last assumption is not strictly correct, however, it can be corrected as follows:
Depending on \(\alpha\) and on \(\lbrace u_j:j \ne i\rbrace\) , we let \(Z = \lbrace \tau \in \lbrace (1-q)/2, \ldots , (q-1)/2 \rbrace :(S_i \lfloor \alpha \tau / q \rceil + \sum _{j: j \ne i} S_j u_j) \,\%\,p = 0 \rbrace\) , and note that according to the above discussion, \(\Pr [\langle S,u \rangle = 0] = {\mathbb {E}}[|Z|]/q\) . Hence, Equation (27) is reduced to showing that \({\mathbb {E}}[|Z|] \le O(1 + q/p)\) . Write \(Z = \lbrace \tau _1, \ldots , \tau _k\rbrace\) with \(\tau _1 \lt \ldots \lt \tau _k\) , and \(Z^{\prime } = \lbrace \tau _2 - \tau _1, \tau _3 - \tau _1, \ldots , \tau _k - \tau _1\rbrace\) . Note that \(|Z| = |Z^{\prime }| + 1\) and that every \(\sigma \in Z^{\prime }\) satisfies \(\alpha \sigma \in pq\mathbb {Z}+ (-q,q)\) (i.e., the residue \((\alpha \sigma) \,\%\,(pq)\) is either smaller than q or larger than \(pq-q\) ). Hence,
where the last bound follows, since for any fixed \(\sigma\) , \(\alpha \sigma \,\%\,(pq)\) is uniformly distributed in \(\mathbb {Z}_{pq}^{\ast }\) (recall \(\sigma \lt q\le p\) ), and the probability it is in \(pq\mathbb {Z}+ (-q,q)\) is \(O(1/p)\) . □
Lemmas 4.17 and 4.18 yield the following corollary, which upper bounds \(M_{p,q,r}(S)\) :
Corollary 4.19.
Let \(r \in \mathbb {N}\) , let \(p \ge q \gt 0\) be prime numbers, and let \(S \in \mathbb {Z}_p^r\) be a nonzero vector. Then
These two estimates yield the desirable \(|M_{p,q,r}(S)| = O(1/(pq)+1/p^2) = O(1/(pq)).\) □
4.3.4 Partitioning into 2-dimensional Subspaces.
While Corollary 4.19, in conjunction with Lemma 4.16, allows us bounding \(\text{Cov}(B^{\prime }(x), B^{\prime }(y))\) from above (which is the main task we are tackling), the obtained upper bound is not sufficiently tight for our purposes. To achieve a stronger bound, we use the special structure of \(B^{\prime }\) observed in Claim 4.12—namely, that it satisfies \(B^{\prime }(x)=B^{\prime }(\gamma x)\) for all \(\gamma \in \mathbb {Z}_p^\ast\) , and that its Fourier expansion satisfies \(\widehat{B^{\prime }}(S) = \widehat{B^{\prime }}(S+S^{\prime })\) for all S and the specific \(S^{\prime }\) defined in Claim 4.12—to show that it is sufficient to bound the sums \(\sum _{S \in U} M_{p,q,r}(S)\) over certain 2-dimensional subspaces U.
Lemma 4.20.
Let \(r \in \mathbb {N}\) , and let \(p \ge q\) be prime numbers. Let \({f}:{\mathbb {Z}_p^r} \rightarrow {\left[0,1\right]}\) satisfy \(f(x) = f(\gamma x)\) for all \(x \in \mathbb {Z}_p^r\) and \(\gamma \in \mathbb {Z}_p^\ast\) . Furthermore, assume there exists a particular nonzero vector \(S^{\prime } \in \mathbb {Z}_p^r\) such that \(\widehat{f}(S+S^{\prime }) = \widehat{f}(S)\) for all \(S \in \mathbb {Z}_p^r\) .
Let C be a constant such that for all S satisfying \(\forall \nu \in \mathbb {Z}_p :S \ne \nu S^{\prime }\) ,
There are two kinds of contributions to the right-hand side, corresponding to elements S with \(S = \nu S^{\prime }\) and to other elements.
Case 1: The contribution of each S with \(S = \nu S^{\prime }\) for \(\nu \in \mathbb {Z}_p^\ast\) , is \(M_{p,q,r}(S^{\prime }) \cdot \widehat{f}(S^{\prime })^2\) . (Recall that by Lemma 4.15, for such an S, we have \(M_{p,q,r}(S^{\prime })=M_{p,q,r}(S)\) , and, since \(f(x)=f(\gamma x)\) , we have \(\widehat{f}(S)=\widehat{f}(S^{\prime })\) .) We note that \(|\widehat{f}(S)| = |{\mathbb {E}}_x[f(x) \overline{\chi _S(x)}]| \le {\mathbb {E}}|f(x)| = \mu\) . Using the bound on \(M_{p,q,r}(S)\) from Corollary 4.19, and the fact that there are only \(p-1\) such S’s, we get that the total contribution in this case is
Case 2: The contribution of elements S with \(S \ne \nu S^{\prime }\) for all \(\nu \in \mathbb {Z}_p^\ast\) (we denote this family of elements by \(\mathcal {S}\) ) can be analyzed using the assumption that \(\widehat{f}(S+ \nu S^{\prime }) = \widehat{f}(S)\) for all \(\nu \in \mathbb {Z}_p\) . It follows that
Here, the first equality holds, since each summand on the left-hand side appears \(p(p-1)\) times on the right-hand side. The final inequality is obtained by the assumption regarding C and the estimate \(\sum _S \widehat{f}(S)^2 = {\mathbb {E}}[f^2] \le \mu\) .
Overall: Combining the above two contributions, we get
4.3.5 Bounding \(\sum _S M_{p,q,r}(S)\) Over 2-dimensional Subspaces.
In this subsection, we present the most complex step of the proof—bounding \(\sum _{S \in \mathcal {U}} M_{p,q,r}(S)\) over 2-dimensional subspaces \(\mathcal {U}\) , which will allow us to complete the proof in conjunction with Lemma 4.20. The proof is quite technical. Its core element is the representation of a sub-problem as a Littlewood-Offord type problem and the use of an antichain technique for handling it.
Lemma 4.21.
Let \(S, S^{\prime } \in \mathbb {Z}_{p}^r\) be nonzero vectors with \(S \ne \nu S^{\prime }\) for all \(\nu \in \mathbb {Z}_p^\ast\) . Suppose \(q \le p\) , then
where the probability is taken over pairs \((x, y)\) distributed according to a \((p,q,r)\) -arithmetic-distribution. Adding and subtracting all pairs of the form \((\mu , \nu) = (0, \nu)\) to the sum in Equation (29), we get
Note that given \(x,y\) , the number of solutions \((\mu ,\nu)\) of the equation system \((\langle \mu S + \nu S^{\prime },x \rangle = 0) \wedge (\langle \mu S + \nu S^{\prime },y \rangle = 0)\) is equal to the number of solutions of the system \((\mu \langle S,x \rangle + \nu \langle S,y \rangle = 0) \wedge (\mu \langle S^{\prime },x \rangle + \nu \langle S^{\prime },y \rangle = 0)\) . Indeed, they are equal to the sizes of the left kernel and the right kernel of the matrix
\begin{equation*} \begin{pmatrix} \langle S, x \rangle & \langle S, y \rangle \\ \langle S^{\prime }, x \rangle & \langle S^{\prime }, y \rangle \\ \end{pmatrix}, \end{equation*}
which are known to be equal. The latter linear system may succinctly be written as \(\mu V(x)+\nu V(y)=0\) where
In case of either \(\mu = 0\) or \(\nu = 0\) , we have \(\Pr _{x,y}[ \mu V(x) + \nu V(y) = 0 ] = 1/p^2\) , since both \(x,y\) are uniformly distributed in \(\mathbb {Z}_p^r\) and \(S, S^{\prime }\) are linearly independent vectors. We must hence verify
To obtain Equation (35), notice that if one of \(\langle S, x\rangle , \langle S, y\rangle\) is zero, and the other is not, then there cannot be a \(\mu \in \mathbb {Z}_p^{\ast }\) , which is the quotient of them.
This is because upon fixing \(x,y\) , whenever \(\langle S^{\prime }, x \rangle \ne 0\) or \(\langle S^{\prime }, y \rangle \ne 0\) , there is at most one value of \(\mu \in \mathbb {Z}_{p}^\ast\) for which \(\mu V(x) = V(y)\) . Lemma 4.18 implies
Since \(x\sim \mathbb {Z}_{p}^r\) is uniformly distributed, and \(S, S^{\prime }\) are two independent vectors, then we have \(\Pr [V(x) = 0] = 1/p^2\) . Moreover, similarly to the reasoning in Lemma 4.18 (Equation (26) in particular),
where \(u = \lfloor \alpha v_i / q \rceil\) with \(\alpha \sim \mathbb {Z}_{pq}^\ast\) and \(v_i \sim \lbrace (1-q)/2, \ldots , (q-1)/2 \rbrace\) are uniformly distributed. But, according to Equation (27), we have
which, together with \(\Pr [V(x)=0]=1/p^2\) implies Equation (37).
Step 4. We prove Equation (36). Recall, again, that \(x,y\) are sampled by taking \(x\sim \mathbb {Z}_p^r\) uniformly at random, and setting \(y_i = (\gamma x_i + \gamma ^{\prime } u_i) \,\%\,p\) with \(\gamma ^{\prime }, \gamma \sim \mathbb {Z}_p^\ast\) and \(u_i = \lfloor \alpha \cdot v_i \rceil\) , with \(\alpha \sim \mathbb {Z}_{pq}^\ast\) and \(v_i \sim \lbrace (1-q)/2, \ldots , (q-1)/2 \rbrace\) . We further decompose \(Q_3\) into two parts, \(Q_3 = Q_4 + Q_5\) , according to whether \(\gamma \langle S, x \rangle = \langle S, y \rangle\) or not:
Since \(Q_3 = Q_4 + Q_5\) , these claims clearly imply Equation (36).
Lower bounding \(\eta\) . Recall that both x and y are uniformly distributed in \(\mathbb {Z}_p^r\) , and so \(\langle S, x \rangle\) and \(\langle S, y \rangle\) are uniformly distributed in \(\mathbb {Z}_p\) . Thus, by a union bound, we have \(\eta \ge 1-2/p\) , as asserted.
Upper bounding \(\beta\) . Recall that \(y_i = (\gamma x_i + \gamma ^{\prime } u_i) \,\%\,p\) , and hence the event that \(\gamma \langle S, x \rangle = \langle S, y \rangle\) is exactly the event that \(\langle S, u \rangle = 0\) . The probability of this latter event may be upper bounded by \(O(1/p+1/q)\) using Equation (27). Hence,
Simplifying \(Q_4\) . As an appetizer, note that if we would replace in \(Q_4\) the requirement of \(\mu V(x) = V(y)\) by \(\mu \langle S, x\rangle = \langle S, y\rangle\) , and call the result \(Q_4^{\prime }\) , then we would get \(Q_4^{\prime } + \beta = \eta\) . All that is left to prove Equation (1) is to show that \(p Q_4 = Q_4^{\prime }\) .
To reduce to this case, we choose any \(\ell\) with \(S^{\prime }_\ell \ne 0\) and replace S by \(S - \frac{S_\ell }{S^{\prime }_\ell } S^{\prime }\) , which is also nonzero. (Note that the sum on the left-hand side of Equation (28) does not change by this replacement.)
We condition on the values of \(\gamma , u, \gamma ^{\prime }\) and \(\lbrace x_j : j \ne \ell \rbrace\) (i.e., on the \(\sigma\) -algebra generated by these variables). The only information that is missing in the probability space is \(x_\ell\) —it is uniformly distributed under the current conditioning. While the contribution to \(Q_4^{\prime }\) is fixed under the current conditioning (as we assumed \(S_\ell =0\) ), we claim there exists exactly one value of \(x_\ell\) that would contribute to the probability expressed by \(Q_4\) . To see this, let \(\mu\) be the unique element of \(\mathbb {Z}_p^\ast\) that has \(\mu \langle S, x \rangle = \langle S, y \rangle\) . To have \(\mu V(x) = V(y)\) , we must also have \(\mu \langle S^{\prime }, x \rangle = \langle S^{\prime }, y \rangle\) . Under our conditioning, this latter equation is a linear equation in \(x_\ell\) with the linear coefficient \((\mu - \gamma)S^{\prime }_\ell\) (recall how \(y_\ell\) depends on \(x_\ell\) ) and some constant coefficient that is deterministic under our conditioning. This equation has a unique solution in \(x_\ell\) . Since \(x_\ell\) has a uniform distribution, we have \(Q_4 = Q_4^{\prime } / p = (\eta -\beta)/ p\) , as asserted.
Step 5. Last, we upper bound \(Q_5\) . Recall
\begin{equation*} V(y) = \begin{pmatrix} \langle S, y \rangle \\ \langle S^{\prime }, y \rangle \\ \end{pmatrix} = \gamma \begin{pmatrix} \langle S, x \rangle \\ \langle S^{\prime }, x \rangle \\ \end{pmatrix} + \gamma ^{\prime } \begin{pmatrix} \langle S, u \rangle \\ \langle S^{\prime }, u \rangle \\ \end{pmatrix}. \end{equation*}
Hence, the event \(\gamma V(x) = V(y)\) is simply \(\lbrace \langle S, u \rangle = 0 \, \wedge \, \langle S^{\prime }, u \rangle = 0\rbrace\) , implying
We use an argument similar to the argument we had in Lemma 4.18 (specifically, Equation (27)) to upper bound this last quantity. Let \(l \in [r]\) be any coordinate with \(S_l \ne 0\) , and let \(\ell\) be a coordinate with \(S^{\prime }_\ell \ne 0\) while \(S_\ell = 0\) , whose existence we assumed (see Equation (38)). Recall \(u_j = \lfloor \alpha v_j/ q\rceil\) . Condition on any specific values for \(\alpha , \lbrace u_j : j \notin \lbrace l,\ell \rbrace \rbrace\) . Similarly to Step 4, we can upper bound the probability that \(\langle S, u \rangle = 0\) by the probability that \(u_l\) turns out to be just the right value that would make \(\langle S, u \rangle = 0\) true. This probability is upper bounded by \(\frac{1}{q}\) times the maximal number of elements \(v^{\prime \prime } \in \lbrace (1-q)/2, \ldots , (q-1)/2 \rbrace\) that map to the same \(u^{\prime \prime }\) under \(u^{\prime \prime } = \lfloor \alpha v^{\prime \prime } / q\rceil \,\%\,p\) . Using the same reasoning as in Lemma 4.18, we see that this probability is upper bounded by \((|Z_\alpha |+1) / q\) , where
Under the described conditioning, \(\langle S, u \rangle\) is determined by \(u_l\) , and by further conditioning on the value of \(u_l\) , \(\langle S^{\prime }, u \rangle\) is determined by \(u_\ell\) . Thus, the event that both these quantities are equal zero has probability
Denote \(\tau _j^{\prime } \mathrel {\mathop :}=(\sigma _j \cdot \alpha \,\%\,pq)\) , then we have \(\tau _1^{\prime } \cdot \sigma _2 \,\%\,(pq) = \tau _2^{\prime } \cdot \sigma _1 \,\%\,(pq)\) . Using the assumption \(q \le p\) , we may leverage this equation into an equation over the integers (i.e., not involving a modulus) in the following way:
Let \(\tau _j \mathrel {\mathop :}=\min \lbrace \tau _j^{\prime }, pq - \tau _j^{\prime }\rbrace\) , so the above equation reads either \(\tau _1 \cdot \sigma _2 \,\%\,(pq) = \tau _2 \cdot \sigma _1 \,\%\,(pq)\) or \(\tau _1 \cdot \sigma _2 \,\%\,(pq) = -\tau _2 \cdot \sigma _1 \,\%\,(pq)\) . Observe that \(\tau _j \le q\) , and hence, \(\tau _1 \sigma _2, \tau _2 \sigma _1 \le q^2 \le pq\) . Therefore, over the integers, we must have
To bound from above the expectation of \(|Z_\alpha |^2\) over the \(|\mathbb {Z}_{pq}^\ast |=\phi (pq)\) possible values of \(\alpha\) , we note that \(\alpha\) can be recovered uniquely from \(\sigma _1,\tau ^{\prime }_1\) , as \(\alpha = \tau ^{\prime }_1 \cdot \sigma _1^{-1} \,\%\,pq\) . Thus, any given quadruple \((\sigma _1,\sigma _2,\tau _1,\tau _2)\) corresponds to at most two different values of \(\alpha\) , and so, when we sum over all values of \(\alpha\) , each solution of each of the equations in (40) is counted at most twice.
Therefore, we have
\begin{equation} {\mathbb {E}}_{\alpha }[|Z_\alpha |^2] \le \frac{4 \cdot 2}{\phi (pq)} \Big (\# \lbrace (a,b,c,d) : ab = cd \rbrace + \# \lbrace (a,b,c,d) : ab + cd = pq \rbrace \Big), \end{equation}
(41)
where \(a,b,c,d\) take values in \(\lbrace 0,1,\ldots , q-1\rbrace\) .
We bound the number of such quadruples \((a,b,c,d)\) by the following simple number-theoretic lemma, whose proof is given below:
By Lemma 4.22, the number of these quadruples \((a,b,c,d)\) is \(O(q^2 \log (q))\) . Combining Equation (39) and Equation (41) with Lemma 4.22, we arrive at
Summary of the proof of Lemma 4.21. We parsed the left-hand side of Equation (28) and interpreted it as the bias introduced in an event, ( \(V(x)\) is proportional to \(V(y)\) ) caused by dependence between \(x,y\sim \mathbb {Z}_p^r\) . The core of the argument upper bounds this bias by posing the problem as a Littlewood-Offord-type problem and using an antichain argument along with simple number theoretic estimates.
Proof of Lemma 4.22.
First, notice that we may consider, in both cases, \(a,b,c,d \gt 0\) , as there are only \(O(q^2)\) quadruples with \(0 \in \lbrace a,b,c,d\rbrace\) and either \(ab=cd\) or \(ab+cd = N\) . Indeed, regarding \(ab=cd\) , we must have 0 on both sides, which implies that there are only \(O(q^2)\) possible pairs. Regarding \(ab+cd=N\) , if \(a=0\) , then \(b,c\) have \(q^2\) options, and they determine d, totaling in \(\le O(q^2)\) pairs. We call the analogs of \(P,Q\) , with the quadruples containing 0 removed, \(P^{\prime }, Q^{\prime }\) , respectively.
Second, we count \(|P^{\prime }|\) . Fixing \(a,c\) , we see that \(b,d\) must satisfy the linear equation \(ab + cd = N\) . The different solutions \((b,d)\) for this equation differ by integral multiples of the vector \((c/\gcd (a,c), -a/\gcd (a,c))\) . Since both \(b,d\) are integers in \([1,q)\) , the number of such solutions is at most \(q \gcd (a,c) / \max (a,c)\) . Denoting \(g = \gcd (a,c)\) , we arrive at
Last, bounding \(|Q^{\prime }|\) is done likewise, this time considering the equation \(ab-cd = 0\) . □
We note that the \(\log (q)\) factor in the bound \(O(\frac{1}{q^2} + \frac{\log (q)}{pq})\) of Lemma 4.22 is the reason for the logarithmic loss in Theorem 4.1. Unfortunately, one can show that the assertion of Lemma 4.22 is tight up to a constant factor, at least regarding the size of Q.
4.3.6 Wrapping up the Proof of the Obfuscation Lemma.
Proof of Lemma 4.7.
Recall that we assume an algorithm \({B}:{\mathbb {Z}_p^r} \rightarrow {\binom{[r]}{k}}\) that always reports a k-tuple of its input numbers whose sum is 0 modulo p (and is allowed to report failure). Using B, we define the obfuscation algorithm \({A}:{\mathbb {Z}_{pq}^r} \rightarrow {\binom{[r]}{k}}\) (Algorithm 4.6), which reports a k-tuple of its input numbers whose sum is 0 modulo pq. We further define \({B^{\prime }}:{\mathbb {Z}_p^r} \rightarrow {[0,1]}\) by
Furthermore, by Claim 4.12, \(B^{\prime }(x) = B^{\prime }(\gamma x)\) for all \(\gamma \in \mathbb {Z}_p^\ast\) and \(\widehat{B^{\prime }}(S+S^{\prime }) = \widehat{B^{\prime }}(S)\) for all S, with \(S^{\prime }\) as defined in Claim 4.12.
The authors thank Alon Rosen and Prashant Vasudevan for helpful comments on a previous version of this article.
Footnotes
1
Another variant of the k-SUM problem asks, given k lists of \(r/k\) numbers, find k numbers—one from each list—whose SUM is zero. The two problems are equivalent, up to \(O_k(1)\) factors.
2
We note that variants of the k-tree algorithm were presented earlier, starting with Camion and Patarin [12], as is stipulated in Reference [36, full version].
3
Such a prime can clearly be found efficiently, since by a quantitative version of the prime number theorem, the number of primes between M and 2M is \(\Omega (M/\log M)\) . Therefore, one may pick such a prime by random sampling and using a standard primarily test algorithm.
A Wagner’s K-Tree Algorithm
In this Appendix, we sketch the details of Wagner’s k-tree algorithm for solving the k-XOR problem and its generalization published in Reference [30]. The variant for solving k-SUM is similar. For more details, we refer the reader to the original publications [30, 36].
A.1 The 4-XOR Algorithm
We begin by describing the algorithm applied to a 4-list variant of 4-XOR. In this problem, the input consists of 4 lists \(\lbrace x^{(j)}\rbrace _{j=1}^{4}\) , where each \(x^{(j)} \in \lbrace 0,1\rbrace ^{2^{n/3} \times n}\) is chosen uniformly at random. The goal is to find 4 vectors, one from each list, whose XOR is \(0_n\) , namely, output a 4-tuple \(\lbrace i_j\rbrace _{j=1}^{4}\) , where \(i_j \in [2^{n/3}]\) such that \(\bigoplus _{j=1}^{4} x^{(j)}_{i_j} = 0_n\) . It is easy to see the 4-list variant is equivalent to the single-list variant (Definition 1.3) up to \(O(1)\) factors in success probability and complexity.
The k-tree algorithm for \(k=4\) is described below.
(1)
Sort the lists \(\lbrace x^{(j)}\rbrace _{j=1}^{4}\) .
(2)
By a linear scan, find all pairs \((x^{(1)}_{i_1},x^{(2)}_{i_2})\) such that the \(n/3\) most significant bits of \(x^{(1)}_{i_1} \oplus x^{(2)}_{i_2}\) are zero. Store all values \(x^{(1)}_{i_1} \oplus x^{(2)}_{i_2}\) in a new sorted list \(y^{(1)}\) along with the corresponding pair \((x^{(1)}_{i_1},x^{(2)}_{i_2})\) .
(3)
Apply the previous step to \(x^{(3)}\) and \(x^{(4)}\) and build the sorted list \(y^{(2)}\) .
(4)
Find a pair \((y^{(1)}_{j_1},y^{(2)}_{j_2})\) such that \(y^{(1)}_{j_1} \oplus y^{(2)}_{j_2} = 0_n\) . Trace \((y^{(1)}_{j_1},y^{(2)}_{j_2})\) back to a solution to 4-XOR problem and output it.
To analyze the algorithm, note that the expected size of \(y^{(1)}\) and \(y^{(2)}\) is \(2^{n/3}\) (as a pair \((x^{(1)}_{i_1},x^{(2)}_{i_2})\) is added to \(y^{(1)}\) with probability \(2^{-n/3}\) ). Therefore, the algorithm runs in expected time \(\tilde{O}(2^{n/3})\) . Moreover, on average, there is a single 4-XOR solution to be found in the last step, since any 4-tuple \(\lbrace x^{(j)}_{i_j}\rbrace _{j=1}^{4}\) satisfies the \(4n/3\) bit constraints imposed by the algorithm with probability \(2^{-4n/3}\) (and there are \(2^{4n/3}\) such 4-tuples). Based on tail bounds, one can show that the algorithm succeeds with constant probability. We refer the reader to Reference [30] for a rigorous analysis.
A.2 Generalizations
We briefly summarize two important generalizations of the 4-XOR algorithm.
The first generalization applies to larger k that is a power of 2. The input consists of k lists, each containing \(2^{n/(\log k + 1)}\) vectors of n bits. The algorithm merges the k lists in pairs in a tree-like structure with \(\log k + 1\) levels. The merging maintains the property that the vectors in all \(k/2^{\ell }\) lists in level \(\ell \in \lbrace 0,1,\ldots ,\log k -1\rbrace\) have zero \(\ell \cdot n/(\log k + 1)\) most significant bits. The final 2-list merge at level \(\log k - 1\) zeroes the remaining \(2n/(\log k + 1)\) bits, giving a k-XOR solution at the last level with high probability.
When k is not a power of 2, the k-XOR problem can be easily reduced to a \(k^{\prime }\) -XOR problem where \(k^{\prime }\) is the largest power of 2 that is smaller than k.
This generalization applies when the input lists contain less than \(2^{n/(\log k + 1)}\) vectors (i.e., the input is less dense) and the k-tree algorithm is not directly applicable. The extended algorithm gives a tradeoff between the size of the inputs lists and the time complexity.
Specifically, for 4-XOR, when the input lists are of size r for \(2^{n/4} \le r \le 2^{n/3}\) , we change the second step to find all pairs \((x^{(1)}_{i_1},x^{(2)}_{i_2})\) such that the \(4 \log r - n\) most significant bits of \(x^{(1)}_{i_1} \oplus x^{(2)}_{i_2}\) are equal to \(0_{4 \log r - 1}\) (we also change the third step similarly). Therefore, the expected size of \(y^{(1)}\) and \(y^{(2)}\) becomes \(2^{n}/r^2\) , and the expected complexity of the algorithm is \(\tilde{O}(2^{n}/r^2)\) . Finally, on average, there is a single 4-XOR solution to be found in the last step, since there are \(4 \log r\) bit constraints imposed by the algorithm on \(r^4\) 4-tuples (once again, a tail bound is required to rigorously compute the success probability).
References
[1]
Amir Abboud and Virginia Vassilevska Williams. 2014. Popular conjectures imply strong lower bounds for dynamic problems. In FOCS. IEEE Computer Society, 434–443. DOI:
Amir Abboud, Virginia Vassilevska Williams, and Oren Weimann. 2014. Consequences of faster alignment of sequences. In ICALP(Lecture Notes in Computer Science, Vol. 8572), Javier Esparza, Pierre Fraigniaud, Thore Husfeldt, and Elias Koutsoupias (Eds.). Springer, 39–51. DOI:
Mark Yuying An. 1996. Log-concave Probability Distributions: Theory and Statistical Testing. Game Theory and Information. University Library of Munich, Germany. Retrieved from https://EconPapers.repec.org/RePEc:wpa:wuwpga:9611002
Marshall Ball, Alon Rosen, Manuel Sabin, and Prashant Nalini Vasudevan. 2018. Proofs of work from worst-case assumptions. In CRYPTO(Lecture Notes in Computer Science, Vol. 10991), Hovav Shacham and Alexandra Boldyreva (Eds.). Springer, 789–819. DOI:
Anja Becker, Antoine Joux, Alexander May, and Alexander Meurer. 2012. Decoding random binary linear codes in \(2^{n/20}\) : How 1 + 1 = 0 improves information set decoding. In EUROCRYPT(Lecture Notes in Computer Science, Vol. 7237), David Pointcheval and Thomas Johansson (Eds.). Springer, 520–536. DOI:
Fabrice Benhamouda, Tancrède Lepoint, Julian Loss, Michele Orrù, and Mariana Raykova. 2021. On the (in)security of ROS. In EUROCRYPT(Lecture Notes in Computer Science, Vol. 12696), Anne Canteaut and François-Xavier Standaert (Eds.). Springer, 33–53. DOI:
Avrim Blum, Adam Kalai, and Hal Wasserman. 2003. Noise-tolerant learning, the parity problem, and the statistical query model. J. ACM 50, 4 (2003), 506–519. DOI:
Stéphane Boucheron, Gábor Lugosi, and Pascal Massart. 2013. Concentration Inequalities—A Nonasymptotic Theory of Independence. Oxford University Press. DOI:
Charles Bouillaguet, Claire Delaplace, and Pierre-Alain Fouque. 2018. Revisiting and improving algorithms for the 3XOR problem. IACR Trans. Symmetric Cryptol. 2018, 1 (2018), 254–276. DOI:
Zvika Brakerski, Noah Stephens-Davidowitz, and Vinod Vaikuntanathan. 2021. On the hardness of average-case k-SUM. In APPROX/RANDOM(LIPIcs, Vol. 207), Mary Wootters and Laura Sanità (Eds.). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 29:1–29:19. DOI:
Paul Camion and Jacques Patarin. 1991. The knapsack hash function proposed at Crypto’89 can be broken. In EUROCRYPT(Lecture Notes in Computer Science, Vol. 547), Donald W. Davies (Ed.). Springer, 39–53. DOI:
Akshay Degwekar, Vinod Vaikuntanathan, and Prashant Nalini Vasudevan. 2016. Fine-grained cryptography. In CRYPTO(Lecture Notes in Computer Science, Vol. 9816), Matthew Robshaw and Jonathan Katz (Eds.). Springer, 533–562. DOI:
Yevgeniy Dodis, Dmitry Khovratovich, Nicky Mouha, and Mridul Nandi. 2021. T \(_5\) : Hashing five inputs with three compression calls. In ITC(LIPIcs, Vol. 199), Stefano Tessaro (Ed.). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 24:1–24:23. DOI:
Alexander Golovnev, Siyao Guo, Thibaut Horel, Sunoo Park, and Vinod Vaikuntanathan. 2020. Data structures meet cryptography: 3SUM with preprocessing. In STOC, Konstantin Makarychev, Yury Makarychev, Madhur Tulsiani, Gautam Kamath, and Julia Chuzhoy (Eds.). ACM, 294–307. DOI:
Nick Howgrave-Graham and Antoine Joux. 2010. New generic algorithms for hard knapsacks. In EUROCRYPT(Lecture Notes in Computer Science, Vol. 6110), Henri Gilbert (Ed.). Springer, 235–256. DOI:
Russell Impagliazzo, Leonid A. Levin, and Michael Luby. 1989. Pseudo-random generation from one-way functions (extended abstracts). In STOC, David S. Johnson (Ed.). ACM, 12–24. DOI:
Rio LaVigne, Andrea Lincoln, and Virginia Vassilevska Williams. 2019. Public-key cryptography in the fine-grained setting. In CRYPTO(Lecture Notes in Computer Science, Vol. 11694), Alexandra Boldyreva and Daniele Micciancio (Eds.). Springer, 605–635. DOI:
Gaëtan Leurent and Ferdinand Sibleyras. 2019. Low-memory attacks against two-round even-mansour using the 3-XOR problem. In CRYPTO(Lecture Notes in Computer Science, Vol. 11693), Alexandra Boldyreva and Daniele Micciancio (Eds.). Springer, 210–235. DOI:
John Edensor Littlewood and A. Cyril Offord. 1943. On the number of real roots of a random algebraic equation (III). Rec. Math. (Mat. Sbornik). Nouvelle Série 54, 12 (1943), 277–286.
Yi Lu and Serge Vaudenay. 2004. Faster correlation attack on bluetooth keystream generator E0. In CRYPTO(Lecture Notes in Computer Science, Vol. 3152), Matthew K. Franklin (Ed.). Springer, 407–425. DOI:
Vadim Lyubashevsky. 2005. The parity problem in the presence of noise, decoding random linear codes, and the subset sum problem. In APPROX/RANDOM(Lecture Notes in Computer Science, Vol. 3624), Chandra Chekuri, Klaus Jansen, José D. P. Rolim, and Luca Trevisan (Eds.). Springer, 378–389. DOI:
Florian Mendel, Norbert Pramstaller, Christian Rechberger, Marcin Kontak, and Janusz Szmidt. 2008. Cryptanalysis of the GOST hash function. In CRYPTO(Lecture Notes in Computer Science, Vol. 5157), David A. Wagner (Ed.). Springer, 162–178. DOI:
Jesper Nederlof and Karol Wegrzycki. 2021. Improving Schroeppel and Shamir’s algorithm for subset sum via orthogonal vectors. In STOC, Samir Khuller and Virginia Vassilevska Williams (Eds.). ACM, 1670–1683. DOI:
Ivica Nikolic and Yu Sasaki. 2015. Refinements of the k-tree algorithm for the generalized birthday problem. In ASIACRYPT(Lecture Notes in Computer Science, Vol. 9453), Tetsu Iwata and Jung Hee Cheon (Eds.). Springer, 683–703. DOI:
Seth Pettie. 2015. Higher lower bounds from the 3sum conjecture. In Proceedings of the Fine-grained Complexity and Algorithm Design Workshop at the Simons Institute.
Virginia Vasillevska-Williams. 2019. On some fine-grained questions in algorithms and complexity. In Proceedings of the International Congress of Mathematicians (ICM’19). 3447–3487.
David A. Wagner. 2002. A generalized birthday problem. In CRYPTO(Lecture Notes in Computer Science, Vol. 2442), Moti Yung (Ed.). Springer, 288–303. DOI:
Virginia Vassilevska Williams and Ryan Williams. 2013. Finding, minimizing, and counting weighted subgraphs. SIAM J. Comput. 42, 3 (2013), 831–854. DOI:
In parameterized complexity, each problem instance comes with a parameter k, and a parameterized problem is said to admit a polynomial kernel if there are polynomial time preprocessing rules that reduce the input instance to an instance with size ...
STOC '13: Proceedings of the forty-fifth annual ACM symposium on Theory of Computing
In the d-dimensional bin packing problem (VBP), one is given vectors x1,x2, ... ,xn ∈ Rd and the goal is to find a partition into a minimum number of feasible sets: {1,2 ... ,n} = ∪is Bi. A set Bi is feasible if ∑j ∈ Bi xj ≤ 1, where 1 denotes the all 1'...
We show that Set-Cover on instances with N elements cannot be approximated within -factor in time exp(, for any and any , assuming the Exponential Time Hypothesis. This essentially matches the best upper bound known by Cygan, ...