RSA: how does it work and how is it more secure than symmetric systems Before starting the question, I know that RSA is naturally a key exchange cryptosystem rather than an antilogarithm fully implemented for encrypting and decrypting data since the length of the secret data relies on the key size of RSA. Now, we know that RSA is asymmetric means it has a public key and a private key.I know that one should not be able to decrypt an encrypted key using RSA by the public key while the secret is decryptable by the private key. I've also read that (may be I'm confused and mistaken) the public key is calculated based on the private key.

Now I have some questions, when using this algorithm in C# using the cryptography namespace, we have to serialize and export the private members of the key (private key) to be able to decrypt the secret. So what is the purpose of the public key, how is it public at all, and how does it introduce a higher level of security to the algorithm.

Let's say I do the same using AES, then I'm gonna have two Keys (Key, IV) which are only shorter in size. Except for the length of key, how RSA is more secure than AES then. If I don't exchange the public key, what is the purpose of it, if I do but nobody can use it to break the secret then what is the purpose of it again?
With regards to the public vs private keys, in RSA, the public key is used to encrypt information, the private key is used to decrypt it. Given only the public key, all you can do is encrypt. So, you can publish that online somewhere (key distribution is a very different problem). Anyone can use it to encrypt a message to you and only you can decrypt it.

Think of it this way. You give your friend a padlock and a wooden box. The padlock is unlocked. Your friend can put anything they want in the wooden box, put the padlock on, and lock the padlock. Now, only you, who knows the combination, can get at whatever was place in the box. In this example, the padlock is the public key, the combination is the private key. Having possession of the padlock (the public key) should not easily reveal the combination (the private key).