title: Exporting and importing RSA keys
body: <p>I have created an app that creates a signed XML file.
  Microsoft has some straight forward examples it was not that difficult to implement but much is hidden/ encapsulated in the libraries below<br/></p>
  
  <p>System.Security.Cryptography<br/>
  System.Xml,<br/>
  System.Security.Cryptography.Xml<br/></p>
  
  <p>I now need to export the public key and put it (the public key) in a second application so it can verify that the signed XML document is genuine.<br/>
  My second application can then enable/disable various program features based on the contents of the signed XML file.<br/>
  Microsoft goes on about not exporting the contents of the key container but that is exactly what I think I need to do because in my mind I need to accomplish a couple of things.<br/>
  One as mentioned above I need to export the public key and then import it into a key container that resides in the application that uses the signed XML file.
  Secondly I think I need to export both private and public keys in order to back them up.
  Since my application will be distributed with the public key I need to back up the public, the private key and the hashing algorithm in a safe location. <br/> 
  Microsoft goes on about not exporting keys to clear text but I am uneasy/and don't know how to back up the key container and I'm unsure how to look at the thing and know what I want to store is actually in there when I try to view the key container in the debugger it seems to go on forever (some sections appear to repeat recursively??)<br/>
  Can anyone offer advice on how to export/import RSA keys to a key container and an approach to backing up mykeys or contaner?.<br/></p>