开发者

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

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 w开发者_开发百科ith two keys, one that only locks the lock and another that only unlocks the lock?


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


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.


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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜