6Fgenshin 发表于 2023-3-16 15:03:50

RSA基础 wp

打开附件,发现题目给了n,e,c求m



在线网站分解一下n,得到3个数


直接一把梭

from Crypto.Util.number import *
import gmpy2

p=782758164865345954251810941
q=810971978554706690040814093
p2=1108609086364627583447802163
n= 703739435902178622788120837062252491867056043804038443493374414926110815100242619
e= 59159
c= 449590107303744450592771521828486744432324538211104865947743276969382998354463377
phi=(p-1)*(q-1)*(p2-1)
d=gmpy2.invert(e,phi)
print(long_to_bytes(pow(c,d,n)))





页: [1]
查看完整版本: RSA基础 wp