STCryptoLib Best Practices ¶
Ensure proper initialization of hardware CRC peripheral ¶
Before using STCryptoLib, initialize the CRC peripheral in your application. The library relies on this peripheral for correct linking and operation integrity.
Use the CMOX API for accessing crypto and common services ¶
Access cryptographic functions and runtime services through the CMOX API. The API provides ready-to-use include files and abstracts complexity.
Consider hardware dependencies at the application level ¶
Because STCryptoLib only has a loose dependency on the hardware CRC IP, your application must manage all hardware dependencies properly to ensure reliable operation.
Refer to examples provided by ST for optimized usage ¶
Refer to the provided examples demonstrating STCryptoLib usage to accelerate development and avoid common pitfalls.
Use the default configuration as a starting point ¶
Begin with the provided
cmox_default_config.h
template to ensure a stable baseline configuration before customization.
Choose the appropriate configuration template based on application needs ¶
Select between the “small and slow” footprint
cmox_small_config.h
or the “fast and high” execution
cmox_fast_config.h
standalone
templates according to your memory constraints and performance requirements.
Apply custom configuration via preprocessing defines ¶
Use the
CMOX_DEFAULT_FILE=cmox_config.h
define to specify and link your customized configuration file, enabling flexible and
maintainable configuration management.