qrisp.shor.rsa_decrypt#

rsa_decrypt(ciphertext, e, N, backend=None)[source]#

Decrypts an integer using factorization powered by Shor’s algorithm.

Parameters
ciphertextint

The integer to be decrypted.

eint

Public key 1.

Nint

Public key 2.

backendBackendClient, optional

The backend to execute the quantum algorithm. By default the Qrisp simulator will be used.

Returns
plaintextint

The decrypted integer.

We decrypt the integer 2 using \(N = 33\) and \(e = 7\)
>>> from qrisp.shor import rsa_decrypt
    ..
>>> rsa_decrypt(2, 7, 33)
    ..
8