Guest User

Untitled

a guest
Nov 19th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. from Crypto.PublicKey import RSA
  2. from Crypto.Signature import PKCS1_v1_5
  3. from Crypto.Hash import SHA
  4. from base64 import b64decode
  5.  
  6. os.chdir("/data/user/sg2017/crypto/type_confusion/")
  7. rsa_key = RSA.importKey(open('public.pem', "rb").read())
  8. verifier = PKCS1_v1_5.new(rsa_key)
  9. raw_cipher_data = open("ciphertext.bin", "rb").read()
  10. phn = rsa_key.decrypt(raw_cipher_data)
  11.  
  12. print phn
Add Comment
Please, Sign In to add comment