Manuscript Offprint
arXiv:2608.24799Masked Differential-linear Distinguishers and Quantum Approaches
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Shobhit Pandey, Sarbani Sen, Debajyoti Bera, and Ravi Anand
Indraprastha Institute of Information Technology, Delhi, India
Abstract. We introduce masked auto-correlation, a new primitive for the cryptanalysis of symmetric-key primitives, together with a quantum attack pipeline built on it. For a permutation , output masks , and an input difference , masked auto-correlation (MAC) measures the correlation between the masked outputs and . The associated masked differential-linear (MDL) approximations strictly generalize several classical techniques; ordinary linear cryptanalysis, differential-linear cryptanalysis, and the differential-linear connectivity table all arise as special cases. Our central object of study is the problem of finding mask pairs with large masked cross-correlation—those that yield powerful distinguishers—which we call MAC Fishing. We give a constant-query quantum algorithm that samples such pairs according to their squared correlation, and we prove an exponential classical lower bound of queries, by adapting the hardness of Fourier Fishing. To our knowledge this is the first result pairing a quantum upper bound with a classical lower bound for the core task of identifying high-correlation approximations, making quantum algorithms an absolute necessity. Building on this, we analyse the distribution of masked auto-correlation for random permutations, and then construct capacity-based distinguishers and key-recovery attacks, both classically and with a quadratic quantum speed-up using amplitude estimation. We validate our claims with experiments on reduced-round mini-AES.
Keywords: Cryptanalysis · Quantum cryptanalysis · Masked auto-correlation · Differential-linear · Boolean functions.
1 Introduction
The security of symmetric-key primitives—block ciphers, stream ciphers, and their associated modes—has been studied extensively in the classical paradigm. The two foundational classical attack paradigms, linear cryptanalysis [34] and differential cryptanalysis [9], were introduced in the early 1990s and remain the primary benchmarks against which new designs are evaluated. Subsequent work has produced a rich body of classical techniques that interpolate and extend these two paradigms: differential-linear cryptanalysis [33], multiple and multidimensional linear approximations [22,24], and algebraic variants [19], among others. Despite this diversity, virtually all of these techniques share a common
S. Pandey et al.
classical algorithmic trait: the attacker processes keystream or ciphertext samples sequentially, accumulates statistical evidence, and constructs a distinguishing attack or recovers key. In the classical setting, the bottleneck is always the number of plaintext-ciphertext pairs required to drive the distinguishing attack to significance, and the design community has responded by designing ciphers whose linear and differential probabilities are as low as possible.
The advent of quantum computing forces a re-examination of this picture. Quantum algorithms can offer quadratic to superpolynomial speedups for certain structured search and sampling problems, so it is natural to ask whether the statistical properties underlying symmetric-key cryptanalysis admit similar quantum speed-ups. Early results showed that Simon's algorithm can break many constructions with a secret period structure [38,32], and subsequent work has turned classical statistical attacks—linear, differential, and meet-in-the-middle—into the quantum setting [15,29,27]. Most recently, Hosoyamada studied quantum multi-linear approximations [26], showing that the quantum query complexity of multidimensional linear distinguishers can be significantly lower than their classical counterparts. Despite this progress, most existing quantum attacks inherit the structure of their classical counterparts, porting a known statistical distinguisher into a quantum query model rather than identifying new properties that are inherently quantum in nature. In this paper we introduce a new cryptanalytic primitive, masked auto-correlation, whose most powerful instantiation is provably beyond the reach of efficient classical algorithms.
Masked auto-correlation. At the base of linear cryptanalysis is the Walsh–Hadamard transform: for , the coefficient measures the correlation between and the linear function , and the design goal is to keep all coefficients small. Cross-correlation generalizes this: instead of correlating against a fixed linear function, one correlates it against a shifted copy of another function, sweeping over all shifts, and auto-correlation is the special case of a function against a shifted copy of itself. We study this in the vectorial setting natural for block ciphers, where the round function is a permutation , and ask where the auto-correlations among different output bits are statistically significant. Rather than fix a single output bit, we take linear combinations: fixing output masks , the masked auto-correlation measures the cross-correlation between and as the difference ranges over ,
(formalized in Section 3). Since is a permutation, is proportional to the expectation of a random variable, so it can be estimated accurately for any given . Two obstacles stand in the way of exploiting it, however. First, finding the mask pairs whose cross-correlation is large—those that yield powerful distinguishers—is a search over an exponential space, infeasible by naive enumeration. Second, even granted such masks, sampling according to the cross-correlation distribution has no obvious efficient classical solution. The central thesis of this paper is that both obstacles fall to a quantum algorithm, and that the resulting pipeline is provably beyond efficient classical reach.
A quantum algorithm for finding good masks. Most prior work on linear and differential approximations assumes a highly-correlated approximation is already in hand [30]. We instead give a quantum algorithm that finds one: using 3n qubits and two oracle calls to , it prepares a superposition that samples from for a fixed key, so a measurement returns a mask pair with probability proportional to — heavy pairs, exactly the exploitable ones, are the likely outputs. The algorithm is easily generalizable to sample across all keys with minimal overhead.
Classical hardness of mask finding. We then ask whether this search can be done classically. We formalize it as the MAC Fishing problem—output any with large , under the promise that such a pair exists—and prove it requires classical queries. The argument adapts the Aaronson–Chen hardness proof for Fourier Fishing [1], the canonical example of a search that is easy quantumly yet provably hard classically and a member of the forrelation family of maximal query separations; masked cross-correlation is a natural cross-correlation analogue. To our knowledge this is the first provably exponential speedup shown for the central task of identifying high-correlation approximations.
As part of the proof, we derived sharp concentration bound on a possible statistic based on masked auto-correlation, namely, the total mass of high auto-correlations (those that cross a threshold). It allows us to show later that the statistic indeed differs widely in Mini-AES as compared to that in a random permutation.
A unifying framework and its applications. The MDL approximation is a strict generalization of several classical distinguishers rather than a technique alongside them. Taking the identity and recovers ordinary linear cryptanalysis; enforcing identical masks recovers differential-linear cryptanalysis and, in the single-bit case, the DLCT entry; and organizing mask pairs into a vector space recovers the multidimensional variant of each (Section 5.3). What unifies them is not only the form of the approximation but its statistics: in every case the figure of merit is the capacity of a space of masked auto-correlations, which
S. Pandey et al.
we show obeys the same law for a random permutation (Conjecture 1). A single distributional analysis therefore governs the whole family, and a single distinguisher exploits it.
On top of this we build an end-to-end pipeline. Classically, a capacity-based distinguisher thresholds the aggregated masked auto-correlation of a basis of mask pairs, and a last-round key recovery extends it: a wrong subkey guess randomizes the partially decrypted cipher, so the correct key is the one whose correlation profile matches a reference template. Crucially this match is invisible to the unsigned energy—the subkey enters the masked bits as a sign—so recovery is resolved by signed template matching (Section 6). Quantumly, both attacks are driven by MAC Fishing: the masks are supplied by the constant-query sampler of Section 4 and each correlation is read off by amplitude estimation, replacing the classical verification with for a quadratic query advantage—on top of a mask-finding step with no efficient classical analogue at all.
We validate the two halves on the two ciphers each suits best. The distributional claims are verified on a 16-bit 3-round Mini-AES, whose block is small enough to measure every correlation exactly over the full codebook and to estimate these distributions across many keys against a known baseline; further, we used a “small” shift of that essentially flips the two rightmost bits, yet, we were surprised to see the amount of auto-correlation produced by it. The other half, the attacks, are exercised on a toy Simon cipher, whose Feistel last round inserts the subkey as a constant phase on the masked output bits and so realizes, in clean form, the sign-degeneracy that the signed-template key recovery is designed to resolve (Appendix B).
1.2 Our Contributions
– We extend cross-correlation to vectorial Boolean functions and define (multi-dimensional) MDL approximations (Section 5). Linear cryptanalysis, differential-linear cryptanalysis, their multidimensional variants, and the DLCT are each strict special cases, obtained by constraining the output masks or the input difference.
– We characterize masked auto-correlation for a random permutation (Section 3), and conjecture that the capacity of a t-dimensional MDL approximation with non-trivial masks (i.e. masks not of the form or ) follows a central with degrees of freedom (Conjecture 1).
– We give a constant-query quantum algorithm that samples mask pairs in proportion to their squared cross-correlation, directly producing high-correlation MDL approximations, and a matching classical lower bound: MAC Fishing requires classical queries (Theorem 1), adapting the Aaronson–Chen hardness of Fourier Fishing. To our knowledge this is the first pairing of a quantum upper bound with a classical lower bound for identifying high-correlation approximations.
– We build a capacity-based distinguisher and a last-round key recovery, the latter using signed template matching to resolve a sign-degeneracy invisible to capacity ranking, and give MAC-Fishing driven quantum versions in which the masks come from the quantum sampler and each correlation is verified by amplitude estimation, for a quadratic query advantage (Section 6).
– We verify the framework on the two ciphers each part suits. On 16-bit 3-round Mini-AES we confirm the distributional theory: heavy mask pairs exist for the vast majority of keys, the good ones are stable across keys, and the random-permutation capacity matches the predicted (Sections 4 and 5, Figures 1,2 and 3). On a toy Simon cipher we run the pipeline end to end—the capacity distinguisher separates the cipher from a random permutation at the predicted data complexity, and the signed template recovers the last-round subkey where the unsigned energy cannot (Section 6, Appendix B).
Remark 1 (Why two ciphers). Mini-AES and toy Simon are doing different jobs, and each fits its job structurally. The distributional claims — that heavy mask pairs exist, are stable across keys, and that random-permutation capacity is — are statements about a population of keys and masks, so they need many keys each measured exactly. Mini-AES's 16-bit block makes that feasible: every correlation is computed over the full codebook and the random baseline sits at a known . The attacks, by contrast, hinge on the last-round structure. Simon's Feistel round inserts the subkey into the masked output bits as a constant XOR, so with key-mask — the magnitudes are key-blind and all the key information lives in the signs, which is exactly the sign-degeneracy the signed-template recovery is built to resolve. Mini-AES's nonlinear last round gives no such clean phase, so it's the wrong structure for our key-recovery demonstration. Hence: Mini-AES verifies the statistics, Simon exercises the pipeline.
1.3 Organization
Section 2 reviews correlation, capacity, linear and differential-linear cryptanalysis, and the Fourier Fishing hardness result. Section 3 develops the properties of masked auto-correlation for an arbitrary and for a random permutation. Section 4 introduces the MAC Fishing problem, the constant-query quantum sampler, and the classical-hardness theorem (proved in Appendix A), and shows experimentally that heavy mask pairs are abundant and independent of the key in Mini-AES. Section 5 defines MDL approximations, shows how they unify multidimensional linear, differential-linear, and DLCT cryptanalysis, and verifies the capacity law on random permutations. Section 6 turns these into attacks—a capacity-based distinguisher and last-round key recovery, demonstrated on Mini-AES, and their MAC-Fishing-driven quantum counterparts. Appendix B reports the end-to-end validation of the full pipeline on a toy Simon cipher; the remaining appendices collect the proofs and the classical verification routines. Several of our experiments used Wilson's score to produce results with high confidence; a background on using this method is included in Appendix D.
S. Pandey et al.
2 Background and Related Works
2.1 Notation
Throughout, is the block size and . We work over , with denoting the inner product over and bitwise XOR. Lower-case denote output masks and an input difference (or shift); is the all-zeroes string. A permutation or models a (round-reduced) block cipher, and the full cipher under key , with the inverse last-round map under a subkey guess . We write for the masked auto-correlation of , abbreviated when is clear from context, and for the induced distribution over mask pairs. denotes capacity, correlation, and the normal distribution. We use standard asymptotic notation . For a value distribution on a codomain of size the capacity carries a multiplier ; in particular a -valued function has multiplier , which is the form used in later sections.
2.2 Correlation, capacity, and approximations
The correlation of a Boolean function is defined as its deviation from the uniform function; mathematically,
Next, let . Value distribution (aka. probability distribution) of is defined as for .
Capacity of a value distribution, say , was defined by Biryukov et al. [10].
Capacity is also known as “squared Euclidean imbalance”. Biryukov et al. [10] showed that the data complexity to distinguish between f and a uniform random function is proportional to the inverse of its capacity, .
Finally, consider the case of being a permutation. Here, of course, since is a permutation.
A common approach undertaken for cryptanalysis of ciphers is to study one or more approximations, usually linear in the input and output of the cipher. Suppose, is an approximation of a block cipher that has a bias , i.e., . Then, the capacity could act as a distinguisher between and a random function; e.g., it would be for . That implies, that the data complexity of this distinguisher would be .
Biryukov et al. demonstrated that defining multiple approximations and then using a suitable notion of capacity for multiple approximations may lead to a smaller data complexity [10,25].
In this work we want to design an efficient distinguisher that is defined in terms of multiple approximations involving masked auto-correlations. However, before that, let's discuss the prominent earlier works along this direction.
2.3 Linear cryptanalysis
Linear cryptanalysis, introduced by Matsui [34], distinguishes a block cipher from a random permutation by exhibiting a linear approximation whose correlation
deviates noticeably from 0. For an n-bit random permutation Cor is approximately distributed for any non-zero mask pair [20], so an empirical correlation outside already suffices to distinguish, with data complexity . Early attempts to combine several approximations relied on (generally invalid) statistical-independence assumptions [28,10,35].
2.4 Multidimensional Linear Cryptanalysis
A common approach to designing a distinguisher from several approximations at once is Pearson's chi-square goodness-of-fit test, so we first recall it. The chi-square distribution arises as the distribution of a sum of squares of independent standard normal variables. Formally, denotes the (non-central) chi-square distribution with degrees of freedom and non-centrality parameter , with mean and variance . Its central role in cryptanalysis stems from Pearson's goodness-of-fit test: given multinomial cell counts from trials with expected probabilities , the statistic
is asymptotically -distributed with [37].
Building on this, Hermelin, Cho and Nyberg [25,23,24] proposed multidimensional linear cryptanalysis to address the statistical-independence assumption inherent in the early works that combined multiple linear approximations. Their idea was to select a set of input-output mask pairs that form some basis of a vector space . The induced distribution
on deviates from the uniform distribution precisely when the capacity of is large.
Furthermore, since
and is distributed normally for a uniform random permutation, Pearson's goodness-of-fit test has been proposed as a distinguisher with data
S. Pandey et al.
complexity . Further improvements have been proposed, e.g., LLR-based variants [3,18] can reach at the cost of accurate knowledge of the (key-dependent) target distribution.
The degree of freedom of the chi-square distributions should also be carefully considered. The trivial mask pairs of the form or have constant zero correlation and reduce the effective degrees of freedom from the naive to [31]. Approximations free of trivial components [36] recover the full degrees of freedom.
The multidimensional linear cryptanalysis framework branches in several directions in the subsequent works. Zero-correlation linear cryptanalysis [13,14] exploits approximations with exactly, distinguishing B from random because the squared correlation of a random permutation is on average. Bogdanov, Leander, Nyberg and Wang [12], refined by Sun et al. [39], established a tight correspondence between multidimensional zero-correlation approximations with linearly independent masks and integral distinguishers based on balanced functions, linking two attack families that were previously studied in isolation. Generalised linear cryptanalysis on arbitrary finite abelian groups [4] replaces bit masks with group characters and underlies, e.g., Beyne's analysis of the FF3-1 and FEA structures [7].
In the quantum setting, Kaplan et al. [30] showed how quantum counting [16] gives a quadratic speed-up for the one-dimensional variant: estimating to the precision required for distinguishing takes time rather than . Lifting this speed-up to the multidimensional regime is non-obvious, since the chi-squared statistic on is not the population count of any natural Boolean function. Hosoyamada [26] bridged this gap with a minor modification of Simon's subroutine—retaining the output register and Hadamard-transforming it—which yields a state whose squared amplitude on equals ; combined with amplitude amplification, this correlation extraction algorithm delivers speed-ups for multidimensional linear, zero-correlation and balanced-property integral distinguishers, and on occasion exceeds the quadratic barrier when several orthogonal integral properties coexist.
2.5 Differential-linear cryptanalysis
Differential-linear cryptanalysis, introduced by Langford and Hellman [33], combines differential [9] and linear [34] cryptanalysis by splitting the cipher as , where has a strong (truncated) differential and a biased linear approximation. For an input difference and output mask , the bias of the differential-linear approximation is
The classical estimate , obtained via the Piling-up lemma [33,8], combines the bias of the truncated differential over with the squared correlation of the linear approximation over where is the truncated differential output mask for the first half and input mask for the second half. Using the Chabaud–Vaudenay link [17], Blondeau, Leander, and Nyberg [11] showed that, assuming independence of and ,
the differential-linear hull of E.
Multidimensional variant. For input differences in and output masks in W, the bias generalises to
where, is the capacity of the multidimensional linear approximation [11]. Multiple input differences enable structures that reduce data complexity by , while multidimensional output masks aggregate correlated approximations into a single capacity.
Bar-On et al. [5] proved that this independence assumption fails in many real-world cases and introduced a new tool, the Differential-Linear Connectivity Table (DLCT), to capture the dependency between the differential and linear parts at the boundary.
2.6 Fourier Fishing and quantum query lower bounds
The hardness side of our results draws on a separate line of work concerning the difficulty of finding structure in a Boolean function, rather than exploiting structure already known. Aaronson and Chen [1], in the course of laying complexity-theoretic foundations for quantum supremacy, studied the Fourier Fishing problem: given oracle access to a Boolean function, output a point z at which the (squared, normalised) Walsh–Hadamard coefficient is large. They showed that, while a quantum algorithm solves this with a single query by Hadamard-transforming the function and measuring, any classical randomized algorithm needs queries to do appreciably better than chance. This separation is the canonical example of a search problem that is easy quantumly yet provably hard classically, and it sits within the broader forrelation family of problems known to exhibit maximal quantum-classical query gaps. As we show in Section 4, identifying mask pairs with large masked cross-correlation is precisely a cross-correlation analogue of Fourier Fishing; our classical lower bound (Theorem 1) adapts the Aaronson–Chen argument to this setting, and is to our knowledge the first such hardness result for the mask-identification task underlying linear-style distinguishers.
S. Pandey et al.
3 Masked Auto-Correlation
In this section we establish the properties of masked auto-correlation used later in the paper; several are of independent interest. We separate the exact identities, which hold for any permutation , from the distributional behavior of for a random permutation. Throughout we abbreviate to when is clear from context.
We first recall the central definitions formally; they were introduced informally in Section 1.1.
Definition 1 (Masked cross-correlation). Let be permutations, output masks, and a difference. The masked cross-correlation of is
Definition 2 (Masked auto-correlation). The masked auto-correlation of a permutation f is the case g = f of Definition 1,
written when f is clear from context.
Definition 3 (Masked auto-correlation distribution). For a fixed w, the masked auto-correlation distribution over mask pairs assigns
which is a valid distribution by Lemma 1.
3.1 Few identities
We begin with a Parseval-type identity for masked auto-correlation.
Lemma 1. For any , , and hence .
Proof.
since the terms each contribute over choices of , while for both and are non-zero strings (as is a permutation), so each inner character sum over , resp. , vanishes. Dividing by gives .
The next identity concerns zero-valued masks and follow from for any non-zero .
Lemma 2. For any w and any non-zero , , , and .
Combining Lemmas 1 and 2 gives , so there must exist with . A useful consequence for the sampling distribution is the following.
Corollary 1. The distribution never samples a pair in which exactly one of is the all-zeroes string: its support consists of pairs where either both are , which happens with probability , or both are non-zero, which happens with probability .
3.2 Distribution of MAC for a random permutation
We now describe how behaves when is a random permutation. The arguments are the standard central-limit heuristic, treating the relevant masked outputs as sums of many near-independent variables; we take so the limit applies. There are four cases, organised by whether and whether .
Case . If then identically. If then
and since , the bit behaves as a uniform random Boolean function of . The sum is therefore near-independent terms, distributed as , so after the normalization .
S. Pandey et al.
Lemma 3. For a random permutation always, and , for distinct .
Case . The trivial subcase again gives .
The two non-trivial subcases differ in their variance. If ,
and is a non-zero uniformly random string for each . Pairing each with leaves terms that can be assumed to be uniformly random and independent as , so can be approximated as times ; after the normalization, we get .
If instead ,
and for large the bits and act as independent uniform Boolean functions, giving near-independent terms and . The two subcases are summarised as follows.
Lemma 4. Let . Then , , and for .
The above results are summarised in Table 1.
| 0 | 0 | |
| 0 | 0 | |
Table 1. Values of . The last two rows correspond to a random permutation.
Next we present a few similar facts about which will be used in the hardness analysis in Theorem 1 (see Appendix A).
Lemma 5. Let . Then:
-
For , , , and .
-
For , , , and .
-
and .
The proof essentially uses properties of normally distributed variables and is available in Appendix E.
Even though we considered in this section, we will always choose a non-zero shift w for our algorithms and experiments.
4 Masked Auto-Correlation (MAC) Fishing
Masked auto-correlation gives rise to a natural search problem: among the exponentially many mask pairs , find one whose is large. We call this MAC Fishing. As we will see in Section 6, such heavy mask pairs are exactly what our distinguishers use; but the problem is of independent interest, and we study it here on its own terms. Throughout this section denotes the block cipher, and we collect the heavy pairs into the set defined below, where is an appropriately chosen threshold.
Definition 4. Define .
Mask pairs in , for a non-negligible , may be useful towards distinguishing a cipher from a random permutation. The following lemma analyzes the number of mask pairs in for a random permutation.
Lemma 6. [Distribution of ] Let and be a -bit random permutation. For a fixed threshold , each pair of masks belongs to the set with independent probability given by
The expectation and variance of is given as
where, and .
The proof of the lemma is presented in Appendix F; the lemma claims the existence of a lot of good mask pairs for a random permutation. However, it is not so obvious that there would be any at all for a cipher given the rapid diffusion they exhibit. We show an evidence to the contrary in Figure 1. Observe that lots of good mask pairs exist for a large number of keys in mini-AES irrespective of w; e.g., the left chart shows that at least 4% pairs are good for nearly 75% of the sampled keys. This provides a hope of success to our multidimensional approximation attack that requires many good mask pairs.
S. Pandey et al.


Fig. 1. Distribution of the number of keys against the number of good mask pairs in 16-bit mini-AES, averaged over all keys. A total of 512 keys were randomly selected, sufficient number of mask pairs were sampled and the proportion of good pairs estimated to 0.95 confidence (using Wilson score). was set to . The values of that were chosen were 0x0003 (top-left), 0x3009 (top-right), 0x0845 (bottom-left), 0x2504 (bottom-right).
We also show that MAC values have a wide-range of variations, even when considered across keys. E.g., the chart in Figure 2 shows different triplets with high, medium, and low values of MAC. This allows us to create -based distinguishers with different levels of .
Now we move to one of the central tasks towards constructing a MAC based distinguisher — identifying good mask pairs.
Definition 5 (Masked Auto-Correlation Fishing (MAC Fishing)). Given a constant and non-zero , the task of the MAC Fishing problem is to output any .
We will be dealing with a promised version of the above problem — is not empty. Following the terminology of Aaronson and Chen [1] where they showed a lower bound on a similarly defined Fourier Fishing problem (on Walsh-Hadamard-Fourier coefficients), we define
In Section 4.1 we present our constant-query Algorithm 1 that can solve the MAC Fishing problem with probability .

Fig. 2. Variation in the values of MAC of sample triplets across 50 random keys for 16-bit mini-AES. The root-mean-square (RMS) of the MAC values, across all keys, and with 95% confidence (Wilson's score), are shown for all triplets.
On the other hand, we were able to prove that the same task is computationally hard for a (randomized) classical algorithm, even when allowed exponentially more queries.
Theorem 1. Even given the promise that , any classical randomized algorithm for MAC Fishing succeeds with probability at most .
Using similar steps as was done for [1, Theorem 9], we are able to prove the above claim whose proof is given later in Appendix A (use to obtain the above theorem; similar separation claims can be easily obtained for any positive ). The proof of the theorem also shows that there many functions that satisfy the promise of .
4.1 Quantum Algorithm for MAC Fishing
We describe an efficient quantum sampling algorithm from in Algorithm 1. Here we use the fact that is a unitary mapping to save some qubits. We will later use this algorithm in our distinguisher.
S. Pandey et al.
Algorithm 1 MACSAMPLE: sample from
Require: quantum oracle for the permutation ; difference
Ensure: a mask pair drawn with probability
1: initialise three -qubit registers as
2: apply to register 2 uniform superposition over
3: apply CNOT(reg 2, reg 3) reg 3 holds
4: apply CNOT(reg 1, reg 3) reg 3 holds
5: apply to registers 2 and 3
6: apply to registers 2 and 3
7: measure registers 2 and 3, obtaining
8: if exactly one of equals , or both do, then discard and repeat
9: return
Correctness. On input , the registers evolve through Algorithm 1 as
Theorem 2. Algorithm 1 makes at most three queries, in expectation, and outputs a non-zero pair of masks with probability .
If line 8 is removed, it always makes two queries to and outputs a pair of masks with probability .
Proof. The final state above is the definition of , so measuring the last two registers samples with probability , i.e. exactly from .
Line 8 is used to filter out the zero masks. By Corollary 1 the amplitude vanishes whenever exactly one of is , so such pairs are never observed; the all-zero pair occurs with probability and is discarded by the repeat step, after which the output is a pair of non-zero masks. The expected number of such repetitions is .
It is straightforward to extend the circuit to sample over all jointly, by first preparing a uniform superposition over and then running the same steps, yielding
It is also possible to create a similar state but now including all possible keys in the superposition; the oracles now needs to act on the key register as well: .
Doing so, and measuring the w-register too, will allow us to sample for such that is high across all keys.
5 Masked Differential-Linear (MDL) Approximation
Let's formally introduce the notion of MDL approximations of the block cipher B which is designed similar to linear approximations of vectorial functions.
Definition 6 (Masked Differential Linear (MDL) Approximation). A (one-dimensional) masked-differential-linear approximation is the map
where is an input, are output masks and is an input-shift/difference.
The correlation, , of such an approximation is defined as
Of course, .
5.1 Single Approximation
Let's discuss how to distinguish between a cipher and a random permutation using for some pair of non-zero masks . We will assume at this point that we know the approximating masks and a lower bound on the approximations, i.e., say, . Recall that our MAC Fishing algorithm was designed to provide these information.
Observe that we can write as
so implies that
On the other hand, if is a random permutation, then it is not difficult to show that .
S. Pandey et al.
To launch an attack, randomly choose a set plaintexts, and then compute the average of for , denoted . If then the data can be assumed to come from a random permutation, else it can be predicted to have come from a block cipher and high-correlation approximation. It can shown using Chernoff's bound that classical samples are sufficient for guessing with exponentially high confidence. Using the standard quantum algorithm for counting, the number of quantum queries (to the block cipher oracle) can be reduced to [30, Sec. 7.1.1,7.2.1].
5.2 Multidimensional Approximation
Let denote a collection of (single) approximations. We will formally explain this below, but when we have to deal with multiple approximations, the idea is to focus on the value distribution of linear-combinations of the approximations, denoted , instead of . Let denote this distribution. Following existing approaches (see Section 2.4) and making use of Lemma 2, the capacity of this distribution can be determined from the correlations of . Now we formalize this notion.
Definition 7 (Multi-dimensional MDL Approximation). Fix a difference and a collection of non-zero linearly-independent mask pairs for . A multi-dimensional masked-differential-linear approximation is a -bit function that is constructed by stacking the masked differential bits,
So, each output coordinate corresponds to one mask pair . Equivalently, which is essentially a linear projection of determined by the masks.
The next lemma is well known in the literature; it connects the capacity of an MDL to the value distribution of and the sum of masked auto-correlations for a special set of mask pairs. It relies on a crucial property of this construction that every linear combination of the coordinates of is again a single masked differential approximation of f.
Lemma 7. Capacity of a multi-dimensional approximation can be expressed as the following equivalent forms. Here, denotes .
Proof. For any nonzero ,
Value distribution of f is always uniform since f represents a permutation.
with and , so that , the -masked auto-correlation of . By the Parseval identity for -valued functions, the capacity of therefore decomposes exactly into the masked cross-correlations of .
The set of masks used to calculate capacity consists of all possible non-empty linear combinations of . Thus, to ensure that every combination is used exactly once, the original set of masks should be linearly independent. That was the reason for requiring the masks to be linearly independent in Definition 7.
MDL Capacity Let's discuss how the capacity of an MDL approximation behaves for a random permutation. We follow the approach of Khan and Nyberg [31].
Let denote the -dimensional vector subspace for our masks. Without loss of generality we can assume that does not contain any with non-zero or non-zero (Lemma 2). Further, is 0, on expectation, for a random and any pair of masks; thus, , implying that . Thus, the capacity of follows a central -distribution with at most degrees of freedom.
However, we believe that the following conjecture is true, similar to one proposed by Ashur et al. [2,26].
Conjecture 1. Fix any . Let be a vector space of non-zero mask pairs. For a random block cipher , its capacity approximately follows the central distribution with degrees of freedom.
The above conjecture should hold in case all the mask pairs in L are non-zero; indeed, that holds true for the masks returned by our MACSAMPLE algorithm (Algorithm 1). In case there are zero masks in L, the degree of freedom can be appropriately reduced [2, Conjecture 1]. We also observed the conjecture to hold in our experiments, e.g., see Figure 3.
5.3 Relationship to Existing Techniques
It is important to note that our technique, for different classes of linear attacks, is a strict generalisation. It successfully captures not only the structure for these cryptanalytic attacks but even shows that the same statistical properties hold within the generalisation.
Multidimensional Linear Cryptanalysis Classical linear cryptanalysis studies approximations of the form , whose bias is measured through the correlation between input and output masks. In our setting, if we fix one of the functions to be the identity map and choose , i.e.,
S. Pandey et al.

Fig. 3. Distribution of capacity for 16-bit random permutations follow for an 8-dimensional vector space of mask pairs; u, v denotes the dimensions of zero-masks which were not used in this experiment. X-axis indicates capacity (scaled by N) and density indicate the probability density function.
then the MDL approximation reduces exactly to the standard linear approximation. Consequently, the associated multidimensional setting, where masks form a vector space and the distinguisher is based on the sum of squared correlations (capacity), is recovered naturally within our framework. Thus, multidimensional linear cryptanalysis corresponds to the special case where no input difference is introduced and one side of the approximation acts directly on the plaintext.
Differential-Linear Cryptanalysis Differential-linear cryptanalysis studies the propagation of an input difference through a cipher followed by a linear approximation on the output. In its standard form, for an input difference and output mask , one considers the bias of . Our framework generalizes this viewpoint by allowing two independent output masks across the shifted evaluations of the cipher: .
The classical differential-linear setting is recovered by taking and . Hence, differential-linear cryptanalysis appears as a restricted subclass of MDL approximations in which identical masks are enforced across the two correlated branches. By permitting arbitrary mask pairs and organizing them into vector spaces, our framework further extends naturally to a multidimensional differential-linear setting.
Differential-Linear Connectivity Table (DLCT) The Differential-Linear Connectivity Table (DLCT) can be viewed as a special case of the proposed
MDL framework. Recall that for a vectorial Boolean function , the DLCT entry corresponding to an input difference and output mask is defined as
Now consider the masked cross-correlation in our framework with , , and shift . Then,
which measures the correlation between two boolean functions by masking the output. By separating the summation into agreeing and disagreeing terms, one obtains that the DLCT entry is proportional to this differential-linear correlation value, up to normalization. Hence, the DLCT naturally emerges as a restricted instance of our MDL framework where the same function and identical masks are used. In this sense, MDL approximations strictly generalise differential-linear cryptanalysis and the DLCT formalism.
6 Distinguishers and Key-Recovery Attacks
The two preceding sections give us, respectively, a way to find high-correlation mask pairs (MAC Fishing) and a framework in which those pairs define multidimensional approximations (MDL). We now turn these into concrete cryptanalysis. We present two families of attacks. The first is a capacity-based attack whose processing is classical once masks are supplied: given a set of mask pairs it distinguishes a cipher from a random permutation and recovers a last-round subkey (Section 6.1). The second obtains good masks with the quantum MAC Fishing primitive, yielding a distinguisher and key-recovery attack whose mask-finding step has no efficient classical analogue (Section 6.2). In both families the masks originate from the same quantum sampler (Algorithm 1); the MAC-Fishing family additionally verifies each correlation quantumly. We also validate our results on a toy Simon cipher, the results described in Appendix B.
Correlation convention. Throughout this section we measure approximations by the normalised correlation of Section 5, so that for a random permutation and . Capacities and decision thresholds are stated in these units. Thresholding selects the heavy set of Section 4 (defined there in the Walsh scaling ), and a single draw of MACSAMPLE lands in it with probability . The distinguishers below use , for which a random permutation has no heavy pair with high probability (Section 6.2); this is sparser than the constant-threshold regime in which the hardness theorem is proved.
S. Pandey et al.
6.1 A Capacity-Based Block Cipher Distinguisher and Key Recovery
Capacity Based Distinguisher Algorithm The distinguisher is built upon Lemma 7 that expresses as sum of squares of masked auto-correlations for a set of carefully created masks.
It is well known that is identical to the Fourier coefficient of (value distribution of ) at ; thus, capacity measures how far that distribution deviates from uniform: a random permutation has for all masks, hence (Conjecture 1), whereas a structured cipher accumulates nonzero correlations across the mask pairs and pushes above the random baseline.
Algorithm 2 formalizes the distinguisher. It estimates empirically and thresholds it: given plaintext pairs under a fixed difference , it estimates the capacity of and compares it against a threshold to decide whether the oracle behaves as a structured cipher or a random permutation.
Algorithm 2 CAPACITY DISTINGUISHER
Require: permutation ; difference ; mask pairs ; sample count ; threshold return “cipher” or “random permutation”
1: Initialize
2: for do
3:
4:
5: Choose many uniformly at random
6: Use the sampled to estimate
7: Add to
8: end for
9: if then
10: return “cipher”
11: else
12: return “random permutation”
13: end if
The estimation of the probability in Line 6 of the algorithm can be done using both classical techniques, requiring , or quantum techniques, requiring queries to an oracle for .
We validate the effectiveness of CAPACITY DISTINGUISHER on Mini-AES. In Figure 4 we show how capacity distinguisher can identify between a random 16-bit permutation and Mini-AES for the following set of masks and .
Multidim diff-linear capacity, rounds=3: Mini-AES keys vs random perms

Fig. 4. Distributions of keys that are vulnerable to capacity based attack. The 16-dimensional multidimensional approximation was chosen earlier by identifying good mask pairs across a set of randomly chosen keys. A fresh set of 40 keys was used for this experiment to prevent any bias arising from using the same keys for attacking as that for identifying the masks. X-axis shows the capacity.
| α | β | α | β | α | β | α | β |
|---|---|---|---|---|---|---|---|
| 0x0060 | 0x0080 | 0x3000 | 0x6000 | 0x0080 | 0x0060 | 0x0003 | 0x0007 |
| 0x0250 | 0x0890 | 0x2000 | 0x1008 | 0x1002 | 0xc003 | 0x0020 | 0x0050 |
| 0x0060 | 0x0050 | 0x0100 | 0x0200 | 0xa000 | 0x3000 | 0x0050 | 0x0020 |
| 0x0410 | 0x04a0 | 0x0200 | 0x0100 | 0x0120 | 0x0890 | 0xe000 | 0x9000 |
Almost all keys led to MLD capacity of nearly 1 for a random permutation but close to 1.7 for Mini-AES. Further, the use of Wilson's lower bound for confidence lets us confidently extend the inference across all keys.
An entire pipeline of key-recovery using the capacity-based distinguisher on Simon is given in Appendix B.3.
Key Recovery on the -Round Cipher The distinguisher above, effective against the -round reduced cipher , extends to a last-round key-recovery on the -round cipher in the standard way. Write , where is the final round under the (unknown) last-round subkey and is its inverse under a guess . For each candidate define the partially decrypted oracle
so that recovers the -round structure, while for the extra mis-decrypted round randomizes (wrong-key randomization hypothesis): its masked correlations sit at the random baseline, .
S. Pandey et al.
Let be the heavy tuples produced by MACSAMPLE (Algorithm 1) on the reduced cipher — the same draws that drive the distinguisher — and abbreviate . For each we estimate the signed correlation vector .
Correlation-filter. The unsigned statistic is the average squared correlation over the template tuples,
the empirical analogue of the fishing advantage restricted to the template. Note this is the energy over the chosen tuples. Under wrong-key randomisation for , whereas since each template pair is heavy . Filtering using therefore removes the bulk of wrong guesses.
Sign degeneracy. Screening by alone does not isolate . When the last-round subkey enters the masked output bits linearly — the generic case — each component correlation factors as
where is the key mask induced by and the round structure and . The magnitudes are then key-independent, so every in the linear class shares 's energy and survives the screen as an equivalence class. What distinguishes within the class is not the magnitudes but the signs .
Signed template matching. We resolve the class by comparing the full signed vector against a reference template via cosine similarity,
which is maximized exactly when the signs of align with the template, i.e. at . The reference is the signed profile of the -round reduced cipher; since these signs depend on the inner-round keys, we obtain in the offline phase from the reduced-cipher oracle — built from the same MACSAMPLE draws that fix the template tuples — which is the known-key setting of our experiments. A fully online recovery of the sign pattern, without the reduced-cipher reference, we leave to future work.
The attack. Algorithm 3 combines the two stages: a filter discards candidates whose correlation energy is at the random baseline, and the survivors are re-ranked by the signed score (8). In our experiments this recovered the correct subkey at the top of the ranking, where the energy screen alone returned a whole equivalence class.
Algorithm 3 TEMPLATEKEYRECOVERY
Require: -round cipher ; heavy tuples from MACSAM-PLE; candidate subkeys ; reference template ; threshold ; sample count
Ensure: ranked list of last-round subkey candidates
Phase 1: score every candidate key
1: for each do
2:
3: for to do
4: estimate from pairs, with ; append to
5: end for
6: ;
7: end for
Phase 2: screen, then rank
8:
9: rank in descending order of
10: return top-ranked candidates from
Complexity Analysis We analyse the data, time, and memory of the distinguisher and the key recovery. Throughout, is the block size, the last-round subkey length (), the number of mask pairs used by the distinguisher, the number of heavy tuples returned by MACSAMPLE, and the correlation threshold defining a heavy pair . All capacities and correlations are in the normalised scale of the convention above.
Distinguisher. CAPACITYDISTINGUISHER (Algorithm 2) spends time — t inner products per sample — and memory for the histogram over , which doubles with each added mask pair, so t is kept small. The binding constraint is statistical: distinguishing the cipher from the random baseline with the capacity test requires
the multidimensional-linear data complexity of Section 2; the is the variance penalty of a -cell goodness-of-fit statistic (the test statistic has noncentrality Cap against a central of standard deviation ).
Key recovery. TEMPLATEKEYRECOVERY (Algorithm 3) estimates, for each of the candidate subkeys, the component correlations over the heavy tuples. Each estimate uses pairs: averaging values, Hoeffding gives additive error with constant confidence, which resolves a heavy correlation ( ) and, crucially, its sign for the template score. This distinct should not be confused with the distinguisher’s aggregate sample size (9). The
S. Pandey et al.
| Resource Complexity | |
|---|---|
| Data | chosen plaintext pairs |
| Time | |
| Memory | |
Table 2. Complexity of CAPACITYDISTINGUISHER (Algorithm 2).
leading time term is therefore
one partial decryption per (key, pair) and masked-bit reads each. The ciphertext pairs are queried once and reused across all candidates — only is recomputed per key — so the data cost is chosen plaintext pairs, where is the number of distinct differences among the tuples ( in the common fixed- case, where a single batch of pairs serves all correlations). The screen and signed re-ranking cost , dominated by the estimation term. Memory is : one score per candidate plus the working correlation vector.
| Resource Complexity | |
|---|---|
| Data | chosen plaintext pairs, per correlation, reused across keys |
| Time | |
| Memory | |
Table 3. Complexity of TEMPLATEKEYRECOVERY (Algorithm 3). is the number of distinct input differences.
Offline, once. Collecting the heavy tuples costs MACSAMPLE draws quantum queries each), and building the signed reference on the reduced cipher costs classical queries (or via amplitude estimation, Section 6.2). Both are paid once and amortized over all candidates.
Tradeoffs. Each is a single-round map, so the attack recovers the -bit subkey with one-round operations on data collected once — far below the cost of exhaustive search over the full key, and the standard payoff of a last-round attack. The mask budget trades linearly: more heavy tuples sharpen the separation between the correct key and the equivalence class but raise both time and memory in proportion. The threshold trades in the opposite direction: a larger admits only stronger approximations (fewer pairs per correlation, smaller) but requires the cipher to exhibit heavier correlations, while a smaller exploits weaker structure at higher data cost. The bounds above are expected costs; a rigorous treatment would bound the variance of the energy and template estimators and derive the needed for target false-positive and false-negative rates, which we leave to future work.
6.2 A MAC-Fishing-Based Block Cipher Distinguisher and Key Recovery
The attacks of this subsection use the quantum sampler of Section 4 and therefore operate in the Q2 model, in which the attacker has superposition (quantum) oracle access to the cipher [29,15]: MACSAMPLE applies to a uniform superposition, so the mask-finding step has no classical analogue. Where we report a “classical verification” cost we mean replacing the amplitude-estimation substep with classical sampling against the same oracle — the fishing step still requires Q2 access.
MAC-Fishing-Based Block Cipher Distinguisher The distinguisher separates a structured cipher from a random permutation in two phases. Phase 1 runs MACSAMPLE (Algorithm 1), which with a constant number of queries returns a candidate drawn ; for a structured cipher it lands in the heavy set with probability . Fishing alone does not certify the candidate — a single draw could be a spurious low-correlation pair — so Phase 2 verifies it by estimating and testing . The full distinguisher is assembled in Algorithm 4.
Algorithm 4 MACFISHINGDISTINGUISHER
Require: quantum oracle ; difference ; threshold ; precision
Ensure: “cipher” or “random permutation”
1:
▷ Algorithm 1, quantum queries
2:
▷ or CLASSICALVERIFY (App. C)
3: if then
4: return “cipher”
5: else
6: return “random permutation”
7: end if
Verification is where the precision speed-up enters. To place the decision at on the squared correlation we need to additive error . Classically this costs samples (Hoeffding); quantumly, amplitude estimation reaches the same precision in queries. Algorithm 5 states the quantum verifier: it phase-encodes into a uniform superposition, so the amplitude on is exactly , and reads that signed amplitude off by a Hadamard test with amplitude estimation. When only classical query access is available the verification falls back to classical sampling (CLASSICALVERIFY, Appendix C) at the quadratically worse cost .
Completeness of the distinguisher rests on the fishing advantage; soundness rests on a random permutation having no heavy pair to find. For uniformly random and , , so for any fixed nonzero
S. Pandey et al.
Algorithm 5 QUANTUMVERIFY
Require: quantum oracle for ; difference ; mask pair ; precision
Ensure: signed estimate to additive error
1: define the Boolean phase function
2: prepare calls to ;
3: estimate the signed overlap to additive error by a Hadamard test with amplitude estimation queries
4: return
pair
by the Gaussian tail bound. A union bound over the mask pairs gives
negligible once (e.g. ). The heavy set is then empty for a random permutation with high probability, Phase 2 rejects whatever Phase 1 returns, and the false-positive rate is negligible — the threshold regime announced in the convention above.
Complexity of the MAC-Fishing distinguisher.
Proposition 1 (Complexity of MACFISHING DISTINGUISHER). Let be the probability that one MACSAMPLE draw satisfies , and let . Algorithm 4 uses quantum queries in Phase 1 and in Phase 2, succeeding per run with probability . Amplifying by repetitions gives total query complexity
Proof. Phase 1 returns a candidate in queries (Algorithm 1), heavy with probability adv. Phase 2 estimates to error : amplitude estimation in queries, classical sampling in . The random-permutation false-positive bound is the union bound above. Repeating times amplifies success to a constant and yields (10).
The factor 1/adv is the binding cost — the draws needed to land a heavy pair — and is small exactly when the cipher concentrates its correlation mass. Phase 1 has no classical analogue: locating a heavy pair is the MAC-Fishing problem, classically hard by Theorem 1. That theorem is proved in the dense regime , whereas the distinguisher runs at the sparser ; there the classical obstruction remains the exponential search over the mask space, though the precise bound is stated only for the dense threshold. Table 4 summarizes the complexities.
| Phase | Quantum queries | Classical verification |
|---|---|---|
| Phase 1: MACSAMPLE (Alg. 1) | — | |
| Phase 2: correlation verification | ||
| Single run, total | ||
| With repetition (succ. ) |
; false positive negligible for ; false negative .
Table 4. Query complexity of MACFISHINGDISTINGUISHER.
Key Recovery on the -Round Cipher We extend the distinguisher to a last-round key recovery on the -round cipher , in two phases. The offline phase, run once, builds a correlation template: heavy tuples verified to lie in for the -round reduced cipher , with their signed reference correlations . The online phase, per candidate subkey , forms the partially decrypted oracle and scores how well its profile matches the template. When , and the profile matches; wrong guesses randomize (wrong-key randomization), giving correlations at the baseline.
As in the classical case (Section 6.1), a single heavy mask suffices to distinguish, but key recovery must separate from the equivalence class of wrong keys that share its magnitudes (hence its unsigned energy) while differing in sign. We score with the signed cosine similarity
where and is the signed estimate of from QUANTUMVERIFY (with classical query access only, the scoring falls back to CLASSICALKEYSCORE, Appendix C). The signed reference carries the inner-key-dependent signs and is obtained offline from the reduced cipher, as discussed in Section 6.1.
Offline phase. A MACSAMPLE draw is heavy with probability , so collecting verified heavy tuples takes iterations, each to fish and to verify; the offline cost is quantum queries to , paid once (Algorithm 6).
Online phase. Given , each candidate is scored by estimating on and applying (11). An unsigned energy pre-filter discards the non-structured guesses (template correlations at the baseline), and the survivors are re-ranked by the signed score.
The Attack Algorithm 7 assembles the offline and online phases into complete attack
S. Pandey et al.
Algorithm 6 TEMPLATE ESTABLISHMENT
Require: quantum oracle for the -round reduced cipher; threshold ; template size ; precision
Ensure: template and reference
1: ,
2: repeat
3: joint sampler, Section 4
4:
5: if and then
6: append to and to
7: end if
8: until
9: return ,
Algorithm 7 MACFISHINGKEYRECOVERY
Require: -round quantum oracle ; -round oracle (offline); candidate subkeys , ; threshold ; template size ; precision
Ensure: ranked list of last-round subkey candidates
1: offline
2: for each do
3:
4: for to do
5: define for
6: ; append to classical: CLASSICALKEYSCORE (App. C)
7: end for
8: ;
9: end for
10: energy pre-filter
11: rank in descending order of
12: return top-ranked candidates from
Complexity of the MAC-Fishing Key Recovery.
Proposition 2 (Complexity of MACFISHINGKEYRECOVERY). With and , the offline phase costs quantum queries to and the online phase quantum queries to , for a total of
When the offline term is dominated and the total is ; the quantum improvement over classical verification is the quadratic factor, with the enumeration unchanged (Remark 2).
Proof. Template establishment performs fishing iterations to collect verified heavy tuples (each draw heavy with probability ), at to fish and to verify per iteration, giving . Online, QUANTUMVERIFY estimates the fixed template correlations per key at each over keys (no fishing), giving ; classically each estimate is . Summing yields (12).
| Phase | Quantum queries | Classical verification |
|---|---|---|
| Offline: template establishment | ||
| Online: score each | ||
| Online: ranking | ||
| Total |
Table 5. Query complexity of MACFISHINGKEYRECOVERY.
Remark 2 (Grover-accelerated key search). In the Q2 model the linear scan over can be replaced by Grover search with a marking oracle testing the energy pre-filter , reducing the enumeration from to for a combined speed-up. Two caveats. First, the energy test is sign-blind, so Grover returns a member of the high-energy equivalence class rather than ; the signed disambiguation (11) must still be applied among the marked candidates. Second, the marking oracle nests amplitude estimation — a bounded-error, measurement-based subroutine — inside Grover, so it must be made coherent and amplified to failure probability (e.g. by probability filtering [6] or a QSVT reformulation [21]) for the diffusion to remain valid. We leave a rigorous treatment of this composition to future work and state the amplitude-estimation-only bound as our result.
References
-
Aaronson, S., Chen, L.: Complexity-theoretic foundations of quantum supremacy experiments. In: Proceedings of the 32nd Computational Complexity Conference. CCC '17, Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, DEU (2017)
-
Ashur, T., Khan, M., Nyberg, K.: Structural and statistical analysis of multidimensional linear approximations of random functions and permutations. IEEE Transactions on Information Theory 68(2), 1296–1315 (Feb 2022). https://doi.org/10.1109/tit.2021.3128618, http://dx.doi.org/10.1109/TIT.2021.3128618
-
Baignères, T., Junod, P., Vaudenay, S.: How far can we go beyond linear cryptanalysis? In: ASIACRYPT 2004. LNCS, vol. 3329, pp. 432–450. Springer (2004)
-
Baignères, T., Stern, J., Vaudenay, S.: Linear cryptanalysis of non binary ciphers. In: SAC 2007. LNCS, vol. 4876, pp. 184–211. Springer (2007)
S. Pandey et al.
-
Bar-On, A., Dunkelman, O., Keller, N., Weizman, A.: DLCT: A new tool for differential-linear cryptanalysis. Cryptology ePrint Archive, Paper 2019/256 (2019), https://eprint.iacr.org/2019/256
-
Bera, SAPV, T.: Low-space Quantum Algorithms for Estimate-Mark-Amplify Tasks. In: Proceedings of the 25th Italian Conference on Theoretical Computer Science Torino, Italy, September 11-13, 2024. vol. 3811, pp. 42–65. CEUR Workshop Proceedings, Torino, Italy (2024), https://ceur-ws.org/Vol-3811/paper260.pdf
-
Beyne, T.: Linear cryptanalysis of FF3-1 and FEA. In: CRYPTO 2021, Part I. LNCS, vol. 12825, pp. 41–69. Springer (2021)
-
Biham, E., Dunkelman, O., Keller, N.: Enhancing differential-linear cryptanalysis. In: ASIACRYPT. LNCS, vol. 2501, pp. 254–266. Springer (2002)
-
Biham, E., Shamir, A.: Differential cryptanalysis of DES-like cryptosystems. In: CRYPTO. LNCS, vol. 537, pp. 2–21. Springer (1991)
-
Biryukov, A., De Cannière, C., Quisquater, M.: On multiple linear approximations. In: CRYPTO 2004. LNCS, vol. 3152, pp. 1–22. Springer (2004)
-
Blondeau, C., Leander, G., Nyberg, K.: Differential-linear cryptanalysis revisited. In: FSE. LNCS, Springer (2014)
-
Bogdanov, A., Leander, G., Nyberg, K., Wang, M.: Integral and multidimensional linear distinguishers with correlation zero. In: ASIACRYPT 2012. LNCS, vol. 7658, pp. 244–261. Springer (2012)
-
Bogdanov, A., Rijmen, V.: Linear hulls with correlation zero and linear cryptanalysis of block ciphers. Designs, Codes and Cryptography 70(3), 369–383 (2014)
-
Bogdanov, A., Wang, M.: Zero correlation linear cryptanalysis with reduced data complexity. In: FSE 2012. LNCS, vol. 7549, pp. 29–48. Springer (2012)
-
Boneh, D., Zhandry, M.: Secure signatures and chosen ciphertext security in a quantum computing world. In: Advances in Cryptology – CRYPTO 2013. Lecture Notes in Computer Science, vol. 8043, pp. 361–379. Springer (2013)
-
Brassard, G., Høyer, P., Mosca, M., Tapp, A.: Quantum amplitude amplification and estimation. Contemporary Mathematics 305, 53–74 (2002)
-
Chabaud, F., Vaudenay, S.: Links between differential and linear cryptanalysis. In: EUROCRYPT. LNCS, vol. 950, pp. 356–365. Springer (1994)
-
Cho, J.Y.: Linear cryptanalysis of reduced-round PRESENT. In: CT-RSA 2010. LNCS, vol. 5985, pp. 302–317. Springer (2010)
-
Courtois, N., Meier, W.: Algebraic attacks on stream ciphers with linear feedback. In: Advances in Cryptology – EUROCRYPT 2003. Lecture Notes in Computer Science, vol. 2656, pp. 345–359. Springer (2003)
-
Daemen, J., Rijmen, V.: Probability distributions of correlation and differentials in block ciphers. Journal of Mathematical Cryptology 1(3), 221–242 (2007)
-
Gilyén, A., Su, Y., Low, G.H., Wiebe, N.: Quantum singular value transformation and beyond: Exponential improvements for quantum matrix arithmetics. In: Proceedings of the 51st Annual ACM Symposium on Theory of Computing (STOC). pp. 193–204. ACM (2019)
-
Hermelin, M., Cho, J.Y., Nyberg, K.: Multidimensional extension of Matsui's Algorithm 2. In: Fast Software Encryption (FSE 2009). LNCS, vol. 5665, pp. 209–227. Springer (2009)
-
Hermelin, M., Cho, J.Y., Nyberg, K.: Multidimensional extension of Matsui's algorithm 2. In: FSE 2009. LNCS, vol. 5665, pp. 209–227. Springer (2009)
-
Hermelin, M., Cho, J.Y., Nyberg, K.: Multidimensional linear cryptanalysis. Journal of Cryptology 32(1), 1–34 (2019)
-
Hermelin, M., Nyberg, K.: Multidimensional linear distinguishing attacks and Boolean functions. In: Fourth International Workshop on Boolean Functions: Cryptography and Applications (BFCA) (2008)
-
Hosoyamada, A.: Quantum speed-up for multidimensional (zero correlation) linear distinguishers. In: ASIACRYPT 2023. LNCS, Springer (2023)
-
Hosoyamada, A., Sasaki, Y.: Quantum Demiric-Selçuk Meet-in-the-Middle Attacks: Applications to 6-Round Generic Feistel Constructions, p. 386–403. Springer International Publishing (2018). https://doi.org/10.1007/978-3-319-98113-0_21, http://dx.doi.org/10.1007/978-3-319-98113-0_21
-
Kaliski Jr., B.S., Robshaw, M.J.B.: Linear cryptanalysis using multiple approximations. In: CRYPTO 1994. LNCS, vol. 839, pp. 26–39. Springer (1994)
-
Kaplan, M., Leurent, G., Leverrier, A., Naya-Plasencia, M.: Breaking symmetric cryptosystems using quantum period finding. In: Advances in Cryptology – CRYPTO 2016. Lecture Notes in Computer Science, vol. 9815, pp. 207–237. Springer (2016)
-
Kaplan, M., Leurent, G., Leverrier, A., Naya-Plasencia, M.: Quantum differential and linear cryptanalysis. IACR Transactions on Symmetric Cryptology 2016(1), 71–94 (2016)
-
Khan, M., Nyberg, K.: Linear approximations of random functions and permutations. IACR Cryptology ePrint Archive (2019), report 2019/1041
-
Kuwakado, H., Morii, M.: Quantum distinguisher between the 3-round Feistel cipher and the random permutation. In: IEEE International Symposium on Information Theory – ISIT 2010. pp. 2682–2685. IEEE (2010)
-
Langford, S.K., Hellman, M.E.: Differential-linear cryptanalysis. In: CRYPTO. LNCS, vol. 839, pp. 17–25. Springer (1994)
-
Matsui, M.: Linear cryptanalysis method for DES cipher. In: EUROCRYPT. LNCS, vol. 765, pp. 386–397. Springer (1993)
-
Murphy, S.: The independence of linear approximations in symmetric cryptanalysis. IEEE Transactions on Information Theory 52(12), 5510–5518 (2006)
-
Nyberg, K.: Affine linear cryptanalysis. Cryptography and Communications 11(3), 367–377 (2019)
-
Rao, J.N.K., Thomas, D.R.: Chi-squared tests for contingency tables. In: Skinner, C.J., Holt, D., Smith, T.M.F. (eds.) Analysis of Complex Surveys, pp. 89–104. John Wiley & Sons (1989)
-
Simon, D.R.: On the power of quantum computation. SIAM Journal on Computing 26(5), 1474–1483 (1997)
-
Sun, B., Liu, Z., Rijmen, V., Li, R., Cheng, L., Wang, Q., AlKhzaimi, H., Li, C.: Links among impossible differential, integral and zero correlation linear cryptanalysis. In: CRYPTO 2015, Part I. LNCS, vol. 9215, pp. 95–115. Springer (2015)
A Proof of Theorem 1
Preface: The proof of the theorem closely follows the steps of Theorem 9 of Aaronson and Chen [1]. That theorem shows a similar hardness for the promise Fourier Fishing problem. In that problem the objective is to “fish” some with a high-valued Fourier coefficient ; in contrast, the objective of MAC Fishing is to output some such that .
Below we present the proof for the sake of completeness; in particular, we point out the differences that arise due to masked cross-correlation. We follow a
S. Pandey et al.
similar line of reasoning and many steps and results will seem repetitive – those are included in entirety to have the entire proof at one place and further, allow a reader to apply the approach on other similar sampling problems.
Proof (Proof of Theorem). The entire proof relies on Lemma 8 and Lemma 9 which are given below.
By way of contradiction, suppose there is a randomized algorithm A that solves the promise version of MAC Fishing with probability yet makes only queries to B.
Lemma 8 says that when is randomly chosen from all -bit permutations, is at least with at least probability. Thus, fraction of -bit permutations satisfy . These fractions satisfy the promise stated in the theorem, and thus, can solve all of them using queries and with a success probability .
Thus, when B is randomly chosen from all n-bit permutations, as is done in Lemma 9, A can solve the MAC Fishing problem on it using queries with probability at least
This contradicts Lemma 9.
Next we present the key technical lemmas required for the above theorem. We require the following facts and notations to simplify certain expressions. should be considered as positive in this section.
- . This is since (i) , and so , and (ii) since the second moment involves an even function, for positive , , and so .
Lemma 8. The following holds for large n, positive , and a randomly chosen permutation B.
-
which is between and .
-
OR \mathrm{adv}(w,\tau)\geq\mathrm{Succ}_Q(\tau)+\frac{2}{n}\right]\leq\frac{48.5n^2}{N}.
Proof. Let's first compute .
Distribution of adv: Recall that behaves like if and like if (Lemma 4).
Next define
This allows us to write
Since behaves like a normal variable and iff that normally distributed variable is outside of , is random variable that behaves like outside of the range and 0 inside; here, if and 2 if .
Expectation of adv: Consider the case of which happens with probability .
Next, consider the case of which happens with probability . Here, with probability density .
S. Pandey et al.
Thus,
(13)
Recall that,
Therefore, .
Variance of adv: Next, we will compute . We already have the subtrahend:
So, let's compute the minuend .
Let's focus on .
There are multiple possibilities here.
Case : In this case, which happens with probability , and . If , , otherwise, . Using the fact that is the fourth moment of , we can bound the desired expectation for different sub-cases.
Thus,
Sub-case :
where, the integration by parts is done using , . Using that fact that and attains a maximum value less than 1.2 for positive , it can be verified that .
Sub-case :
Using that fact that and attains a maximum value less than 3.7 for positive , it can be verified that .
Therefore, combining both sub-cases for case , we have:
Case : This case happens with probability .
Define two sets A and D as follows:
Observe that and are disjoint and with for a random permutation. Use these sets to define the following sums.
S. Pandey et al.
Distribution of and Let's understand these random variables. First, observe that and are independent since they depend on disjoint inputs (A vs D). Next, for a random B, both following normal distribution with 0 mean. They both have the same variance which is 1 if and 2 if . Let denote this variance.
Now, let's write
Observe that implies that ; we get a similar bound for the other expression as well.
Next, let's see how to compute the expectation of the following multivariate expression.
Denoting by A and by D, the integral we want to evaluate is
where is the probability density of . Two subcases arise due to two different in lemma 4. So, we will have two different density functions.
Subcase 1:
In this case, which implies that with individual marginal probability density function .
Taking , , we get . Thus, the above equation can be written as
Here, we have used the fact that
Subcase 2:
In this case, which implies that with individual marginal probability density function . Then, the expectation becomes:
Now, combining the two cases, we have:
S. Pandey et al.
Since, by definition of we have , we get the following bound on variance.
From (13), we have .
Concentration bound: We have already proved that (Equation 13)
We want to use Chebyshev's inequality to bound the probability of lying outside a larger range, namely or . Observe that implies that since .
(For )
For the next lemma, we use the well-known bound on the CDF of a standard normal random variable Z where t > 0.
Lemma 9. For large n and B chosen randomly from n-bit permutations, no randomized algorithm with queries can solve MAC Fishing with probability .
Proof. The proof will be based on contradiction. We will prove the claim for a deterministic algorithm A that make exactly t queries, for some . The result generalizes to randomized algorithms using Yao's minimax principle.
Let denote the set of queries made by . For each define the following:
(estimate of based on seen queries, from )
(estimate of based on unseen inputs)
Observe that . Then, can be expressed as
The following claims are different from Aaronson and Chen since they depend on masked cross-correlation values.
Claim. For a randomly chosen , is low for all pairs of with high probability.
Recall that for and for .
Consider the case when which can happen for pairs. Then,
Next, consider the case of . There are exactly N such pairs. Then too, the above probability can be written as
Thus, the probability that there exists some for which can be upper bounded using union bound.
S. Pandey et al.
This proves the claim that
Let's define the event LOWSEEN: for all . Therefore, . Now, lets focus on the possible accuracy of unseen part of .
Claim. For every and a randomly chosen , is low with high probability.
This is expected since does not depend on the answers of any query made by irrespective of the pair of masks. Thus, for and for . For both the cases,
This proves the claim.
The rest of the proof follows the exact same steps as Aaronson and Chen.
Suppose that A has output some specific . We will show that A most likely miscalculated the masked pairs; the masked cross-correlation for that pair is not high at all.
Let's consider the case that LOWSEEN happens for some B. We know from Equation 14 that for a random B in that case,
Therefore,
The right hand side is upper bounded by and this puts a bound on being a good mask pair, synonymously, A being successful. Now we combine both the scenarios of LOWSEEN happening and not happening.
This ends the proof of the lemma.
☐
B Experimental Validation
We validate the constructions of Section 6 on a deliberately small cipher. For the capacity-family stages every quantity — the full masked auto-correlation spectrum, the capacity, and the key-recovery scores — is computed exactly by enumeration; for the quantum MAC-fishing stages we additionally simulate the two primitives the attack relies on. The aim is to confirm that the pipeline behaves as the theory predicts: that the masked auto-correlations follow the baseline of Section 2, that the capacity separates the cipher from a random permutation at the predicted data complexity, and that the signed template recovers the last-round subkey where the unsigned energy cannot. We do not run quantum hardware: MACSAMPLE is simulated by computing the exact distribution (the normalized spectrum ) and sampling from it, and QUANTUMVERIFY by perturbing the exact signed correlation with additive Gaussian noise of width (its amplitude-estimation precision), so what we validate are the statistics Algorithms 1 and 5 would produce. The signed reference is read from the reduced cipher under the known key, the known-key validation setting of Section 6.1.
B.1 A toy Simon-like cipher
We use a Feistel cipher in the style of Simon with 6-bit words, hence block size ( ). Writing the state as and for left rotation by within a word, one round maps
with a 6-bit round key (the rotation constants are the Simon pattern scaled to a 6-bit word ). The reduced cipher is rounds under fixed round keys; the target appends one further round under a secret last-round subkey , so and the last-round subkey space is bits (64 candidates). All correlations below are the normalized of Section 5; for a random permutation , equivalently .
B.2 Masked auto-correlation spectrum and sampling
For a fixed difference the entire spectrum is the Walsh–Hadamard transform of the distribution of , so all values are obtained exactly in one transform. Sweeping and ranking by the strongest non-trivial pair selects . Figure 5 plots the spectrum of a random permutation at this : it matches the predicted baseline of Section 2 — for off-diagonal pairs and the heavier for diagonal pairs . Against this baseline the reduced cipher concentrates its correlation in a handful of heavy pairs, listed in Table 6 and reaching , far into the tails; the heaviest are diagonal pairs, exactly the differential-linear (DLCT) entries of
S. Pandey et al.
Section 5. Figure 6 illustrates the simulated quantum MACSAMPLE. Sampling over the full spectrum is bulk-dominated — by Parseval the pairs each carry , so the heavy pairs are a vanishing fraction of the total mass — which is precisely why the quantum sampler relies on amplitude amplification to concentrate on the heavy set . Conditioned on the returned pair is distributed , which the empirical draws reproduce, as Algorithm 1 prescribes.

Fig. 5. Masked auto-correlation spectrum Fig. 6. Simulated quantum MACSAM-at PLE conditioned on the heavy set .
| w | α | β | cor | |
|---|---|---|---|---|
| 0x8f | 0x01 | 0x01 | -0.3750 | 576.0 |
| 0x8f | 0x03 | 0x03 | +0.1875 | 144.0 |
| 0x8f | 0x23 | 0x56 | +0.1719 | 121.0 |
| 0x8f | 0x74 | 0x23 | +0.1719 | 121.0 |
| 0x8f | 0x23 | 0x74 | +0.1719 | 121.0 |
| 0x8f | 0x5d | 0x7f | +0.1719 | 121.0 |
Table 6. Heaviest masked auto-correlation tuples of the reduced toy cipher (baseline ).
B.3 The capacity distinguisher
For the capacity distinguisher we stack pairs into the projected function . The heaviest pairs are the diagonal DLCT entries of Table 6, but a diagonal pair carries the variance-2 baseline of Section 2, and diagonal linear combinations would inflate the degrees of freedom of the null; we therefore take the heaviest off-diagonal pairs whose masks are linearly independent, so that every nonzero combination is off-diagonal and the null is a clean . This gives capacity for the cipher () against the random baseline . Figure 7 plots the statistic over 4000 random permutations: it matches the predicted density (empirical mean 15.1 against ), while the cipher lies far beyond the entire null. Figure 8 shows the empirical distinguishing success against the number of plaintext pairs ; reliable distinguishing sets in at a small constant multiple of the predicted scaling pairs (dashed line), consistent with the law of Equation (9).

Fig. 7. Capacity distinguisher at , off-diagonal independent pairs. Histogram of over random permutations with the density; the cipher ( ) is far off-scale to the right.

Fig. 8. Distinguishing success versus data N. The dashed line marks the predicted complexity .
B.4 Last-round key recovery
Finally we recover the last-round subkey of the 5-round cipher . Because the Simon subkey enters the masked output bits as a constant phase, with key-mask on the subkey word, so the magnitudes — and hence the energy — are exactly identical for all 64 candidates (measured spread 0). The energy screen therefore carries no key information whatsoever: all of it lives in the signs. The diagonal pairs that dominated the distinguisher have and are key-blind; we build the key-recovery template instead from off-diagonal heavy pairs whose key-masks are linearly independent ( ). With this template the signed cosine score of Equation (8) is maximised on the single coset , recovering the true subkey uniquely. Figure 9 contrasts the flat energy profile with the sharply peaked signed score, and Table 7 ranks the top candidates. Had the template masks failed to span, the score would instead recover up to the coset — the residual ambiguity is exactly bits, the standard key-information limit of a masked linear attack.
B.5 The MAC-fishing distinguisher
The capacity stages above used the classical pipeline of Section 6.1: enumerate the spectrum, rank, aggregate. We now validate the quantum MAC-fishing pipeline of Section 6.2, which replaces enumeration by sampling and exact correlations by amplitude-estimated ones, simulating its two primitives classically. MACSAMPLE returns a pair drawn from the heavy set (the amplitude-amplified output of Section B.2); at threshold the heavy set has pairs and density
S. Pandey et al.

Fig. 9. Last-round key recovery over the 64 candidate subkeys. Left: the energy is identical for every candidate. Right: the signed score peaks uniquely at the true subkey (highlighted).
| k | adv(k) | Score(k) |
|---|---|---|
| 2 | 0.0227 | +1.0000 ← k* |
| 10 | 0.0227 | +0.7709 |
| 41 | 0.0227 | +0.7414 |
| 22 | 0.0227 | +0.6770 |
| 44 | 0.0227 | +0.6770 |
| 54 | 0.0227 | +0.5669 |
Table 7. Last-round key recovery. The energy is identical for all candidates (key-independent magnitudes), so the screen alone is uninformative; the signed score singles out when the template key-masks span the subkey space.
, whose inverse is the amplification overhead. QUANTUMVERIFY (Algorithm 5) returns a signed estimate of to additive precision in queries; resolving membership in , i.e. , fixes the budget at queries here). We model it as and study the pipeline as varies.
The MACFISHINGDISTINGUISHER (Algorithm 4) draws pairs, verifies each, and thresholds the averaged energy . For the cipher these are genuine heavy pairs; a random permutation has no heavy set, so its verified correlations are plus the noise floor. Figure 10 (left) shows the two statistic distributions at : they separate cleanly, and at a false-positive operating point the cipher is detected with probability 0.88, in line with the Gaussian union bound of Proposition 1. The right panel sweeps the verification precision: detection is near-certain for and degrades once the noise floor overtakes the heavy energy.
B.6 MAC-fishing key recovery
Key recovery reuses the spanning template of Section B.4 ( off-diagonal pairs, ) but now obtains its correlations from QUANTUMVER-

Fig. 10. MAC-fishing distinguisher. Left: averaged verified energy for the cipher and for random permutations at , with the 1% false-positive threshold. Right: detection rate versus QUANTUMVERIFY precision (query cost ); the minimal budget is marked.
IFY. TEMPLATEESTABLISHMENT (Algorithm 6) fixes the same-key signed reference offline at high precision; for each subkey candidate, MACFISHINGKEYRECOVERY (Algorithm 7) verifies the template on the peeled cipher and scores it against by the signed cosine of Equation (11). As before the energy is exactly key-blind (measured spread 0); recovery rests entirely on the verified signs.
Figure 11 (left) shows the score profile: at an adequate budget the true subkey is the unique maximum. The right panel sweeps and exposes a precision requirement sharper than the distinguisher's: because recovery must resolve correlation signs rather than aggregate energy, it needs below the template magnitude . At the distinguisher's budget recovery is only marginal (0.68), whereas halving (doubling the query cost) makes it reliable ( ). The gap is structural: the heaviest correlations of this cipher span only a rank-2 subspace of the subkey-mask space, so four of the six key directions ride on weaker correlations that demand finer amplitude estimation. The Grover-style search of Remark 2 marks on this same signed score and, as there, returns the recovered coset rather than a unique unless the template masks span.
These experiments reproduce, on a genuine cipher structure, the two phenomena that shape Section 6: the capacity aggregates the heavy masked autocorrelations into a clean distinguisher at the predicted data complexity, and the last-round subkey is invisible to the unsigned energy but recovered exactly by the signed template once its masks span the subkey space. The MAC-fishing stages reproduce the same two attacks under the quantum primitives of Section 6.2 — sampled heavy pairs and amplitude-estimated signed correlations — and expose a precision hierarchy between them: distinguishing tolerates the minimal budget, while sign-based key recovery requires finer verification.
S. Pandey et al.

Fig. 11. MAC-fishing key recovery over the 64 subkeys. Left: signed score Score(k) at , peaking uniquely at . Right: recovery success versus QUANTUMVERIFY precision , with and the template magnitude marked.
C Classical Verification and Scoring for MAC Fishing
These are the classical Phase-2 procedures for the MAC-Fishing attacks of Section 6.2.
Algorithm 8 CLASSICALVERIFY
Require: oracle ; difference ; candidate mask pair ; sample count
Ensure: estimated squared correlation
1:
2: for to do
3: Choose uniformly at random
4: ,
5:
6: end for
7:
8: return
D Use of Wilson's Score
The estimation problem. Each candidate approximation has an unknown support probability
the fraction of keys for which its correlation clears the random-permutation floor (here and ). From a sample of keys we observe successes and the point estimate ; we want a one-sided lower confidence
Algorithm 9 CLASSICALKEYSCORE
Require: plaintext-ciphertext oracle ; difference w; key guess k; template ; reference vector ; sample count N
Ensure: scores , , Score(k)
1:
2: for to m do
3:
4: for to N do
5: Choose uniformly at random
6: ,
7: ,
8:
9: end for
10: append to
11: end for
12:
13:
14: Score(k)
15: return , , Score(k)
bound on so that we can keep a pair only when we are confident its true support exceeds a threshold.
The Wilson score interval. The Wilson interval is obtained by inverting the score test rather than the Wald test. Testing with the score statistic and collecting all not rejected at level gives
a quadratic inequality in p,
Solving the quadratic yields an interval centred at with the half-width below; the one-sided lower bound is
(clamped at 0). Three properties matter for the acceptance criteria: the bound always lies in ; its small-sample coverage is far better than Wald's; and the terms pull the estimate toward 1/2, i.e. the bound is conservative for a high target which makes it conservative when accepting or rejecting against a threshold. The experiment uses (a one-sided 95%
S. Pandey et al.
bound, appropriate for a one-sided “” claim) and accepts a pair only when .
Several of our experiments share one statistical structure. Each estimates the fraction of a population too large to enumerate either the key space, or a part of total mask pairs. On these differential-linear approximation needs to clears a fixed threshold, where either the key or the mask-pairs are sampled uniformly at random and counting successes. Every draw is classified by a cross-correlation evaluated exactly over all inputs rather than sub-sampled, so the per-draw outcome is noise-free and the success count is a clean binomial of i.i.d. trials; a Wilson interval therefore applies directly to the proportion and, after rescaling, to the population count itself. The estimate stays informative only because each threshold is pinned to the random-permutation noise floor (per-correlation variance ), fixing the qualifying fraction at a modest tail mass independent of block size instead of letting it vanish exponentially, so a uniform sample reliably lands in the set. Since the interval captures only the sampling uncertainty of a single estimate, any spread observed across keys or input differences is separated from it and read as genuine population variation against that same baseline.
E Proof of Lemma 5
Lemma 5. Let . Then:
-
For , , , and .
-
For , , , and .
-
and .
Proof. The first two cases follow directly from the fact that if , then follows a distribution with degree of freedom 1, and that has mean 1 and variance 2.
For the 3rd case, we will simply average the above values over all ; among those pairs, there are pairs with and pairs with . We will also require which can be obtained from and .
-
For , .
-
For , .
F Proof of Lemma 6
Lemma 6. [Distribution of ] Let and be a -bit random permutation. For a fixed threshold , each pair of masks belongs to the set with independent probability given by
The expectation and variance of is given as
where, and .
Proof. By Definition 4, we have
So,
Note that . So:
Case 1: .
S. Pandey et al.
Case 2: . . So, we can write in terms of standard normal random variable as, , where .
Combining both cases, we get
Expectation of
where, and .
Variance of are independent for different pairs of , so the indicator functions are independent across different mask pairs and thus the covariance terms vanish. Using the fact that the variance of a Bernoulli(p) random variable is equal to , we get the variance of as