We study the quantum query complexity of the Boolean hidden shift problem.
Given oracle access to f(x+s) for a known Boolean function f, the task is to
determine the n-bit string s. The quantum query complexity of this problem
depends strongly on f. We demonstrate that the easiest instances of this problem
correspond to bent functions, in the sense that an exact one-query algorithm
exists if and only if the function is bent. We partially characterize the hardest
instances, which include delta functions. Moreover, we show that the problem is
easy for random functions, since two queries suffice. Our algorithm for random
functions is based on performing the pretty good measurement on several copies of
a certain state; its analysis relies on the Fourier transform. We also use this
approach to improve the quantum rejection sampling approach to the Boolean hidden
shift problem.