Key exchange is a cryptographic process in which cryptographic keys are exchanged between two communication partners. In the past, keys were exchanged by couriers or via secure, secret channels. In the 1980s, exchange protocols were developed for key exchange, which made secure key exchange possible.
When transmitting encrypted messages, each participant must be able to encrypt send messages and decrypt receive messages. Depending on the encryption method used, the public or private secret keys are required for this purpose.
In symmetric encryption, both communication partners agree on a common key that is known only to them. In asymmetric encryption with public and private keys, the communication partners require the public key of the communication partner. To ensure security in the communication links, special protocols must provide security for the key exchange. Care must be taken to ensure that the key cannot be derived from the transmitted information.
One of the best-known methods for exchanging keys over public networks uses the Diffie-Hellman algorithm.