qrisp.shor.rsa_decrypt#
- rsa_decrypt(e: int, N: int, cipher_int: int, backend: BackendLike | None = None) int[source]#
Decrypts an integer using factorization powered by Shor’s algorithm.
- Parameters:
- eint
Public key 1.
- Nint
Public key 2.
- cipher_intint
The integer to decrypt.
- backendBackendLike, optional
The backend to execute the quantum algorithm. By default the Qrisp simulator will be used.
- Returns:
- plaintextint
The decrypted integer.
Examples
We decrypt the integer 2 using \(N = 33\) and \(e = 7\)
>>> from qrisp.shor import rsa_decrypt >>> rsa_decrypt(7, 33, 2) 8