Saturday, December 22, 2007

Box, Locks, 'n' Keys

You have a friend living in a police state. The police open everything they can, inspect and read it, and then deliver it. They deny they do this. You want to send your friend something in a box that the police won't see.

Both you and your friend have your own sturdy boxes, pad locks, and keys. Neither of you has keys to the other's locks. If you send your friend a box with no pad lock, and he sends it back with one of his locks, you won't be able to open it because you won't have the key. If you send him an unlocked box with your pad lock and matching key inside, the police will copy the key before delivering it.

How can you send him something in a box so that the police can't get to it without it being obvious that they broke into the box?


I heard this puzzle this morning on an NPR show, Car Talk.

6 comments:

matt said...

for starters, cartalk.com (under Our Lousy Radio Show) has more puzzlers than you can possibly count, assuming you can't count past like 1000

my thoughts, presuming the gov throws out the packaging so the recipient can't tell who it's from:

1. put a combination lock on the box and call your friend when the box arrives

2. mail a letter with a key separately from the package, telling your friend to call you when he has the key... then send the box

3. mail the box and email your friend a photograph of the key (or, better yet, CAD drawings)

mrLee said...

Well, in general I CAN count past 1000 as long as you don't try to test me at 12:05 a.m. Jan 1.

Touchée for your answers. Given how I wrote it, those would work and you would by now be successfully exchanging holiday fruit cakes with your friend Boris w/o interference from the KGB.

However, when they gave it on the radio, they said some things, which I've now forgotten, that constrained the problem.

I found it written out on Car Talk's site and I'm sure when they said it on-air they did not say it like this

http://www.cartalk.com/content/puzzler/transcripts/200750/index.html

But even their web version doesn't explain everything very well.

Let me add some more conditions to make the problem more like what I think they meant: Suppose that the gov't would read all emails, open any envelopes, copy any keys, and eavesdrop on any phone call. In short, there is no info you could send that they would not also have and no key they would not get a copy of. Could you still come up with a way?

btw, 7:55 a.m. on Sunday before Christmas is pretty early to be solving puzzles! do you always get up this early on a day off?

Benjamin P Lee said...

Kooz always did keep strange hours :) and was always good at thinking outside the "sturdy box".

My guess would be for each of you to mail your unlocked locks to each other first.

Whenever one of you had to send a message to the other, you would put the message/object in the box you had and lock it with the other's key. Your friend still has his key and can unlock your package, but the authorities can't.

Whenever he received your package he would need to send the lock back (so that you could send more messages) but always keep his key.

This would only work under the assumption that they couldn't xray your lock or otherwise figure out how to unlock it later, just from seeing the lock.

Basically its just a physical variation of public key encryption** principals. You let the world know of a way to hide information meant for you that only you can access.

** MUCH simpler and without all the crazy math and need for HUGE probably prime numbers. The downside is that the key can't be used to hide information by itself (like a PKE scheme would allow) so its not as easy to verify the shipper as you could with PKE. The authorities could intercept your original package, figure out what you were trying to do and mail it right back with a note saying that "you" thought the whole idea was bad and that he should give up.

matt said...

yeah i get up early all the time... and when kim has to work, i get up when she gets up if i have the day off.

ben, i like your idea. the phone call part would work best if the friend got the message and called you, then he has the package and can then get the combination. especially if one of the numbers is something like "the address of the house we lived in when i started dating my wife," which alternatively (in this case) could be "the ultimate answer, to life, the universe... and everything!"

mrLee said...

well you've come up with some other ways to do this than I did.

I was thinking, mail an empty box along with one of your locks, still open, inside the box.

your friend puts the item inside and locks the box with your lock. he can no longer open it, but he doesn't need to. he mails the locked box back to you. you have the key to open it already.

everyone have a great christmas

matt said...

they posted the answer:

you mail the box with your own lock(s), as many as you want. your friend puts his own lock on the box and mails it back. you remove your lock(s) and send it back, where he removes his lock.