How to exchange RSA public keys safely between two parties via internet?
|
migrated from stackoverflow.com Jun 12 '11 at 11:30
|
Get yourself a trusted key. Two easiest options are an SSL certificate ($50..$100) and a GPG key (free). Encrypt or sign the data you send with that key. With SSL, you can just serve your data via https, but can also just sign it. With GPG, you have to build enough trust for your key, so that the receiving end is sure it's you and not an impostor. Another option is to create a public key to your SSH server, publish it and let people just SCP your data from there. Send them fingerprints of your SSH key via snail mail or tell verbally by Skype / phone. An impostor would have to fake your key, your server on a known domain name, and your phone / Skype / SIP contact; this should be sufficiently hard to thwart such attempts. |
|||||||||||
|
|
There are a few easy options.
Of course your preference will depend on just what kind of key it is, who you're sending it to, how you intend to use it, what your threats look like, what you're using it to protect, etc. |
||||
|
|
|
Email, pm on a forum, really any way you want. The idea is that anyone can know the public key and it doesn't matter. edit: Note that this assumes you just want them to be able to send encrypted messages to you, which other people can't read. If you want to guarantee the sender, than rather than trying to keep the public key private (which defeats the purpose, and you may as well not use RSA), get them to sign the message using e.g. their own RSA key. Or failing that, encrypt the key using something like their RSA public key, so they can decrypt it. |
|||||||||||||
|