Is there a physical lock that can demonstrate asymmetric crytographic principles?
Asked Answered
C

5

10

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?

Cinderella answered 5/2, 2010 at 13:4 Comment(0)
D
13

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 https://web.archive.org/web/20130708131404/http://www.economicexpert.com/a/Asymmetric:key:algorithm.html

Dong answered 5/2, 2010 at 13:8 Comment(2)
For the purpose of demonstration the padlock itself is a "key" (the public key)Bisson
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.Cinderella
P
10

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.

Pembrook answered 6/2, 2010 at 18:34 Comment(2)
What if Eve does the following in each step; 1. keeps box from Alice (let's call it box1) and sends Bob another box (let's call it box2) with Eve's message in it and locked with Eve's padlock, 2. keeps box2 from Bob and sends Alice box1 with Eve's padlock, 3. after getting box1 back from Alice it's only protected with Eve's own padlock (from step 2) so Eve has access to the message in box1 and can send box2 back to Bob (with his padlock) after removing her own padlock (from step 1) from it.Dalmatic
How does Eve remove Alice's padlock without her key in order to move the message to box2? This is where physical examples break down. Digitally, you can copy the entire box and lock. In a physical world, we don't yet have particle replicators like in Star Trek :)Beardsley
L
3

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.

Lilith answered 5/2, 2010 at 13:7 Comment(0)
L
0

The magical lock should have two keys (let's assume they are key1 and key2).

If you lock it with key1 then you can not unlock it with key1.

If you lock it with key2 then you can not unlock it with key2.

If you lock it with key1 then you have to unlock it with key2.

If you lock it with key2 then you have to unlock it with key1.

So, if i lock with key1, then the other person will lock with key2. Then he can lock it with key2, and i will be able to open it with key1.

Let's take one step further. Let us make 1000 copy of key2 and distribute it publicly. Now anyone can take key2 (including thieves and cheats) and lock the box and only me with key1 can open it. This will give us confidentiality.

Now, if i lock a message with key1 then 1000 (including thieves and cheats) people can open it with key2. So, confidentiality goes out the window. Then why would anyone want to do that? Well, it gives us authenticity. I mean, If you were able to open the box with key2, then the message inside was definitely by me as only I have key1.

In encryption world we call key1 private key and key2 public key. The keys are mathematically linked to each other. To be a little more precise, both keys are created with a equation which has lots of solutions. You can only unlock if you can get the solution. Now, key1 has enough hints to get the solution of key2, and key2 has enough hints to get the solution of key1.

That is Asymmetric Encryption in a nutshell.

Lineation answered 20/8, 2022 at 9:20 Comment(0)
D
-1

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

Dunsinane answered 5/2, 2010 at 14:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.