Cryptographic Service Provider #11 - Technical overview

Choices

The CSP #11 uses the PKCS #11 API implementation of OpenSC.

This choice was made because the Crypto API of Microsoft® does not allow more than we can do with the PKCS #11 API. So using the PKCS #15 implementation of OpenSC could be useless in such context.

Another point is, using a PKCS #11 implementation permits other people to code the CSP #11 and link it with their own PKCS #11 implementation (restricted to the license application).

Downloading it

Get the CVS sources at the CVS repository

Compiling it

In order to compile csp-eleven with a free (as freedom) environment, you will need Cygwin. The compilation is greatly inspired by OpenSC way of live, but remains independant (for the moment, or perphas ad vitam).

Theses CygWin programs are needed in order to

Compile

Edit wincrypt.h from win32api distribution (/usr/include/win32) and comment:

  typedef struct _VTableProvStruc .... (line 352 I guess)
  

Get the sources tree, jump into it, and

  make
  

Make the documentation

Jump into the sources tree, and

  make doc
  

Installing it

In order to install it, just install OpenSC Windows® binaries DLL and csp-eleven DLL in your windows system directory (system or system32 depending on your Windows® version). Create a copy of "opensc-pkcs11.dll" in "csp11-pkcs11.dll".

Read the README file in order to install cspSign from Microsoft® CSPDK. You will understand why the "make install" is not perfect.

CSP Eleven uses the "csp11-pkcs11.dll" dynamic load library.

I have to warn you that the csp DLL will not be usable with Windows 2000® SP3 or above. In order to test it you have to "attach kernel debugger to it", but I do not know how to do it with cygwin/mingw environment.

make install

Testing it.

Jump into the sources tree, and

make tests

Cryptography and Windows®

Cryptography and Windows overview

Cryptographic context overview

CSP #11 context data structures

Thanks :)

Valid XHTML 1.0!