Compiling and linking

The following options are available if you want to integrate the nShield PKCS #11 library with your application. Depending on how your application integrates with PKCS #11 libraries, you can:

  • statically link the nShield PKCS #11 library directly into your application

  • dynamically link the nShield PKCS #11 library into your application

  • create a plug-in shared library that contains the nShield position-independent code object files together with your own adaptation facilities.

You may freely supply your users with the compiled library files linked into your application or into a plug-in library used for your application.

The nShield PKCS #11 library includes the PKCS #11 header files pkcs11.h, pkcs11t.h, and pkcs11f.h from the RSA Data Security, Inc. Cryptoki Cryptographic Token Interface. Any work based on this interface is bound by the following terms of RSA Data Security, Inc. Licence, which states:

License is also granted to make and use derivative works provided that such works are identified as derived from the RSA Data Security, Inc. Cryptoki Cryptographic Token Interface in all material mentioning or referencing the derived work.

For more information about using the available libraries, see the Include Paths and Linking section in the nCore API Documentation on the Security World Software installation media.


All versions are built with Visual Studio 2017. Entrust supplies the following files:

  • %NFAST_HOME%\bin\cknfast.dll and %NFAST_HOME%\toolkits\pkcs11\cknfast.dll: a dynamically linked library

    Both files are identical.
  • %NFAST_HOME%\c\ctd\lib\cknfast.lib: a stub for applications that link to cknfast.dll

  • %NFAST_HOME%\c\ctd\lib\libcknfast.lib: a static library with position-independent code


Entrust supplies the following libraries:

  •,, or a standard, dynamically linked, shared library that can be used to create applications that must be dynamically linked with the nShield libraries at run time. On platforms where thread safety requires programs to be compiled differently from non-threaded programs, these libraries are compiled thread-safe.

  • libcknfast.a: a standard, non-shared library used to statically link an application.

  • libcknfast_thrpic.a: a non-shared library, compiled as threadsafe position-independent code.

On the Developer installation media, each library is provided with a corresponding set of header files. All the header files for each version are very similar, but some header files (particularly those that contain information about compiler and configuration options) differ by version.

These types of library are provided compiled with the following C compilers for Linux libc6.11:

Library Type Build Notes


This type of library is built with gcc 4.9.2 in 32-bit mode.


This type of library is built with gcc 4.9.2 in 64-bit mode.