ASIS Quals 2017 – A fine OTP server – 79 points

Description:

Connect to OTP generator server, and try to find one OTP.

 

nc 66.172.27.77 35156

1

Here is the [E]ncryption function.

As we can see, the otp is the concatenation of template_phrase and 18-bytes passphrase and the encrypted OTP are compute as:

c_1 \equiv otp_1^{3} \;mod\;n

c_2 \equiv otp_2^{3} \;mod\;n

The server uses 2048-bits key and the public exponent  is 3 (so small) and the otp is small too, so the cube of otp is smaller than the modulus. We can easily compute the otp by computing the cube root of encrypted OTP:

c_1 = opt_1^{3}

otp_1=\sqrt[3]{c_1}

 

I got an encrypted OTP then computed with sage:

2

Submit the OTP and get the flag 😀

2

That’s all for this challenge. So easy.

 

Bình luận về bài viết này