0
$\begingroup$

You want to send a secret message to your friend Alex in the mail.
But Sam, who you don't trust, has access to all your mail.
So you put your message in a box with a lock.
But you can't send a key, because Sam could use or copy it!
How can you get your message through securely?

Note: Alex doesn't have a key to your lock.

$\endgroup$
0

2 Answers 2

2
$\begingroup$

Here is how

You send the locked message (without the key) to Alex.
Alex puts an extra lock on the message (Alex has the key to that extra lock).
Alex sends the double locked message (without any key) back to you.
You remove your lock, and send the message back to Alex.
Alex removes the lock that he put on.
Voila!

$\endgroup$
8
  • $\begingroup$ Except that Sam intercepts the box, sends it back with his own lock, and then intercepts the box with Alex's lock removed. $\endgroup$
    – Florian F
    Commented Jul 26, 2020 at 13:14
  • $\begingroup$ @FlorianF Maybe change it to rot13? $\endgroup$ Commented Jul 26, 2020 at 13:16
  • $\begingroup$ As soon as this site provides a way to encode and decode it. $\endgroup$
    – Florian F
    Commented Jul 26, 2020 at 13:20
  • $\begingroup$ @FlorianF Good point. $\endgroup$ Commented Jul 26, 2020 at 13:20
  • $\begingroup$ @FlorianF Do you have your own encoder? (just curious) $\endgroup$ Commented Jul 26, 2020 at 13:21
3
$\begingroup$

This is a very famous problem. Not sure if it’s been posted here before however.

The solution involves

Sending it back and forth three times.

This way

You send the message to Alex with your lock. Alex attaches his own lock and returns it. You remove your lock, so the box only has Alex’s lock on it, send it back to him, and he can unlock it and see your message. This way the message always has a lock on it.

$\endgroup$
2

Not the answer you're looking for? Browse other questions tagged or ask your own question.