qrisp.shor.rsa_encrypt#
- rsa_encrypt(e, N, message_int)[source]#
Encrypts an integer using a public key pair \((e,N)\).
- Parameters:
- eint
Public key 1.
- Nint
Public key 2.
- message_intint
The integer to encrypt.
- Returns:
- ciphertextint
The encrypted integer.
Examples
We encrypt the integer 8 using \(N=33\) (\(p = 11\), \(q = 3\)) and \(e = 7\)
>>> from qrisp.shor import rsa_encrypt >>> rsa_encrypt(e = 7, N = 33, message_int = 8) 2