What is Shor's algorithm?

A quantum algorithm that solves factoring of large integers and the discrete logarithm problem in polynomial time by finding periods with the quantum Fourier transform. It was published by Peter Shor in 1994. It can break RSA and elliptic-curve cryptography, but running it requires a large fault-tolerant quantum computer.

Japanese name: ショアのアルゴリズム

Shor's algorithm appears in 4 practice questions across 1 topic, including Quantum Computing Hardware.

Field: Quantum Computing Hardware

Try it: questions about Shor's algorithm

Once large fault-tolerant quantum computers are built, which ciphers are expected to have their security seriously undermined by Shor's algorithm?

  1. APublic-key cryptography such as RSA and elliptic-curve cryptography
  2. BOnly symmetric-key ciphers such as AES
  3. CThe one-time pad (encryption with a single-use random key)
Show answer and explanation

Answer: A. Public-key cryptography such as RSA and elliptic-curve cryptography

The security of RSA rests on the difficulty of factoring large numbers, and that of elliptic-curve cryptography on the difficulty of the discrete logarithm problem. Shor's algorithm solves these problems in polynomial time by finding periods with the quantum Fourier transform. Keys too long to break in a realistic time on classical computers could then be broken with a sufficiently large fault-tolerant quantum computer. Against symmetric-key ciphers such as AES there is only the quadratic speed-up of Grover's algorithm, which can be countered with longer keys.

Which is the most appropriate main reason why quantum computers as of the mid-2020s cannot break RSA-2048 with Shor's algorithm?

  1. AShor's algorithm in principle stops working once the number of qubits exceeds 1,000
  2. BIt has been mathematically proven that classical computers are faster at breaking RSA-2048
  3. CA huge number of gates must be executed without error, which requires many logical qubits built by error correction and an enormous number of physical qubits to support them
Show answer and explanation

Answer: C. A huge number of gates must be executed without error, which requires many logical qubits built by error correction and an enormous number of physical qubits to support them

Breaking RSA-2048 requires executing gates on the order of billions in sequence on roughly one thousand to several thousand logical qubits. The logical error rate must therefore be extremely low, and error correction requires several hundred or more physical qubits per logical qubit. Estimates made in the 2020s put the requirement at roughly hundreds of thousands to tens of millions of physical qubits with error rates of about 0.1% (the figures vary greatly with the assumptions), orders of magnitude beyond the scale of current devices. However, these estimates have been shrinking as the algorithms improve, so preparations for migrating cryptography need to start early.

Shor's algorithm in the explanations

Questions that mention Shor's algorithm (4)

  1. Once large fault-tolerant quantum computers are built, which ciphers are expected to have their security seriously undermined by Shor's algorithm?
  2. Which is the most appropriate main reason why quantum computers as of the mid-2020s cannot break RSA-2048 with Shor's algorithm?
  3. When searching 1 million items in no particular order for the one item that meets a condition, which is closest to the order of the number of queries (oracle calls) needed by Grover's algorithm?
  4. Which correctly describes post-quantum cryptography (PQC)?

Books on Quantum Computing Hardware Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

Qubit Post-quantum cryptography Decoherence Dilution refrigerator Ion trap Josephson junction NISQ Quantum entanglement Quantum error correction Quantum gate

Back to the glossary