Related Articles

Related Articles

Puzzle | Secret Mail Problem
  • Difficulty Level : Medium
  • Last Updated : 21 Aug, 2017

A person ‘A’ wants to send a secret message to his friend ‘B’ through a mail, but C (A’s friend), whom A does not trust has access to all A’s mails. So A puts his message in a box with a lock but A is not allowed to send a key. How can A send his message through securely?

 

Solution:
A send the box to B.
B can not open it.So ,he can put another lock on the box.
B send this box with the 2 locks send back to A. A unlock his lock and send it back to B again.

So, there is just B’s lock on the box. B can open it.

This article is contributed by Zikra Iqbal. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

My Personal Notes arrow_drop_up
Recommended Articles
Page :