When explaining public key encryption, people commonly use the imagery of keys and padlocks. However, most padlocks have only one key (i.e. only one bitting), and work like this:
- The padlock can be locked without any keys; and
- The padlock can be unlocked only using the key.
Is there a class of padlocks that, instead, functions roughly like public key encryption does? That is, such that for each padlock, there are two keys, and:
- The padlock can only be locked by using key 1; and
- The padlock can only be unlocked by using key 2.
I don't require specific make or model recommendations. Nor do the padlocks need to be secure, as I would be using them as teaching aids: they could even be made of plastic, as long as they function as above.
My question: do such padlocks exist, and, if so, what is this class of padlocks called, so that I can look them up and evaluate the options available?
(The next best option I can think of would be to make a box with two doors, each with its own, differently-keyed lock: one "public" and one "private". However, this would weaken the analogy somewhat. Hence the question above.)