50

One of my friends gave me this puzzle. Please help me find the answer for it.

Jane and Mike have fallen in love, and Mike wishes to send her a ring via mail. Unfortunately they live in Kleptopia where anything sent by mail will be stolen unless it is in a padlocked box. The two of them have many padlocks, but none to which the other has a key. How can Mike get the ring safely to Jane?

Deusovi
  • 146,248
  • 16
  • 519
  • 609
Supriya S
  • 319
  • 1
  • 3
  • 6
  • An answer (that you probably won't accept because it exploits the wording of the puzzle) is that he simply sends a padlocked box with the key taped to the outside. The fact that the key is on the outside does not change the padlockedness of the box; the items won't be stolen. – Ian MacDonald Mar 30 '16 at 14:40
  • 19
    But the key would still be stolen. Then how will Jane open the box? – Devsman Mar 30 '16 at 16:31
  • 1
    Is there anything in this puzzle that prevents Mike from driving the key over to Jane the next time they meet? I mean, he still mails her the ring in the padlocked box, she just can't open it until he gets there too. – Bradley Uffner Mar 31 '16 at 13:29
  • 35
    Easy: send the ring in a padlocked box. The padlocked box isn't in a padlocked box, so it gets stolen, but the ring doesn't, so just the ring arrives. =P – Mike Kellogg Mar 31 '16 at 16:51
  • 2
    @MikeKellogg I see what you did there ;) – cst1992 Mar 31 '16 at 19:45
  • 3
    Does Alice and Bob... sorry, Jane and Mike... have a second channel of communication where they can exchange information in a safe manner? If not, the problem is entirely unsolvable because a Man in the Middle can impersonate Jane entirely. There is no difference between Jane and the MitM as far as recipients go. Jane and Mike need a secure channel or a previously agreed-upon shared secret, otherwise this problem is unsolvable. – MichaelK Apr 04 '16 at 10:38
  • why don't Jane break the padlock and get her present?.. as Mike have many padlocks. – Manikandan Arunachalam Jun 20 '16 at 08:21
  • Do lock cutters exist in this universe? – jpmc26 Apr 02 '18 at 21:49

12 Answers12

117

He can't.

The commonly-accepted answer was provided by Marius, and looks good on the surface. But consider that Kleptomaniacs are smart. Klep Kleppington III -a particularly wily kleptomaniac- could intercept the package and place his own padlock on it and send it back to Mike under the pretense that it is Jane's padlock.

Mike, not foreseeing this kink in his plan, then removes his padlock and unwittingly delivers the package back to Klep, who simply removes his own padlock and takes the ring for himself.

Devsman
  • 2,460
  • 2
  • 14
  • 19
  • Comments are not for extended discussion; this conversation has been moved to chat. –  Apr 01 '16 at 18:41
  • 24
    Ahh this is the man in the middle attack, and why we need to have CAs. That makes sense – Justin Apr 02 '16 at 15:03
  • He can, see my answer. –  Apr 03 '16 at 20:34
  • What if another MITM is like, heck I'll put 4 padlocks?! Then let the guessing game begin... hehehe – Joe DF Oct 08 '19 at 20:53
  • How about you ask Jane if she received the first sending and if she put a lock on it? That way you know if there’s 2 locks, one is yours, and the other hers. – Cotton Headed Ninnymuggins Jul 10 '20 at 16:41
  • @CottonHeadedNinnymuggins, the man in the middle can do this: accept Mike's packet, send another (can be empty) box with his (or any padlock) to Jane. Then Jane, thinking it was Mike's box, put her padlock, send it back. Then the man put his padlock on Mike's packet, and send it back to Mike. This way, Jane thought she locked Mike's box, while Mike though Jane locked his box. – justhalf Jul 12 '20 at 03:28
  • 1
    @justhalf true that, just seems weird how the middle man knows exactly what’s going on behind the scenes and what each person expects. Very interesting lol – Cotton Headed Ninnymuggins Jul 12 '20 at 04:24
  • @justhalf Also, a simpler explanation for why they can’t get the ring to her is someone can just hold on to the box Mike sends. – Cotton Headed Ninnymuggins Jul 12 '20 at 04:31
104

Solution:

Mike sends a box with the ring locked with the padlock.
Jane attaches her padlock to the box and sends it back to Mike.
Mike removes his padlock and sends the box back to Jane.
Jane removes the padlock and opens the box. She gets the ring and hopefully says "Yes".

Marius
  • 18,049
  • 4
  • 54
  • 101
37

This is just a visual representation of @Marius answer ;)

enter image description here

Narmer
  • 3,567
  • 1
  • 15
  • 31
  • Uhm... I think that @Marius was waiting for that green thick, at least since 3 puzzles ago! – Narmer Mar 30 '16 at 14:48
  • Neh. Don't worry. Nice drawing. you deserve it. – Marius Mar 30 '16 at 14:50
  • 11
    This only works if mike can recognize what Jane's lock looks like or if no one else in Kleptopia has any locks. – Shufflepants Mar 30 '16 at 19:11
  • @Shufflepants Nope, every box that is padlocked can't be stolen. Intercepting and trying to open a box without your name on it can be considered stealing. This doesn't apply in real life, but the specifications are clear enough.. – Narmer Mar 31 '16 at 07:58
  • 4
    @Narmer How does attaching your own lock to the box, returning it to sender and then delivering the empty box qualify as stealing the box? If it does, the question should really be more specific in this instance to rule such things out. Perhaps instead of "boxes cannot be stolen" it should be "boxes are guaranteed to arrive at their destination". But even then, what does Mike do if he gets the box back and there are 3 locks on it, his and 2 others? Seems like the question should also say that no one besides Mike and Jane even have locks. – Shufflepants Mar 31 '16 at 14:11
9

Cheap alternate solution: Mike closes the padlock through the ring's hole and sends it to Jane. She won't be able to actually wear the ring until they meet up in person and Mike can re-open the padlock with his key, but she will nonetheless have the ring.

Whether this is an actual solution depends on (a) how loosely you interpret the goal "get the ring safely to Jane" and (b) whether a Kleptopian thief would steal a padlocked ring, knowing they would have to ruin the ring to get it free of the padlock.

DSimon
  • 191
  • 4
  • 3
    Assumption b is tricky because the OP explicitly states items must be in a padlocked box – cr0 Mar 31 '16 at 13:52
  • 4
    Assumption (b) is also false, as it is imminently possible to hacksaw or bolt-cut through the limb of a padlock. But that fact obviates the entire thought experiment, so it should probably be discounted in the context of the question. – S. G. Mar 31 '16 at 20:02
  • 2
    @S.G. yeah, exactly; we must assume that these are somehow thief-proof padlocks, unless there's something special about padlocked boxes in particular that deters theft. Maybe the Kleptopian postal system sends lots of dummy boxes containing worthless junk around to make random box theft unprofitable? – DSimon Apr 01 '16 at 14:08
  • Assumption b doesn't really matter. If all you have to do is get it to Jane still locked, then just send it in a padlocked box as usual. Obviously this is not the intent of the puzzle, though (assumption a). – Set Big O Apr 01 '16 at 16:21
8

Instead of sending the ring as @Marius describes, Jane sends one of her unlocked locks to Mike using that method instead. Mike then uses Jane's lock to lock the lock-box containing the ring and sends it to Jane. Example:

Jane sends a box containing lock1 secured by lock2 to Mike.

Mike sends the box back now secured by lock2 and lock3 to Jane.

Jane removes lock2 and sends it to Mike.

Mike removes lock3 and uses lock1 to secure the ring in a lock-box and sends it to Jane.

This would prevent the ring from being stolen. Obviously this could lead to an infinite loop of the thief stealing Jane's locks, but the ring is never stolen. Maybe after a few locks are stolen, the thief gives up since he is only getting locks. Or maybe Jane puts a venomous snake in the box, knowing Mike is a trained snake handler ;-)

  • After the thieves steal a few unlocked locks from Jane using @Devsman's solution, they'd wise up and send their own unlocked lock in locked box pretending to be Jane. Then, they just continue to pretend to be Jane and get the ring just as she would. – Rick Feb 16 '22 at 14:44
3

Devsman's answer is wrong. It is possible to send Jane the ring by following these steps:

  1. Mark sends a padlocked box and a message asking Jane a question only they know the answer to, along with these instructions.
  2. Jane keeps the box and sends the answer of the question to Mark if and only if she got the box. (Mark now knows Jane has a box, but we can't be sure that it's the right box)
  3. Mark sends the key to the padlocked box to Jane
  4. Jane uses it to open the padlocked box that she kept.
  5. Inside, she finds a second key and a message that Mark had written, containing the answer to the question (to confirm it's his box), and a second question
  6. Jane answers the second question, only if Mark's answer to the first question was right.
  7. Mark checks the answer, and can be sure that Jane and no one else now has one of his keys. All he has to do is to send the ring in a box locked with that key.

To stop Klep from re-sending the second question as a second try to the first question, they agree that the first question must always have a certain topic (about Jane's life, for example) and the second question must be about a different topic (about Mark's life, for example).

(Kleptomaniac could replace the instructions, but we'll assume that Jane would be smart enough not to answer a personal question through mail for no good reason).

In summary:

M → J: Question A, Instructions and Box A (containing key B, answer to the question A and question B)
J → M: Answer to the Question A if she got the box
M → J: Key A
J → M: Answer B if answer A is correct
M → J: Box B (containing ring) if answer B is correct

Question A is always about Jane's life
Question B is always about Mark's life


This answer assumes that:

  • They have at least two secrets they share (they are lovers)
  • Locked boxes cannot be duplicated, like packets on the internet could
  • 1
    What if Kleptomaniac(K) steals the message in step 1? Jane(J) receives the box from Mike(M), but receives no message. Jane does not know to respond with an answer, therefore step 3 onward do not occur. M--> J (Locked box) and M-->K (message). Mike still has the ring and Jane has a useless box. – Matthew0898 Apr 03 '16 at 21:26
  • 2
    @Matthew0898: your comment gives a way for K to block the exchange from working, but not a way for K to steal the ring. – Peter LeFanu Lumsdaine Apr 03 '16 at 21:37
  • 2
    If Klep copies the instructions and replaces the box with a box with Kleps question, then it is not true that M knows J has M's box. Klep replaces M's key and the passphrase from J with the passphase Klep got out of M's box using M's key. – Ole Tange Apr 03 '16 at 22:41
  • @OleTange: When Jane answers the first question, she tells Mark that she got a box. If Klep had replaced the question, then Mark would have gotten a wrong answer (Klept doesn't know the answer). Then Mark sends the key and there are two possibilities: either Klept swapped boxes, in which case Jane will know since it doesn't contain the answer to the question (Klept didn't know the answer yet when that box was sent), or Jane has Mark's box, which she confirms to him by sending him the passcode. –  Apr 04 '16 at 04:33
  • Also, to clarify, the question and instructions are not in the box. Box A is a box locked with key A containing only key B. –  Apr 04 '16 at 04:36
  • 4
    I don't see how step 3 would work. If he sends the key and it's not inside a locked box, the key will be stolen..? – user1429080 Apr 04 '16 at 07:56
  • 2
    Updated steps 1.5 The middleman keeps Marks box and sends Jane a decoy box and the letter 3.5 Mark sends the key but middleman gets it first. 4.The middleman uses it to open the padlocked box that they kept. 6.The middleman sends the passphrase back to Mark. – ponsfonze Apr 04 '16 at 10:23
  • Klep is able to stop Mark from receiving the ring, but he's not able to steal the ring. –  Apr 04 '16 at 11:45
  • 1
    Maybe Mike sends the key from step 3 in another padlocked box, and the whole process continues recursively until Jane doesn't want to marry him anymore. – Devsman Apr 04 '16 at 12:56
  • @TimC: The key in step 3 (key A) opens the box in step 1 (box A), which Kleptomaniac no longer has. The box with the ring (box B) is opened by the key inside box A. –  Apr 04 '16 at 21:13
2

Assuming that Mike has a padlock to which Jane has a key: Mike uses one of his padlocks to lock the lid of the box to Jane's padlock. He then uses another one to lock the box base to Jane's padlock. Jane can now open the box by opening her padlock, thus disconnecting the two Mike-padlocks (which are still attached to the lid/base respectively).

EDIT: This approach is actually used in real-life scenarios where multiple persons must have access to something without sharing a key: They each provide a padlock, and the padlocks are chained together, ultimately connecting the two parts that must be locked together. http://www.spurgeonworld.com/blog/archives/2006/12/daisy_chains.html

NPVN
  • 5
  • 1
NPVN
  • 29
  • 1
  • 7
    If Mike has a padlock to which Jane has a key, why doesn't he just lock the box with it? – Mad Physicist Apr 04 '16 at 04:17
  • The assumption is explicitly disallowed by the problem spec: "The two of them have many padlocks, but none to which the other has a key." – Mathieu K. Mar 16 '22 at 08:34
2
  1. Jane sends a box with her padlock attached to only the top (lid) hole.
  2. Mike receives the box, inserts the ring into the box.
  3. Mike puts a padlock between the bottom hole and Jane padlock. Linking the two locks.
  4. Sends to Jane, who undoes her lock and wears the ring. But probably wondered why he proposed over the phone, and tells him they should move in together at safe town.

Most efficient I reckon.

ukwizard
  • 21
  • 1
  • How does Mike know it's Jane's padlock that's on the box? Maybe Klep intercepted the box and sent another box with one of his padlocks? –  Apr 04 '16 at 22:47
1

Alternative solution:

Mike has a padlock which has a number combination. He sends the padlocked box to Jane and calls her to tell her the combination.

Edit

If they have met before and he just wishes to send the ring via mail then they have already agreed identifying passwords in person, ensuring no Man in the middle can fake it.

Ilessa
  • 121
  • 4
  • 1
    KKIII would be able to evesdrop on the call. – Code Whisperer Apr 01 '16 at 14:28
  • @itcouldevenbeaboat Doesn't matter - they are lovers - they will, at some point, be in a position to share a secret with eachother. Once that single secret has been established, they can use that secret to exchange information forever. – corsiKa Apr 01 '16 at 15:33
  • He sends the padlocked box to Jane and calls her to tell her the combination AFTER she has confirmed she has received it. – Ole Tange Apr 02 '16 at 03:32
  • @OleTange Someone could have replaced the box. –  Apr 03 '16 at 20:37
  • @Runemoro Yes, and then the code would not work. KKIII cannot listen in as they use Signal Private Messenger for the call. So KKIII can block the reception, but will not get the ring. – Ole Tange Apr 03 '16 at 22:32
  • @OleTange But how will Jane authenticate herself to Mark over the Messenger? Mark could be talking to KKIII, which is simultaneously faking to be Mark on the Phone with Jane.... – Falco Apr 04 '16 at 11:29
  • @Falco It is a voice call. Jane knows Marks voice, and Mark knows Janes sweet sound. On top of that they can use Signal to ensure there is no MITM. – Ole Tange Apr 04 '16 at 11:48
  • If about the combo lock, a good klepto could figure out how to pick one of those by listening for the clicks. – Neo1009 Oct 07 '19 at 16:03
1

Jane sends her padlocked box with the key taped on it. She makes a duplicate key for herself. Klypto won't stole it because it's empty right ? So Mike puts the ring in the padlocked box and make sure he doesn't sends the key with it. Jane can open it since she has a dupilcate key. :)

fixen2011
  • 11
  • 1
1

I've got an alternative solution.

Mike gets two boxes, and puts the ring in one of them (doesn't matter which). then locks them both with each other's key looped through the lock.
When Jane gets both boxes, she will be able to unlock each with the keys.
To ensure that nobody else does this on the way, Mike can send the boxes one at a time, waiting for a confirmation message from Jane before sending the second.
I'm assuming that it would be quite difficult to make a copy of the key while attached to the box.

Matthew Jensen
  • 2,662
  • 1
  • 10
  • 24
0

Mike can get multiple boxes and each has a dummy ring. The box he want Jane to get would be marked with some secret sign that they agreed to in advance. On each of the dummy boxes should have fake combinations for the combo lock. Mike sends each box to different post offices and the Kleptos would be occupied with the other boxes.

Neo1009
  • 247
  • 1
  • 8