Low Public Exponent
from Crypto.Util.number import long_to_bytes, bytes_to_long
from sympy import integer_nthroot
#--------Data--------#
N = <N>
e = <e>
c = <c>
#--------Cubic root--------#
while True:
# Example: integer_nthroot(16, 2) => (4, True)
# Note that the True or False here is boolean value
result = integer_nthroot(c, 3)
if result[1]:
m = result[0]
break
c += N
flag = long_to_bytes(m).decode()
print(flag)Last updated