An example of a key transport protocol is when a player generates a symmetrical key and encrypts the key under the receiver`s public key using asymmetric cryptography. This is a key transport protocol (sometimes called a key encapsulation mechanism or KEM) and not a key agreement, because the key depends on the inputs of one party: the sender. The key is generated by one party and then transported to the other party. The exponential key exchange often used to describe the Diffie-Hellman key exchange is a secure method of exchanging a secret key between two parties using the mathematical properties of modular exposure to allow two parties to safely learn a secret key via a public communication channel. The first public public key memorandum of understanding  that meets the above criteria was the Diffie-Hellman key exchange, in which two parties jointly exposed a generator to random numbers, so that an earpiece cannot easily determine what the resulting value is used to create a common key. A naïve example of a key exchange protocol is that a party writes a secret key, puts it in an unman manipulated envelope and sends it to the recipient. If the envelope is intact, the secret key can be used by both parties to decrypt the messages. Key equipment can be roughly divided into key traffic and key agreements. However, the nature of the key exchange Diffie Hellman makes him vulnerable to man-in-the-middle (MITM) attacks, as he does not authenticate any of the parties involved in the exchange.
The mitm maneuver can also create a pair of keys and spoof messages between the two parties who think they are communicating with each other. For this reason, Diffie-Hellman is used in combination with an additional authentication method, usually digital signatures. A key protocol or mechanism is a key method for installation, in which a common secret is derived from two or more parts as a function of information provided (ideally) by each of that information, so that no party can determine in advance the resulting value. In this process, the key is manufactured in a collaborative manner, so both parties have the key. Key exchange protocols allow two or more parties to set up a shared encryption key that allows them to encrypt or sign data they want to exchange. Key exchange protocols typically use cryptography to achieve this goal. To achieve this goal, different cryptographic techniques can be used. Examples of key exchange systems: Diffie-Hellman (DH) and Elliptic-curve Diffie-Hellman (ECDH), RSA-OAEP and RSA-KEM (key transport RSA), PSK (preinstalled key) ), SRP (Secure Remote Password protocol), FHMQV (Fully Hashed Menezes-Qu-Vanstone), ECMQV (Ellictic-Curve Menezes-Qu-Vanstone) and CECPQ1 (quantum-safe key agreement).