It seems that it is not an easy thing to speak clearly about asymmetric encryption with people outside the line.
It is more appropriate to use a courier (or post) to make an analogy.
Scene: Beijing's Zhangxiaofa, to send a courier to New York's Li Xiao, suppose it is a block of uncertain shape of gold, 2 kilograms.
Zhangxiaofa this block of gold with a cipher box, set the password to 396173 (random, no meaning), and then give the box to The Courier, courier through the company's system to send the box. Zhangxiaofa on the phone to tell Lee small collection. Li Xiao after receiving the box, use this password to open the box and get the complete nugget. Complete.
This is a normal and complete smooth delivery process.
So, next, there's a possible problem.
Express delivery from Beijing to New York, may have poured countless hands in the middle, no one can guarantee that "no one wants to open this box to see what is so heavy", like the Dark Forest theory, the dark forest to assume that no one can believe.
In fact, using the phone to tell this way, without destroying the case, it is safe, others cannot unlock the password lock (I do not say violent attempts to crack the situation).
On the internet, the gold nugget mentioned above is information. The cipher box is the encryption algorithm. The lockbox, which is packed with gold, is the information that has been packaged by the encryption algorithm.
So, given that both sides are machines, a piece of information to be sent from Beijing to New York, there is no way to tell the other person's password by telephone, everything can only be transmitted on the Internet.
The equivalent in the human world, before the telephone invention, if you want the other person to unlock the password lock, you can only let the courier to convey, or send a letter alone, and this letter can only be issued by this courier (not to mention the Fire seal), then it is equal to this cipher box on the courier is public, can imagine, This is a very dangerous thing to do.
So, people invented a method. It is not only to send bullion, but also to keep others from seeing things inside.
Everyone can make a kind of box, the key of this box, only the owner of the box himself has, like your door key, this is the private key.
Now, Zhang Xiao hair to send to Lee small send and receive express, first sent a letter to Li Xiao, let him send a box come (also can be pre-existing Zhangxiaofa home, like Shun Fung Express single, also can imagine-Bruce Lee Energy, anywhere on the earth can buy Li Xiao courier box, in short, can get unlocked Li Xiao box) , this box, only Li Xiao himself with the private key can be opened. Then, Li Xiao box, is the public key, get must be unlocked, once things put in, the lid closed (public key encryption), only Li Xiao can open.
This is the process of image-based asymmetric encryption algorithm.
Thinking of Asymmetric encryption algorithm