views:

100

answers:

4

I wish to demonstrate asymmetric encryption using real-world locks. For example, I want to write a secret on a piece of paper and deposit it in a locked box. Is there a lock I can buy that comes with two keys, one that only locks the lock and another that only unlocks the lock?

+3  A: 

Use a box with two doors and two different locks. Arrange the internals of the box so it works one way, similar to a street corner mailbox.

Alternatively, view the box plus padlock combination as the encryption key. You construct a message by getting 1) a box, 2) padlock, 3) putting something in the box and locking it. The physical key for that padlock is then the decryption key, which fits the model since the encryptoin key can't unlock the message.

Roger Pate
+8  A: 

The usual example is a padlock and a key for it.

Bob gives Alice a padlock (his "public key") and he keeps the key for that padlock (his "private key").

Alice puts a message in a box, and snaps the padlock on to it. She then sends the box to Bob.

Bob can unlock it with his key.

An extended version of this is described at http://www.economicexpert.com/a/Asymmetric:key:algorithm.html

David Dorward
For the purpose of demonstration the padlock itself is a "key" (the public key)
Paolo
I like how this works. It is a bit unfortunate that the public *key* is represented using a physical *lock*... hopefully it won't confuse people too much. It looks as if this example has worked before on other audiences.
Adam Paynter
A: 

If you want to take it a step further, check out CoreStreet's smart card lock products. This is their business.

Brian Kelly
+3  A: 

I like David's answer, but just thought I'd mention that I've seen that demonstrated as a bad example of security - the reasoning was that there was no way to ensure that Alice received the padlock that Bob sent (Eve could swap it for a different padlock in transit)

The demonstration then moved on to an example with one box and two padlocks, which was demonstratively secure...

Alice puts message inside the box and locks it with her padlock (public key padlock) Sends box to recipient (Bob)

Bob adds another padlock (private key padlock) Sends box back to Alice

Alice removes the public key padlock (with her key), meaning the package is now protected only by the private key.

Alice returns box to Bob who can now unlock with the private key.

For added effect you can have an Eve passing the boxes back and forth and showing that at no point can Eve get into the box. Its a great physical example, and easily understandable to showing the package is secure at all points.

PaulG