Custom Crypto Service Provider RRS feed

  • Question

  • Hi, i need to use my own CSP, but i cannot find how to use it in .net. I saw it in CAPICOM, but i want to use .net only.
    Does anyone used own CSP in .net? Or does anyone wrote own wrapper for CAPI for using own CSP?

    Best regards, Mark
    Wednesday, May 21, 2008 9:03 AM


  • Mark Antony,


    Based on your post, you have the own Cryptographic Service Providers developed in unmanaged code (Win32 and COM) component. You would like to use it in .NET projects. The problem turns to be the interop issues between the managed and unmanaged platform. You need to use RCW(Runtime-Callable Wrapper) that is the proxy used in calling unmanaged code from managed code. The article Calling COM Components from .NET Clients provides you all the aspects with this interop issue.


    If you choose to use the .NET CryptoServiceProvider such as RSACryptoServiceProvider class in System.Security.Cryptography namespace, this is the simplest way to use CSP in .NET development. Except the managed CSP, I would like to provide you the comments as follows:


    1. The basic information on Cryptographic Service Providers of Win32 COM development in the link below:




    2. There is an example on .NET Security Blog uses some interop with CAPI: PKCS#12 in .NET


    Hope that can provide you some idea.

    Monday, May 26, 2008 9:38 AM