Skip to main content
Visitor
October 24, 2026
Question

X-CUBE-CRYPTOLIB V5.x.x – Thread safety and reentrancy confirmation

Hello ST team,

In a previous discussion, ​@Jocelyn RICARD confirmed that X-CUBE-CRYPTOLIB V4.x was not reentrant, partly due to its use of the CRC hardware peripheral.

I understand that V5.0.0 no longer depends on the CRC peripheral, but I could not find an explicit statement in the documentation regarding thread safety or reentrancy.

Could you please clarify the following?

  1. Is X-CUBE-CRYPTOLIB V5.0.0 fully reentrant and thread-safe when called concurrently from different RTOS tasks, provided that each task uses independent contexts and buffers?

  2. Does this also apply to single-call APIs such as cmox_hash_compute() and cmox_cipher_encrypt(), which do not expose an explicit context?

  3. Can ST confirm that V5.0.0 does not use any shared mutable internal state that could prevent concurrent execution?

  4. Is any external synchronization (e.g., an RTOS mutex) required when calling CMOX APIs from multiple tasks?

We would like to determine whether a global mutex, previously necessary with V4.x, can safely be removed when migrating to V5.0.0.

Thank you for your support.