title: Sign file with public and private keys stored on smart card
body: <p>I develop an application to sign file XML with a public key and a private key stored on a smart card (<strong>IAS-ECC</strong>). I know that my smart card has two certificates (one used for authentication, one used for signature) and private keys. With that in mind, I search desperately documentations and examples to sign correctly my file (the size varies between 4 and 10 ko). All in all, I want obtain a P7M file.</p>
  
  <p>So, my questions are: how to do this? Do I use some libraries like OpenSSL or PKCS11? For the moment, I only try to use APDU commands, but with no results. I would like to know all the steps to do this.</p>
  
  <p>In addition, I discovered on my smart card a CSP (“<em>Cryptographic Service Provider</em>”) by sending APDU commands. Is it useful?</p>
  
  <p>I should specify that I develop on C# with Compact Framework (3.5). If you’ve got an idea, I’m very happy to hear that.</p>
  
  <p>Thank you by advance for your help!</p>
  
  <p>Best regards</p>