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
- 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.
- Write a setup program for the CSP that creates the appropriate registry entries.
- 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:
- Sign the CSP with the Sign.exe utility, producing a debug signature (.sig) file.
- Install the CSP, using the setup program mentioned previously.
- Run test code that makes calls to the CSP by way of CAPI.
- 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.
- 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.