Getting started with STCryptoLib

List of STCryptoLib APIs and Description

This section provides an organized overview of the STCryptoLib middleware APIs. It lists the available interfaces with concise descriptions to help you understand and use the cryptographic services effectively.

Configuration options & files

The middleware uses cmox_config.h as its main configuration file. This file contains the user’s customized configuration settings. The cmox_default_config.h file, located in the templates/ folder, provides the default configuration values. This file serves as a user-modifiable template that you can adapt to specific project needs.

In addition to the default configuration, there are two other predefined configuration templates designed for standalone mode operation:

  • Small and Slow: This template uses the cmox_small_config.h file and targets applications that require a minimal memory footprint. It reduces resource usage at the cost of lower performance.

  • Fast and High: This template uses the cmox_fast_config.h file and targets scenarios that require higher execution speed, typically at the expense of increased memory consumption.

Select between these predefined templates based mainly on the memory allocated to cryptographic operations and the performance requirements of your application.

To apply customized configuration values, use the CMOX_DEFAULT_FILE=cmox_config.h preprocessor define. This directive instructs the build system to link the user’s customized configuration file instead of the default templates.

Furthermore, the middleware provides two additional user-modifiable files, cmox_low_level.c and cmox_low_level.h. These files contain sample implementations to initialize the CRC peripheral clock. The application typically performs this hardware setup step before using the cryptographic services.