RSA with PyCrypto
A.M. Kuchling
amk at amk.ca
Wed Dec 11 19:07:38 EST 2002
On 11 Dec 2002 23:47:47 +0100,
Tommy Lindgren <tomyltomyl at linuxlinux.nu> wrote:
> Aha, okay. I think my confusion (about the exchange of public keys)
> was due to my wish that the receiver can verify the sender. I guess
> this is done by providing a hash signature in the message (as shown
> in the RSA example in the documentation).
You could do that, or A could sign it with their private key.
Something like:
msg = 'blah blah'
signed_msg = privkeyA.sign(msg)
encrypted_msg = pubkeyB.encrypt(msg, '')
--amk (www.amk.ca)
If you're talking "useful", I'm not your bot.
-- Tim Peters, 08 Nov 2001
More information about the Python-list
mailing list