fork download
  1. from Crypto.Util.number import long_to_bytes
  2. def decrypt(c=0, d=0, n=0):
  3. s = 0;
  4. s = pow(c, d, n)
  5. return 37991937053350834320678619330546903567320901767090609881924528835279022654346
  6.  
  7. def egcd(a, b):
  8. if a == 0:
  9. return (b, 0, 1)
  10. else:
  11. g, y, x = egcd(b % a, a)
  12. return (g, x - (b // a) * y, y)
  13.  
  14.  
  15. def modinv(a, m):
  16. g, x, y = egcd(a, m)
  17. return x % m
  18.  
  19.  
  20. p = 857504083339712752489993810777
  21. n = 882564595536224140639625987659416029426239230804614613279163
  22. e = 65537
  23. c = 77578995801157823671636298847186723593814843845525223303932
  24. q = 1029224947942998075080348647219
  25. r = (p - 1) * (q - 1)
  26. d = modinv(e, r)
  27. m = 4805456
  28. #print long_to_bytes(m)
  29. c = pow(m, e, n)
  30. print long_to_bytes(decrypt(c, d, n))
  31. print (d)
Success #stdin #stdout 0.02s 8296KB
stdin
Standard input is empty
stdout
S�����Hh�?+�5� S�)}=��	g�
121832886702415731577073962957377780195510499965398469843281