Search code examples
cryptographylockingencryption-asymmetric

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 with two keys, one that only locks the lock and another that only unlocks the lock?


Solution

  • 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