---
title: Hidden Shift Problem in Quantum Computing
url: https://www.emergentmind.com/topics/hidden-shift-problem
type: topic
---

# Hidden Shift Problem in Quantum Computing

The hidden shift problem asks one to recover an unknown shift \(s\) from oracle access to two functions related by translation, typically in the form \(g(x)=f(x+s)\) on a group \(G\). In its standard discrete form, \(G\) is usually finite and abelian, but the problem also appears over nonabelian groups, continuous domains such as \(\mathbb{R}^n\), and in oracle models tailored to cryptography and quantum query complexity. Its importance in quantum computing comes from two complementary facts: over \(G=(\mathbb{Z}/2)^n\), Simon’s algorithm solves the problem efficiently, whereas over groups such as \(\mathbb{Z}/2^n\) and many nonabelian families no comparable efficient quantum algorithm is known; and, at the same time, hidden-shift structure underlies both positive algorithmic results and quantum attacks on symmetric-key constructions [1610.01187] [1904.06225].

## 1. Formal definitions and principal variants

Let \(G\) be a finite group with operation \(\star\) and identity \(e\), and let \(S\) be an arbitrary set. For \(s \in G\), the left-translation \(L_s:G\to G\) maps \(x \mapsto s \star x\). In the search hidden shift problem \(HS_G\), one is given oracle access to functions \(f,g:G\to \{0,1\}^{\ell(|G|)}\) with the promise that there exists \(s \in G\) such that \(g(x)=f(s \star x)\) for all \(x \in G\), and the task is to output \(s\). In additive notation on abelian groups, this becomes \(g(x)=f(x+s)\). Typical instantiations include \(G=(\mathbb{Z}/2)^n\), where the operation is bitwise XOR, and \(G=\mathbb{Z}/2^n\), where the operation is modular addition [1610.01187].

Two standard average-case formulations are the Random Hidden Shift problem \(RHS_G\), in which \(f\) is uniform over all functions and \(s\) is uniform in \(G\), and the Decisional Random Hidden Shift problem \(DRHS_G\), in which one must distinguish the case where \(f\) and \(g\) are independent uniform random functions from the case where \(g(x)=f(s \star x)\) for some unknown \(s\) [1610.01187]. For \(DRHS_G\), the usual formulation specifies completeness and soundness errors; for search versions, completeness can be measured either relative to a fixed \(f\) or averaged over random \(f\) [1610.01187].

A prominent specialization is the Boolean hidden shift problem. Here \(f:\{0,1\}^n\to\{0,1\}\) is known, oracle access is given to \(f_s(x)=f(x+s)\), and the task is to determine the \(n\)-bit string \(s\). In phase form, with \(g(x)=(-1)^{f(x)}\), the Walsh–Hadamard transform and autocorrelation of \(g\) govern the quantum query complexity [1304.4642]. The non-injective version drops injectivity of \(f\) and \(g\); a simple “injectivization” construction replaces \(f\) by \(f_V(x)=(f(xv_1),\dots,f(xv_m))\), preserving the shift while often restoring injectivity [1207.4537].

The continuous hidden shift problem extends the same pattern to \(\mathbb{R}^n\). In the version defined with continuous oracle functions \(f_0,f_1:\mathbb{R}^n\to S\), one seeks \(u\in \mathbb{R}^n\) such that \(f(x,0)=f(x+u,1)\), under explicit Lipschitz and decay conditions on the oracle states and with an approximation guarantee \(\|u_a-u\|<\eta\) [1904.06225].

## 2. Structural relations to hidden subgroup, decision, and injectivity

Hidden shift is closely related to the hidden subgroup problem, but the two problems are not identical. Hidden subgroup asks to recover \(H \le G\) from a function that is constant on right cosets; hidden shift asks to recover \(s\) from two functions related by left-translation. There are general reductions from hidden shift on \(G\) to hidden subgroup on the wreath product \(G \wr \mathbb{Z}/2\), but these typically complicate the group to a nonabelian semidirect product. In the special case \(G=(\mathbb{Z}/2)^n\), the reduction is especially clean and explains the efficiency of Simon’s algorithm on XOR groups [1610.01187].

The relation between search and decision depends on the group family. For \(\{\mathbb{Z}/2^n\}\) and \(\{S_n\}\), there is a search-to-decision reduction based on efficient subgroup towers. Concretely, if there exists a QPT algorithm for \(DRHS_{\mathcal G}\) with at most inverse-polynomial completeness and soundness errors, then there exists a QPT algorithm for \(HS_{\mathcal G}\) with negligible completeness error [1610.01187]. The proof uses subgroup chains such as \(\{1\}<\mathbb{Z}/2<\mathbb{Z}/2^2<\cdots\) and \(\{1\}<S_1<S_2<\cdots\), together with recursive coset detection [1610.01187].

Injectivity is a technical fault line. In the injective hidden shift problem, function values identify inputs up to the shift structure; in the non-injective case, collisions obscure translation. The injectivization tool replaces \(f\) by \(f_V(x)=(f(xv_1),\dots,f(xv_m))\). If \(f\) and \(g\) satisfy \(f(x)=g(sx)\), then \(f_V(x)=g_V(sx)\) as well. For random \(V\in G^m\), the probability that \(f_V\) is not injective is bounded by
\[
\Pr_V[f_V \text{ is not injective}] \le |G|^2(1-\gamma_{\min}(f))^m,
\]
where \(\gamma_v(f)=\Pr_x[f(x)\neq f(xv)]\) and \(\gamma_{\min}(f)=\min_{a\neq 1}\gamma_a(f)\) [1207.4537]. This generalized influence notion extends Boolean influence to arbitrary finite codomains and arbitrary groups [1207.4537].

For \(G=\mathbb{Z}_2^n\), once injectivization succeeds, the instance reduces directly to Simon’s problem by combining \(f_V\) and \(g_V\) into a two-branch oracle whose period is exactly the hidden shift [1207.4537]. A plausible implication is that injectivization isolates the algorithmic difficulty of non-injective hidden shift into a preprocessing step, after which standard injective techniques apply.

## 3. Boolean, bent, and Fourier-analytic regimes

The Boolean hidden shift problem exhibits a sharp dependence on the Fourier structure of the reference function. If \(g(x)=(-1)^{f(x)}\) and
\[
\widehat{g}(y)=2^{-n}\sum_{x\in\{0,1\}^n}g(x)(-1)^{x\cdot y},
\]
then bent functions are exactly those with flat Walsh spectrum, \(|\widehat{g}(y)|=2^{-n/2}\) for all \(y\). In this case, an exact one-query quantum algorithm exists if and only if the function is bent [1304.4642]. The same bent condition can be expressed through autocorrelation: the hidden-shift states are pairwise orthogonal precisely when the autocorrelation vanishes off zero [1304.4642].

At the opposite extreme, delta functions are hard. Their hidden-shift states are nearly parallel, and the resulting bounded-error quantum query complexity is \(\Theta(\sqrt{2^n})\), matching unstructured search [1304.4642]. Between these extremes, the pretty good measurement yields a refined picture. For random Boolean functions, one query achieves only constant success probability, but two queries suffice with high probability: the paper proves
\[
\mathbb{E}_f[p_f(2)] \ge 1-\frac{3}{64}\cdot 2^{-n}
\]
for uniformly random \(f\) [1304.4642].

A complementary formulation ties complexity to influence. For \(F(x)=(-1)^{f(x)}\), define
\[
\gamma_{f,v}=\Pr_x[f(x)\neq f(x\oplus v)] = \sum_{u:\,u\cdot v=1}\widehat{F}(u)^2,
\]
and \(\gamma_f=\min_{v\neq 0}\gamma_{f,v}\). There exists a quantum algorithm that solves BHSP over \(f\) in expected \(O(n/\sqrt{\gamma_f})\) oracle queries [1103.3017]. For uniformly random \(f\), \(\gamma_f\) is constant with overwhelming probability, so the problem is solvable in \(O(n)\) queries and polynomial time on average, while any classical algorithm requires \(\Omega(2^{n/2})\) queries [1103.3017].

The bent-function paradigm extends beyond Boolean codomains. For complex scalar- and vector-valued functions on finite abelian groups, with oracle access to the shifted function \(g\) and to the Fourier transform \(\widehat{f}\) of the unshifted function, there are constant-query quantum algorithms. For bent functions they succeed with probability \(1\), while for general \((R,r)\)-bounded functions the success probability is
\[
p(s)=(r/R)^2,
\]
and more general subset-postselected variants give explicit formulas involving tail terms [2507.19440]. The requirement of oracle access to \(\widehat{f}\) is a major modeling assumption in that line of work [2507.19440].

## 4. Group-dependent algorithms beyond XOR

The computational status of hidden shift changes radically with the ambient group. Over \(G=(\mathbb{Z}/2)^n\), Simon’s algorithm solves \(HS_G\) in polynomial time, using \(O(n)\) queries, and this is precisely the regime exploited in Simon-type cryptanalytic attacks [1610.01187]. Over cyclic groups such as \(\mathbb{Z}/2^n\), the best known algorithm is subexponential: Kuperberg’s algorithm runs in time \(2^{O(\sqrt{n})}\) when \(|G|=2^n\) [1610.01187].

For the cyclic hidden shift problem, equivalently the dihedral hidden subgroup problem, Kuperberg’s later collimation sieve gives quantum time \(\exp(O(\sqrt{\log N}))\), classical space \(\exp(O(\sqrt{\log N}))\), and quantum space \(O(\log N)\) [1112.3333]. The algorithm works with “phase vectors” of height \(h\), repeatedly collimates modulo powers of two, and extracts parity bits of the hidden shift at the अंतिम stage; it also supports multiple hidden shifts and QRACM-based time–space tradeoffs [1112.3333]. Subsequent low-qubit refinements replace brute-force combination by subset-sum algorithms, yielding tradeoffs such as
\[
Q(n)=L(\sqrt{c}), \qquad T_{\mathrm{classical}}(n)=L(\sqrt{c}),
\]
or
\[
Q(n)=L\!\left(\sqrt{\frac{c}{3}}\right), \qquad T_{\mathrm{classical}}(n)=L\!\left(2\sqrt{\frac{c}{3}}\right),
\]
while keeping quantum memory polynomial [1901.11428].

For product groups of \(2\)-power modulus, a different phenomenon appears. There is a quantum algorithm for hidden shift in \(\mathbb{Z}_{2^t}^n\) with running time polynomial in \(n\) for constant \(t\), quadratic classical space, and linear quantum space in \(n\log(k)\). The explicit complexity bound is
\[
O(t^3 (n + 1)^{t + 2} \cdot l)\cdot \log(1/\epsilon)
\]
time, with quantum space \(O(nt+l)\) and classical space \(O(tn^2+l)\) [2102.04171]. The method repeatedly combines phase qubits so that the frequency vectors become divisible by increasing powers of \(2\), then solves linear equations for \(s \bmod 2\), and finally lifts through subgroups isomorphic to \(\mathbb{Z}_{2^{t-1}}^n \rtimes \mathbb{Z}_2\) [2102.04171].

A recent extension treats the abelian hidden shift problem on \(\mathbb{Z}^k/H\) when \(H\) is visible by a generator matrix. Under the assumption \(n=\Omega((k+\log h)^2)\), there is a quantum algorithm with time complexity \(2^{O(\sqrt{n})}\), quantum space complexity \(\mathrm{poly}(n)\), classical space complexity \(2^{O(\sqrt{n})}\), and hiding-function query cost either polynomial or as high as \(2^{O(\sqrt{n})}\) [2507.18499]. The core device is a multidimensional collimation sieve on the Pontryagin dual \(H^\#\), generalizing Kuperberg, Regev, and Peikert from cyclic groups to higher-rank abelian quotients [2507.18499].

## 5. Cryptographic role and hidden-shift hardness assumptions

Hidden shift has direct cryptographic significance because it abstracts the algebraic core of several quantum chosen-plaintext attacks. Kaplan–Kuwakado–Morii and related work show that many classical symmetric-key schemes implement an internal XOR-based hidden shift that can be exposed by superposition queries. In the Even–Mansour cipher,
\[
E^P_{k_1,k_2}(m)=P(m\oplus k_1)\oplus k_2,
\]
Simon’s algorithm recovers \(k_1\), and one classical query then yields \(k_2\). For Encrypted CBC-MAC, certain two-block messages give an oracle satisfying Simon’s promise with hidden shift \(s_k=E_k(\alpha_0)\oplus E_k(\alpha_1)\), enabling exponential collision finding. Three-round Feistel networks and slide attacks admit analogous XOR-shift formulations [1610.01187].

The central defensive idea is to replace XOR by the group law of a group for which no efficient Simon-type algorithm is known. The paper studies adaptations over groups such as \(\mathbb{Z}/2^n\) and \(S_n\), and treats the hardness of random hidden shift over such group families as a cryptographic assumption. This assumption is supported by three structural properties: random self-reducibility, hardness amplification, and, for \(\{\mathbb{Z}/2^n\}\) and \(\{S_n\}\), a reduction from search to decision [1610.01187].

Under this assumption, hidden-shift versions of standard symmetric constructions inherit qCPA security. For Even–Mansour over a general group \((G,\star)\),
\[
E^P_{k_1,k_2}(x)=L_{k_2}\circ P\circ L_{k_1}(x)=P(x\star k_1)\star k_2,
\]
and for \(G=\mathbb{Z}/2^n\) this becomes \(E^P_{k_1,k_2}(x)=k_2+P(x+k_1)\bmod 2^n\). The main theorem states that, under the \(\mathcal G\)-Hidden Shift assumption for \(\mathcal G=\{\mathbb{Z}/2^n\}\) or \(\mathcal G=\{S_n\}\), Hidden Shift Even–Mansour is a quantum-secure pseudorandom function [1610.01187]. A parallel theorem shows that Hidden Shift Encrypted CBC-MAC over the same families is collision-resistant against QPT adversaries with qCPA access [1610.01187].

These results do not claim that hidden shift is uniformly hard across all groups. Rather, they isolate a specific algebraic vulnerability: changing from \((\mathbb{Z}/2)^n\) to \(\mathbb{Z}/2^n\) or \(S_n\) frustrates the direct Simon’s-algorithm attack pipeline while preserving the classical structure of the original schemes [1610.01187].

## 6. Extensions, lower bounds, simulation results, and open directions

The hidden shift framework extends beyond the standard two-function discrete setting. On \(\mathbb{R}^n\), the continuous hidden shift problem is solved by discretizing to \(\mathbb{Z}_{2^q}^n\), applying a QFT over \(\mathbb{Z}_{2^q}^n\times \mathbb{Z}_2\), and post-processing with \(\varepsilon\)-random linear disequations. For fixed \(q\) and tolerance parameter \(c\), the decision version \(\varepsilon\)-\(\mathrm{RLD}_d(\mathbb{Z}_{2^q}^n,c)\) is solvable in time polynomial in \(n\), and the main theorem gives a polynomial-time quantum algorithm returning a \((\delta/2)\)-approximation \(\delta \tilde u\) under explicit conditions on \(\alpha\), \(r\), and \(\xi\) [1904.06225].

Tripartite analogues show that not every hidden-shift-like problem inherits the low query complexity of Simon’s problem. The 3-shift-sum problem asks whether a \(3\times n\) table can be circularly shifted so that the sum in each column is zero; the 3-matching-sum problem allows arbitrary permutations in each row. Their quantum query complexities satisfy
\[
Q(\text{3-shift-sum})=\Omega(n^{1/3}), \qquad Q(\text{3-matching-sum})=\Omega(\sqrt n),
\]
for \(q\ge 2n^3\), and the second lower bound is tight [1712.10194]. This establishes that tripartite alignment constraints fundamentally increase quantum query complexity relative to ordinary hidden shift [1712.10194].

Implementation-level results reveal another limit to naive “quantum advantage” narratives. Circuits implementing Roetteler’s shifted bent-function algorithm had been used as benchmarks because they have deterministic output and tunable non-Clifford resources, and were not known to lie in any efficiently simulable class. A polynomial-time classical simulation is nevertheless possible via symbolic path integrals endowed with a confluent rewriting system; for the shifted bent-function family this reduces the path integral directly to the hidden shift [2408.02778]. This does not refute the underlying query separation, but it shows that specific circuit families can be classically tractable even when the abstract hidden shift problem is quantumly favorable [2408.02778].

Several limitations remain explicit in the literature. Search-to-decision is proved for \(\{\mathbb{Z}/2^n\}\) and \(\{S_n\}\), but for general \(\mathbb{Z}/N\) with prime \(N\) it is unknown [1610.01187]. Kuperberg-type procedures remain only subexponential, so cyclic hidden shift over \(\mathbb{Z}/2^n\) is a theoretical vulnerability rather than a polynomial-time break [1610.01187]. Continuous algorithms require Lipschitz and decay assumptions on oracle states [1904.06225]. Complex-function algorithms rely on an oracle for \(\widehat{f}\) [2507.19440]. Infinite-group algorithms assume a visible subgroup \(H\) and achieve only stretched exponential time [2507.18499].

Taken together, these results portray the hidden shift problem not as a single problem with a single complexity classification, but as a family of translation-recovery tasks whose difficulty is controlled by group structure, injectivity, spectral flatness, oracle access, and promise conditions. That variability is precisely why hidden shift occupies a central position between Fourier-sampling algorithms, query-complexity lower bounds, and post-quantum cryptographic design.

Source: https://www.emergentmind.com/topics/hidden-shift-problem