message_cipher.rsa_decrypter module
The RSA decryption module defines the RsaDecrypter class. Uses the RSA decryption algorithm to decrypt messages in the form of arrays of integers encrypted with the RSA encryption algorithm.
- class message_cipher.rsa_decrypter.RsaDecrypter(product: int, private_key: int)
Bases:
Decrypter
RsaDecrypter performs calculations to decrypt arrays of integers into string messages.
- Parameters:
product (int)
private_key (int)
- decrypt(ciphertext: list[int]) str
Decrypts the encrypted message using the RSA system.
- Parameters:
ciphertext (list[int]) – An encrypted message to decrypt. The message should be a list of integers, as per output of
RsaEncrypter.encrypt
.- Returns:
The decrypted message as a string.
- Return type:
str