defrsa_get_key(e, &()): k = 1 whileTrue: if (((&() * k) + 1) % e) == 0: return (&() * k + 1) // e k += 1
求出d=rsa_get_key()
最后用python跑
1 2 3 4 5 6 7 8 9 10 11 12 13
import rsa n=98432079271513130981267919056149161631892822707167177858831841699521774310891 p= 302825536744096741518546212761194311477 q=325045504186436346209877301320131277983 e=65537 d=1958518567680136759381316911808879057130620824462099039954817237801766103617 privatekey=rsa.PrivateKey(n,e,d,p,q) with open("F:\\新建文件夹 (2)\\fujian\\encrypted.message1",'rb') as f: print(rsa.decrypt(f.read(),privatekey).decode()) with open("F:\\新建文件夹 (2)\\fujian\\encrypted.message2",'rb') as f: print(rsa.decrypt(f.read(),privatekey).decode()) with open("F:\\新建文件夹 (2)\\fujian\\encrypted.message3",'rb') as f: print(rsa.decrypt(f.read(),privatekey).decode())