n = p * q
e = 65537
phi = (p - 1) * (q - 1)
d = pow(e, -1, phi)
m = pow(ct, d, n)
flag = int(m).to_bytes((int(m).bit_length() + 1) // 8, "big")
print(flag)
Use the input field below to calculate factorials.
Type your own Sage computation below and click “Evaluate” to see the result.