0

Say I want to exchange a key with someone for a symmetric cipher (say AES) without meeting them in person. What would be the most secure way to do this over the Internet? My first instinct would be using a custom RSA channel over HTTPS to provide the most security.
I need the most future-proof method possible. (keep in mind this only needs to be done once, so even an "insane" method can be considered an answer.)

  • 2
    The main question is on how you can authenticate the other person in order to make sure that the correct person gets the key and not some attacker. Unfortunately, your question currently provides no clue about this. To show some possible options: you have already a certificate or public key of this person, you know his/her voice, you have some trusted party who knows the person ... If you have no previous contact and nothing what you can base some trust or authentication on then there is no safe way, since an attacker could claim to be the other person and you could not verify this. – Steffen Ullrich Sep 9 at 5:57
  • 1
    Since your question is tagged TLS, I am wondering why you didn't just use TLS for that, given that this is exactly the problem TLS is trying to solve. – MechMK1 Sep 9 at 7:48
  • I do use TLS (HTTPS) as I mentioned above, but an attacker could just keep the encrypted copy of the message and decrypt it in a year (when computing power doubles again). I am assuming that the attacker is patient. Sorry if I didn't make that clear. – mngxyuiso Sep 9 at 17:16
-1

For your problem, the easy way coming to my mind is PGP: both the sender and the receiver exchange asymmetric keys and can then send each other private messages. You can validate each other pulic key other the phone to make sure no one messed with it (see MitM).

For all I know, using WhatsApp or Telegram might also be secure enough as they use end-to-end encryption (the message decryption keys are on your phones only).

  • 1
    both the sender and the receiver exchange asymmetric keys - well, or just "exchange symmetric keys", and the problem is solved. :) – domen Sep 9 at 6:52
  • Well, public keys in the nature is fine, but you don't want your symmetric key lying in plain view. – Lou_is Sep 9 at 8:03
  • 1
    Confidentiality is not important with public keys, that is true, but integrity is. The described step to validate public keys, might as well just be the "exchange symmetric keys". – domen Sep 9 at 8:29
  • 1
    Anyway, that didn't really address the problem I have with this answer, which can be summarised into "to have a secure channel you need a secure channel". – domen Sep 9 at 10:04
  • 1
    If you exchange asymmetric keys over insecure channel, what prevents an attacker tampering with them? You're back to square one. This can be resolved with web-of-trust or PKI, but your answer doesn't mention either. – domen Sep 9 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.