I'm new to cryptography and still trying to understand the way an asymmetric cryptography works. Here's what I learned yet -
If Bob wants to send Alice a message, Bob will encrypt the message with his PUBLIC key, and that key will be made available to everyone. But decryption can only be done using the PRIVATE key.
So if Alice has the PRIVATE key, she will be able to use the combination of Public + Private to decrypt the message.
Here are the questions:
Where does the private key generate from? (If I encrypt a message using a public key suppose 'abc', will the application generate a private key that goes along with it, suppose '123'? I don't exactly understand how the receiver will get the private key.)
Asymmetric is said to be more secure because there are two keys, but at the end, if the public key is in literal sense, public, then it does not exactly make any difference, does it?)
Is there a relation between the public and private key? Because if the encryption is done using the public key, then how does the private key hold the power to decrypt the message?
A small example of how both the keys work would be appreciated.
I tried finding the answers, but none of the explanations seem to describe this confusion in detail.