0
0
Computer Networksknowledge~10 mins

Asymmetric encryption (RSA) in Computer Networks - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to identify the key used for encryption in RSA.

Computer Networks
encrypted_message = encrypt(message, [1])
Drag options to blanks, or click blank then click option'
Apublic_key
Bprivate_key
Cshared_key
Dsession_key
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing the private key with the public key for encryption.
Thinking that a shared or session key is used in RSA encryption.
2fill in blank
medium

Complete the code to identify the key used for decryption in RSA.

Computer Networks
decrypted_message = decrypt(encrypted_message, [1])
Drag options to blanks, or click blank then click option'
Asession_key
Bpublic_key
Cprivate_key
Dshared_key
Attempts:
3 left
💡 Hint
Common Mistakes
Using the public key for decryption instead of the private key.
Confusing shared or session keys with RSA keys.
3fill in blank
hard

Fix the error in the RSA key generation code by selecting the correct prime number.

Computer Networks
p = [1]  # First prime number for RSA key generation
Drag options to blanks, or click blank then click option'
A17
B15
C21
D20
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a composite number instead of a prime number.
Not verifying the primality of the number before using it.
4fill in blank
hard

Fill both blanks to complete the RSA public key generation formula.

Computer Networks
public_key = ([1], [2])  # (e, [2])
Drag options to blanks, or click blank then click option'
Ae
Bn
Cd
Dp
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing the private exponent 'd' with the public exponent 'e'.
Using prime numbers directly instead of the modulus 'n'.
5fill in blank
hard

Fill all three blanks to complete the RSA decryption formula.

Computer Networks
decrypted_message = ([1] ** [2]) % [3]
Drag options to blanks, or click blank then click option'
Aencrypted_message
Bd
Cn
De
Attempts:
3 left
💡 Hint
Common Mistakes
Using the public exponent 'e' instead of the private exponent 'd' for decryption.
Forgetting to use the modulus operation.