Shors Algorithm
Shors Algorithm
Shors Algorithm
Osama Awwad
Department of Computer Science
Western Michigan University
March 18, 2024
Overview
Shor's algorithm is a quantum algorithm for
factoring a number N in O((log N)3) time and
O(log N) space, named after Peter Shor.
The algorithm is significant because it implies that
RSA, a popular public-key cryptography method,
might be easily broken, given a sufficiently large
quantum computer
Overview
RSA uses a public key N which is the product of two
large prime numbers
One way to crack RSA encryption is by factoring N, but
with classical algorithms, factoring becomes increasingly
time-consuming as N grows large; more specifically
no classical algorithm is known that can factor in
polynomial time.
Shor's algorithm can crack RSA in polynomial time.
Overview
Like many quantum computer algorithms, Shor's
algorithm is probabilistic
It gives the correct answer with high probability,
and the probability of failure can be decreased by
repeating the algorithm.
Overview
Shor's algorithm was discovered in 1994 by Peter
Shor, but the classical part was known before.
it is credited to G. L. Miller. Seven years later, in
2001.
it was demonstrated by a group at IBM, which
factored 15 into 3 and 5, using a quantum
computer with 7 qubits.
Shor’s Algorithm
1 255
∑ |a, 000>
√256 a=0
q-1
1
∑ |c> * e 2iac / q
√q c=0
Shor’s Algorithm - QFT
1
∑ |a> , |1>
√64 aA 1
255
∑ |c> * e 2iac / 256
√256 c=0
We compute:
Gcd(7 4/2 + 1, 15) = 5
Gcd(7 4/2 - 1, 15) = 3
We have successfully factored 15!
What to do if Shor's algorithm failed
to produce factors of n
The QFT comes up short and reveals the wrong period. This
probability is actually dependant on your choice of q. The
larger the q, the higher the probability of finding the correct
probability.
The period of the series ends up being odd
Fourier transform could be measured to be 0, making the post
processing in the next step impossible.
The algorithm will sometimes find factors of 1 and n, which
is not useful either.
Thank You