Complete the code to identify the key used for encryption in RSA.
encrypted_message = encrypt(message, [1])In RSA, the public key is used to encrypt messages so that only the holder of the private key can decrypt them.
Complete the code to identify the key used for decryption in RSA.
decrypted_message = decrypt(encrypted_message, [1])In RSA, the private key is used to decrypt messages that were encrypted with the public key.
Fix the error in the RSA key generation code by selecting the correct prime number.
p = [1] # First prime number for RSA key generation
RSA requires prime numbers for key generation. Among the options, 17 is a prime number, while 15, 20, and 21 are not.
Fill both blanks to complete the RSA public key generation formula.
public_key = ([1], [2]) # (e, [2])
The RSA public key consists of e (the public exponent) and n (the modulus).
Fill all three blanks to complete the RSA decryption formula.
decrypted_message = ([1] ** [2]) % [3]
RSA decryption uses the formula: message = (encrypted_message ^ d) mod n, where d is the private key exponent and n is the modulus.