4 ms·
> The basic idea is that public keys need to be exchanged to perform encryption from one end and decryption at another end. An example is encrypting with the re
by dustinmoris 7y ago
> The basic idea is that public keys need to be exchanged to perform encryption from one end and decryption at another end. An example is encrypting with the remote users public key and they decrypt with their stored private key. It’s complicated though because you don’t want to exchange the public keys without restrictions where they can be obtained by unauthorized parties or disseminated without your consent. You also may not trust the distant end.
This is acdtually not true. You completely mixed up asymmetric with symmetric encryption.
The former is also known as private-public key encryption and doesn't require DH, because each party has their own private key which doesn't get shared and a public key which does get shared, namely publicly, so no reason to use DH. This is what RSA is.
The latter is conventional encryption which uses a single private key which must be shared between two parties over an insecure channel. Before you establish a secure channel via encryption you must first exchange the secret piece of information that allows both sides to decrypt a cipher message. That exchange therefore happens over an insecure channel, which is a problem. DH is an algorithm which allows a secure exchange of a private message over a public/insecure channel.