Abstract Facing the threat of quantum computing to cryptography schemes, it is urgent to study the applications of quantum algorithms to cryptanalysis and evaluate the security of cryptographic schemes in a quantum computing environment. To do this, it is necessary to analyze the ability of cryptanalysis methods, such as integral and linear attacks, when combined with quantum algorithms. In this article, we investigate the properties of block ciphers with SPN structure and their security against a quantum adversary and apply the Bernstein-Vazirani algorithm to zero correlation linear attacks. Based on the relation between linear approximates of SPN ciphers and the dual cipher’s linear structures, we proposed a quantum algorithm that can find linear hulls with zero correlation of SPN ciphers. We show the validity of the proposed quantum algorithm and estimate the corresponding computational complexity. Implementing our quantum algorithm only costs polynomial qubits and quantum gates.