Single

[INSHack2017]rsa16m1 min read

题目下载

题目给的n非常大,有了c和e, 计算c的65537的根即可。

ciphertext = message^exponent mod n

写脚本时,摘取第二行c的参考:戳我

import gmpy2
import linecache
c = linecache.getline("rsa_16m", 2).strip()
c = int(c[4::],16)
x = gmpy2.iroot(c, 65537)
print hex(x[0])[2:].decode('hex')