I'm totally confused by the public key and private key terms. From my understanding, the "public key" is used for encrypting data, it's more like a lock which can lock something in and only the "private key" (key owner) can unlock it. So why call it "public key", why not call it "public lock"?
If "public key" is the right term and it's referring to key/lock analogy. Then where is the lock? And how these keys, locks work together?
If "public key" is not referring to the key/lock analogy, then could you explain an analogy for me to understand how the asymmetric encryption actually works:
1. when a public key encrypt something, a private key decrypt it
2. when a private key encrypt something, a public key to verify it