TCPサーバの接続情報と、Pythonのプログラムが与えられた。
ソースコードは、encrypt(a)とencrypt(b)の値を出力し、encrypt(a*b)の値の入力を要求するものだった。
encrypt(x)は、xをe乗してNで割った余りを求める操作だった。
Nの値も出力されていたので、encrypt(a)とencrypt(b)を掛けてNで割った余りを送信すると、flagが得られた。
Information to connect to a TCP server, and a Python program were given.
What the source code was doing was printing values of encrypt(a) and encrypt(b), and then requiring to enter the value of encrypt(a*b).
encrypt(x) is x to the e-th power modulo N.
The value of N was also printed, so I obtained the flag by sending encrypt(a) times encrypt(b) modulo N.