I am trying to understand the principles of asymmetric encryption, and have read the following in a book:
One key is completely public and can be read and used by everyone. The other part is private and should never be shared with someone else. When you encrypt something with the public key, it can be decrypted by using the private key, and vice versa.
Looks like the public key is not secret. But if I encrypt with the private key, someone can decrypt with the public key which is easily accessible. Where's the logic in that?