MapleCTF2022

misay 2025-05-15 16:38:52 37 0


给定了p^4-q^3 = hint , p*q = n直接解方程就可以了

# sage


fromCrypto.Util.numberimport*


N=

e=

enc=

hint=

# p = var('p')

# eq  = p^4 - hint - N^3/p^3 == 0

# solve = solve(eq, p)

# print(solve)

p=11917573148183173444338385104784582231114229409447057112131253050235068806316496452352116287542988361044359262597423159386263430710183647113674868056755407

q=N//p

msg=long_to_bytes(pow(enc, inverse(e, (p-1)*(q-1)),N))

print(msg)

# b'maple{s0lving_th3m_p3rf3ct_r000ts_1s_fun}'

分类:Crypto
image
作者:misay

1

提交

0

收入

相关WriteUP

问题反馈