Writing a CSP

Once you have decided which cryptographic algorithms and data formats are to be included in your CSP and obtained implementations for each of them, putting together a CSP is comparatively straightforward.

    To create a CSP

  1. Create a DLL that exports all of the CSPI functions.

    If your CSP has hardware components, this might also involve writing a smart- card device driver and/or the embedded code that runs on the card.

  2. Write a setup program for the CSP that creates the appropriate registry entries.
  3. Test the CSP. This can only be done using the CSP Developer's Kit and the Microsoft Windows CE Platform Builder. Testing the CSP involves the following substeps:
    1. Sign the CSP with the Sign.exe utility, producing a debug signature (.sig) file.
    2. Install the CSP, using the setup program mentioned previously.
    3. Run test code that makes calls to the CSP by way of CAPI.
  4. Have the CSP signed by Microsoft. This enables the CSP to be used with the released versions of Windows CE and Windows-based desktop platforms. This procedure is described in Getting CSPs Signed.
  5. Test the CSP again. This is the same as step 3, except that the original signature and the release version of Windows CE are used.