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?

  • 19
    $\begingroup$ But the key would still be stolen. Then how will Jane open the box? $\endgroup$
    – Devsman
    Commented Mar 30, 2016 at 16:31
  • 1
    $\begingroup$ 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. $\endgroup$ Commented Mar 31, 2016 at 13:29
  • 35
    $\begingroup$ 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 $\endgroup$ Commented Mar 31, 2016 at 16:51
  • 2
    $\begingroup$ @MikeKellogg I see what you did there ;) $\endgroup$
    – cst1992
    Commented Mar 31, 2016 at 19:45
  • 3
    $\begingroup$ 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. $\endgroup$
    – MichaelK
    Commented Apr 4, 2016 at 10:38

12 Answers 12



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".

  • $\begingroup$ couldn't type fast enough! +1 $\endgroup$
    – John
    Commented Mar 30, 2016 at 14:33
  • 30
    $\begingroup$ +1 for Public-key cryptography $\endgroup$
    – Lacklub
    Commented Mar 30, 2016 at 14:37
  • 28
    $\begingroup$ @Lacklub. Your link talks about Bob and Alice. the question is about Mike and Jane. Totally different things I might say. $\endgroup$
    – Marius
    Commented Mar 30, 2016 at 14:41
  • 6
    $\begingroup$ This only works if Mike can recognize Jane's lock, if no one else in Kleptopia has any padlocks, or if packages are guaranteed to arrive at their destination. $\endgroup$ Commented Mar 30, 2016 at 19:14
  • 1
    $\begingroup$ and here's me thinking that only one padlock could be put on at one time ... snore! $\endgroup$ Commented Apr 4, 2016 at 3:41

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.

  • $\begingroup$ Comments are not for extended discussion; this conversation has been moved to chat. $\endgroup$
    – user20
    Commented Apr 1, 2016 at 18:41
  • 24
    $\begingroup$ Ahh this is the man in the middle attack, and why we need to have CAs. That makes sense $\endgroup$
    – Justin
    Commented Apr 2, 2016 at 15:03
  • $\begingroup$ He can, see my answer. $\endgroup$
    – user9771
    Commented Apr 3, 2016 at 20:34
  • $\begingroup$ What if another MITM is like, heck I'll put 4 padlocks?! Then let the guessing game begin... hehehe $\endgroup$
    – Joe DF
    Commented Oct 8, 2019 at 20:53
  • 1
    $\begingroup$ @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 $\endgroup$ Commented Jul 12, 2020 at 4:24

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

enter image description here

  • $\begingroup$ Uhm... I think that @Marius was waiting for that green thick, at least since 3 puzzles ago! $\endgroup$
    – Narmer
    Commented Mar 30, 2016 at 14:48
  • $\begingroup$ Neh. Don't worry. Nice drawing. you deserve it. $\endgroup$
    – Marius
    Commented Mar 30, 2016 at 14:50
  • 11
    $\begingroup$ This only works if mike can recognize what Jane's lock looks like or if no one else in Kleptopia has any locks. $\endgroup$ Commented Mar 30, 2016 at 19:11
  • $\begingroup$ @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.. $\endgroup$
    – Narmer
    Commented Mar 31, 2016 at 7:58
  • 4
    $\begingroup$ @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. $\endgroup$ Commented Mar 31, 2016 at 14:11

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.

  • 3
    $\begingroup$ Assumption b is tricky because the OP explicitly states items must be in a padlocked box $\endgroup$
    – cr0
    Commented Mar 31, 2016 at 13:52
  • 4
    $\begingroup$ 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. $\endgroup$
    – S. G.
    Commented Mar 31, 2016 at 20:02
  • 2
    $\begingroup$ @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? $\endgroup$
    – DSimon
    Commented Apr 1, 2016 at 14:08
  • $\begingroup$ 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). $\endgroup$
    – Set Big O
    Commented Apr 1, 2016 at 16:21

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 ;-)

  • $\begingroup$ 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. $\endgroup$
    – Rick
    Commented Feb 16, 2022 at 14:44

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
    $\begingroup$ 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. $\endgroup$ Commented Apr 3, 2016 at 21:26
  • 2
    $\begingroup$ @Matthew0898: your comment gives a way for K to block the exchange from working, but not a way for K to steal the ring. $\endgroup$ Commented Apr 3, 2016 at 21:37
  • 2
    $\begingroup$ 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. $\endgroup$
    – Ole Tange
    Commented Apr 3, 2016 at 22:41
  • 4
    $\begingroup$ 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..? $\endgroup$ Commented Apr 4, 2016 at 7:56
  • 2
    $\begingroup$ 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. $\endgroup$
    – ponsfonze
    Commented Apr 4, 2016 at 10:23

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

  • 7
    $\begingroup$ If Mike has a padlock to which Jane has a key, why doesn't he just lock the box with it? $\endgroup$ Commented Apr 4, 2016 at 4:17
  • $\begingroup$ 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." $\endgroup$
    – Mathieu K.
    Commented Mar 16, 2022 at 8:34
  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.

  • $\begingroup$ 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? $\endgroup$
    – user9771
    Commented Apr 4, 2016 at 22:47

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. :)

  • 1
    $\begingroup$ This does not work, because KKIII could take the key, make a copy for himself, then replace the original and send it on. $\endgroup$ Commented Apr 1, 2016 at 14:28
  • 2
    $\begingroup$ KKIII not only could take the key, but will. $\endgroup$
    – Devsman
    Commented Apr 1, 2016 at 19:53

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.


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.

  • 1
    $\begingroup$ KKIII would be able to evesdrop on the call. $\endgroup$ Commented Apr 1, 2016 at 14:28
  • $\begingroup$ @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. $\endgroup$
    – corsiKa
    Commented Apr 1, 2016 at 15:33
  • $\begingroup$ He sends the padlocked box to Jane and calls her to tell her the combination AFTER she has confirmed she has received it. $\endgroup$
    – Ole Tange
    Commented Apr 2, 2016 at 3:32
  • $\begingroup$ @OleTange Someone could have replaced the box. $\endgroup$
    – user9771
    Commented Apr 3, 2016 at 20:37
  • $\begingroup$ @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. $\endgroup$
    – Ole Tange
    Commented Apr 3, 2016 at 22:32

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.


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.


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