qrisp.shor.rsa_encrypt_string#
- rsa_encrypt_string(p, q, e, message)[source]#
Encrypts an arbitrary Python string using RSA.
- Parameters:
- pint
Private key 1.
- qint
Private key 2.
- eint
Public key 1.
- 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(p = 5, q = 13, e = 7, message = "Qrisp is awesome!") '01010000000101001010001100100110010010000101000010001101000010100011010101110011101000100100011100000100000100110111101000011000111110111111'