3 ms·
The second parameter in the gen_key function is the RSA public exponent. I believe this means the ciphertext will be the same as the padded plaintext. Here is
by correct_horse 6y ago
The second parameter in the gen_key function is the RSA public exponent. I believe this means the ciphertext will be the same as the padded plaintext.
Here is the documentation from the RSA.gen_key() function.
def gen_key(bits, e, callback=keygen_callback):
# type: (int, int, Callable) -> RSA
"""
Generate an RSA key pair.
:param bits: Key length, in bits.
:param e: The RSA public exponent.
:param callback: A Python callable object that is invoked
during key generation; its usual purpose is to
provide visual feedback. The default callback is
keygen_callback.
:return: M2Crypto.RSA.RSA object.
"""
https://gitlab.com/m2crypto/m2crypto/-/blob/master/M2Crypto/RSA.py#L346 https://gitlab.com/m2crypto/m2crypto/-/blob/master/M2Crypto/...