Summary: Factoring Algorithm

Let’s summarize what we learned about the factoring algorithm.

Here are the key takeaways:

  • Encryption employs a key KK that is typically used with other numbers to encode and decode the message. The RSA protocol for encryption involves factoring a product NN of two large prime numbers pp and qq. It also uses the value of dd which satisfies:
    1=Kdmod(p1)(q1)1 = Kd \mod (p − 1)(q − 1).

  • The prime factors, pp and qq, and the number dd are kept secret. KK and NN may be shared publicly, and the sender uses them to encrypt the message. For large NN, classical computers are unable to do the calculations fast enough to determine pp, qq, and dd in a practical amount of time.

  • The Shor algorithm is a famous quantum algorithm that can find the encryption key faster by making use of the periodic nature of the remainder or mod\text{mod} function. In effect, the Shor algorithm allows us to break the RSA encryption and other encryption methods based on factoring large numbers, the basis for a large portion of our internet security. The algorithm does this by making use of quantum Fourier transforms, which approximate periodic functions as a series of cosine and sine functions. The periods of the cosine and sine functions give information about the period of the original function.

Get hands-on with 1400+ tech skills courses.