A king has no sons, no daughters, and no queen. For this reason he must decide who will take the throne after he dies. To do this he decides that he will give all of the children of the kingdom a single seed. Whichever child has the largest, most beautiful plant will earn the throne; this being a metaphor for the kingdom.
At the end of the contest all of the children came to the palace with their enormous and beautiful plants in hand. After he looks at all of the children's pots, he finally decides that the little girl with an empty pot will be the next Queen. Why did he choose this little girl over all of the other children with their beautiful plants?
The king gave them all fake seeds and the little girl was the only honest child who didn't switch seeds.
Suppose you want to send in the mail a valuable object to a friend. You have a box which is big enough to hold the object. The box has a locking ring which is large enough to have a lock attached and you have several locks with keys. However, your friend does not have the key to any lock that you have. You cannot send the key in an unlocked box since it may be stolen or copied. How do you send the valuable object, locked, to your friend - so it may be opened by your friend?
Send the box with valuable object and a lock attached and locked. Your friend attaches his or her own lock and sends the box back to you. You remove your lock and send it back to your friend. Your friend may then remove the lock she or he put on and open the box.
Search: Man-in-the-middle attack