A key is the root of a password. All insecure secret exchanges come from insecure key exchanges. At present, the vast majority of protocols adopt RSA Algorithms for key exchange. But before the emergence of RSA Algorithms, How did people do it? It is said that the first key exchange algorithm was invented by Ralph Merkel in 1974, called Merkle's puzzles. This is a very strange and evil Key Exchange protocol.
Assume that a and B want to communicate secretly, they need to select a key. A has prepared many messages, such as "Key number X_ I, key is y_ I". X_ I is a random identifier, and y_ I is a random key. The larger the number of messages, the better. There must be at least several hundred million messages. Then, a encodes these messages into difficulties. For example, for a message with I different or a large mass number p_ I, it claims that p_ I is the prime factor with the smallest number of n_ I. A sends all encoded messages to B. After receiving these messages, B selects a message for brute-force cracking (in the above example, an n_ I is decomposed) to obtain a pair of corresponding X and Y. B sends a message to a in plain text, saying, "Let's use the key numbered X ". Because a knows which y corresponds to X, A knows which key B is.
The core of this protocol is that a third party does not know which message B Selected at that time. If a third party intercepts the communication between them, to obtain the key y, he must solve all the difficulties one by one until he unlocks the key message numbered X. As the number of such problems is astonishing, the efforts of third parties are hundreds of thousands of times that of B. If it takes an hour to crack a problem by using a computer, a third party, even if it has hundreds of times the computing power of B, needs an average of more than a year to obtain the correct X and Y.