Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from Crypto.PublicKey import RSA
- from Crypto.Signature import PKCS1_v1_5
- from Crypto.Hash import SHA
- from base64 import b64decode
- os.chdir("/data/user/sg2017/crypto/type_confusion/")
- rsa_key = RSA.importKey(open('public.pem', "rb").read())
- verifier = PKCS1_v1_5.new(rsa_key)
- raw_cipher_data = open("ciphertext.bin", "rb").read()
- phn = rsa_key.decrypt(raw_cipher_data)
- print phn
Add Comment
Please, Sign In to add comment