Question: Task 7 - Broadcast RSA Attack (30 Points) A message was encrypted with three different 1,024-bit RSA public keys, resulting in three different encrypted messages.

Task 7 - Broadcast RSA Attack (30 Points)

A message was encrypted with three different 1,024-bit RSA public keys, resulting in three different encrypted messages. All of them have the public exponent e = 3.

You are given the three pairs of public keys and associated encrypted messages. Your job is to recover the original message.

TODO: In the provided project_3.py file, implement the method task_7.

def task_7(self,

n_1_str: str, c_1_str: str,

n_2_str: str, c_2_str: str,

n_3_str: str, c_3_str: str) -> str:

n_1 = int(n_1_str, 16)

c_1 = int(c_1_str, 16)

n_2 = int(n_2_str, 16)

c_2 = int(c_2_str, 16)

n_3 = int(n_3_str, 16)

c_3 = int(c_3_str, 16)

msg = \'\' m = 0

# Solve for m, which is an integer value,

# the line below will convert it to a string

msg = bytes.fromhex(hex(m).rstrip(\'L\')[2:]).decode(\'UTF-8\')

return msg

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!