fork download
  1. from Crypto.PublicKey import RSA
  2. from Crypto.Util.number import inverse, long_to_bytes
  3.  
  4. e = 65537
  5. n = 3233
  6. c = 76578687539749270334567433327419068016846482753554386520492865010545019207873571124020033190161215682615446396410129994711325892805940645283340607450605814292242214864807736616366963263577528008848595692050559543833562773099105599921926111989644313805176327043401089098178374013481826785604433013115807761169019821323105749924330624003217601786185257085540220720085744340565287431719187002936832792834202535192145003134553748812608165166723533444588038792596663655700362125
  7.  
  8. p = 61
  9. q = 53
  10. phi = (p - 1) * (q - 1)
  11. d = inverse(e, phi)
  12.  
  13. decrypted_message = pow(c, d, n)
  14.  
  15. print(long_to_bytes(decrypted_message))
Success #stdin #stdout 0.02s 11124KB
stdin
Standard input is empty
stdout