corePKCS11  V3.0.1
PKCS #11 Cryptoki Library
Design

Memory requirements of the PKCS #11 library.

Memory Requirements

Code Size of corePKCS11 (example generated with GCC for ARM Cortex-M)
File
With -O1 Optimization
With -Os Optimization
core_pkcs11.c
0.8K
0.8K
core_pki_utils.c
0.5K
0.3K
core_pkcs11_mbedtls.c
7.1K
6.2K
Total estimates
8.4K
7.3K

PKCS #11 Wrapper Dependencies

Currently, the PKCS #11 wrapper library has a dependency on:

  • FreeRTOS
  • The C standard library stdint
  • PKCS #11.

Note: "core_pkcs11.h" should always be included first as it defines the macros that are needed by the standard PKCS #11 header files.

dot_inline_dotgraph_1.png
PKCS #11 wrapper direct dependencies

PKCS #11 Software Implementation Dependencies

PKCS #11 is a flexible library, and can easily be swapped out for other implementations. The PKCS #11 library documented here is a software based implementation, to allow for writing libraries and code that can easily interface with Hardware Security Modules (HSM).

Currently, the software based PKCS #11 library has the following dependencies:

  • The API defined by the PKCS #11 specification. The headers used can be found here.
  • The PKCS #11 PAL layer. This is used for writing PKCS #11 objects to flash.
  • FreeRTOS. This library uses FreeRTOS primitives, like semaphores.
  • mbed TLS. This library uses mbed TLS for the cryptographic logic. Some examples include parsing key and certificate objects, signing operations, and creating digests.
  • The standard C library string, for memory manipulation.
dot_inline_dotgraph_2.png
PKCS #11 implementation direct dependencies

PKCS #11 Utilities Dependencies

The PKI utils module is a forked version of the PKI utilities provided by mbed TLS. They are used to convert from Currently, the module has the following dependencies:

  • The standard C library
  • FreeRTOS
dot_inline_dotgraph_3.png
PKCS #11 Utilities Dependencies