qrisp.shor.rsa_encrypt#

rsa_encrypt(p, q, e, message_int)[source]#

Encrypts an integer using the private keys p, q and a public key e.

Parameters:
pint

Private key 1.

qint

Private key 1.

eint

Public key 2.

message_intint

The integer to encrypt.

Returns:
ciphertextint

The encrypted integer.

Examples

We encrypt the integer 8 using p=11, q=3 and e=7

>>> from qrisp.shor import rsa_encrypt
>>> rsa_encrypt(p = 11, q = 3, e = 7, message_int = 8)
2