2
$\begingroup$

Have I understood this correctly?

  1. To use a key and lock analogy. With an asymmetric pair of keys (when used to encode) can either key be used to encode the message (close the lock) and only the "pair" be used to decode (open the lock)?

  2. Taking the key analogy further, is it a useful comparison to say that the first key of the pair changes the lock after it is used so that only the "not yet used" key of the asymmetric pair can open the lock?

  3. The description of keys as "public" and "private" is only a convention that relates to their use and not the order in which they are used i.e. can use 3.1 public then private (encoding for one intended recipient) or 3.2 private then public (digital signatures)?

Edit: Wording of point 2 altered following comment by Maarten Bodewes.

$\endgroup$
  • 4
    $\begingroup$ Assuming a public key encryption scheme, and not signatures: I think your analogy might be more helpful if you picture the public key as a lock box rather then a lock; The public key is like a lock box, and the private key is the key to lock. It is easy for anyone to put something into the open box and close the auto-locking lid (the public key operation), even if you do not have the key to operate the lock on the box (the private key operation). $\endgroup$ – Ella Rose Jul 22 '17 at 16:51
  • $\begingroup$ This is a better analogy imo. Watch this enlightening video: m.youtube.com/watch?v=dleUxfghd5I $\endgroup$ – 4D Neuron Aug 21 '17 at 13:34
  • $\begingroup$ Comparison is not reason. $\endgroup$ – fgrieu Oct 20 '17 at 15:54
1
$\begingroup$

To use a key and lock analogy. With an asymmetric pair of keys (when used to encode) can either key be used to encode the message (close the lock) and only the "pair" be used to decode (open the lock)?

No, not in practice. Although some systems work kind-off like that, for instance raw (unpadded) RSA, others do not. Besides that, one key is supposed to be public so anybody could use that key to open the lock. Locks are used to emulate encryption, and encryption is used for confidentiality. If you use the private key to lock then anybody could open the lock. That's not a good way to achieve confidentiality.

The confusion mainly seems to arise from RSA where signature schemes were seen as encrypting a (padded) hash value. Nowadays the specification of secure RSA goes out of the way to make sure this confusion doesn't arise. More information here.

Taking the key analogy further, is it a useful comparison to say that the first key of the pair changes the lock after it is used so that only the asymmetric key of the pair can open the lock?

Both keys in the key pair are asymmetric to each other. So there is not one asymmetric key, but two (or more). The analogy is already broken, it doesn't make sense to take it further.

The description of keys as "public" and "private" is only a convention that relates to their use and not the order in which they are used i.e. can use 3.1 public then private (encoding for one intended recipient) or 3.2 private then public (digital signatures)?

Yes, that is right.

$\endgroup$
  • $\begingroup$ I take your point about my point 2. My wording was misleading. I have tried to re-express more clearly what I meant by altering point 2 while not trying to make the wording too cumbersome. $\endgroup$ – Clive Long Jul 22 '17 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.