qrisp.shor.rsa_encrypt_string#

rsa_encrypt_string(e, N, message)[source]#

Encrypts an arbitrary Python string using RSA.

Parameters:
eint

Public key 1.

Nint

Public key 2.

messagestring

The message to encrypt.

Returns:
ciphertextstring

A bitstring containing the encrypted message.

Examples

We encrypt a string containing an important message

>>> from qrisp.shor import rsa_encrypt_string
>>> rsa_encrypt_string(e = 7, N = 65, message = "Qrisp is awesome!")
'01010000000101001010001100100110010010000101000010001101000010100011010101110011101000100100011100000100000100110111101000011000111110111111'