title: encryption and decryption using certificates in C#
body: <p>I have a big XML that needs to be encrypted on one server (by one c# application), and needs to be decrypted on another server (by another c# application). The XML contains the critical  information for which this encryption needs to be done.</p>
  
  <p>My real need is that my server that does the encryption should <strong>only</strong> know the public key and the private key is known only to the server which is doing the decryption. Also, this private key should be stored in a safe area on the server such as certificates.</p>
  
  <p>What should be the steps that can help me achieve so?</p>
  
  <ol>
  <li>Can I generate my private key and store that in certificates or the certificates will generate the private key on their own?</li>
  <li>Also, if certificates generate the public and private key, can the public key be separated from the certificate and exported to the server where the encryption has to be done?</li>
  </ol>