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
Two men ride their horses to the town blacksmith to ask for his daughter's hand in marriage. To help decide who will get to marry her, the blacksmith proposes a very strange race:
"You will race your horses down the mile-long road from here to the center of town, and the man whose horse passes through city hall's gates LAST will get to marry my daughter."
The men have no idea how to proceed, but after a few minutes of thinking, they come up with a great idea to abide by the blacksmith's rules. 30 minutes later, one of the men is gloating, having won the daughter's hand in marriage.
What was the idea the men had?
Each man rides the other man's horse. They race as they normally would. The blacksmith said the man whose horse crosses last would win, so the man who wins the race would have his horse finish last.
I can sizzle like bacon,
I am made with an egg,
I have plenty of backbone, but lack a good leg,
I peel layers like onions, but still remain whole,
I can be long, like a flagpole, yet fit in a hole.
What am I?