I am trying to encrypt public data along with another tuple and then decrypt it after sending. RSA is needed for negotiation of keys for AES. But I just get garbage after I decrypt it. This is what I'm attempting to do:
from Crypto.PublicKey import RSA from Crypto import Random gkey = RSA.generate(384, Random.new().read) string = str((gkey.publickey().__getstate__(), (333,444))) print string print data = gkey.encrypt(string,"") print "data:",data print print "decrypt" print "decrypt,", gkey.decrypt(data) print "done" All I get are junk values when printing the decrypted value. -- http://mail.python.org/mailman/listinfo/python-list