STFCF Examples ¶
The STFCF (STM32 Flexible Crypto Framework) library provides a robust set of cryptographic services and utilities for STM32 microcontrollers. To help users understand and integrate these features, the library includes a variety of example applications. Each example demonstrates a specific cryptographic operation or use case, ranging from message authentication and hashing to encryption, decryption, digital signatures, key management, and key exchange.
These examples are designed to:
Illustrate the correct usage of the STFCF APIs,
Serve as reference implementations for common cryptographic tasks,
Accelerate development and integration of security features in STM32-based projects.
The examples use a default implementation but can be tailored to the hardware in use. This flexibility lets you adapt the examples to best leverage the specific cryptographic capabilities of the target STM32 device.
List of STFCF Examples ¶
Below is a list of available examples, each with a brief description of its purpose and functionality:
|
Example Name |
Description |
|---|---|
|
Authenticate and verify a message using the AES CMAC algorithm. |
|
|
Perform the generation and the verification of a known message authentication code (MAC) of a plaintext using the HMAC SHA256 algorithm. |
|
|
Perform encryption and decryption using the AES CBC algorithm. |
|
|
Perform authenticated encryption/decryption with associated data (AEAD/ADAD) using the AES CCM algorithm. |
|
|
Use the PSA Crypto opaque driver based on the STM32 Key Wrap Engine to wrap the AES‑ECB private key. Then use the wrapped key to perform encryption and verify the decryption with the AES‑CBC algorithm. |
|
|
Perform authenticated encryption/decryption with associated data (AEAD/ADAD) using the AES GCM algorithm. |
|
|
Perform an authenticated encryption and a verified decryption using the Chacha-Poly1305 algorithm. |
|
|
Perform encryption and decryption of a message using the RSA PKCS#1 v2.2 compliant algorithm. |
|
|
Perform encryption and decryption of a message using the RSA PKCS#1 v2.2 compliant algorithm. |
|
|
Use the RandomGeneration DRBG. |
|
|
Perform the digest of a known message using the SHA256 algorithm. |
|
|
Use the Mbed TLS PSA opaque driver with the STM32 Key Wrap Engine to wrap ECDSA keys. Then use the wrapped key to export the public key. |
|
|
Establish and verify a shared secret using the ECDH algorithm over SECP256 curve. |
|
|
Perform the signature and verification of a known message using the ECDSA algorithm over SECP256 curve. |
|
|
Perform the signature and verification of a known message using the RSA PKCS#1 v1.5 compliant algorithm. |
|
|
Perform the signature and the verification of a known message using the RSA PKCS#1 v1.5 compliant algorithm. |
|
|
Perform the signature and the verification of a known message using the RSA PKCS#1 v2.2 with the Chinese Remainder Theorem (CRT) representation. |
|
|
Perform the signature and the verification of a known message using the RSA PKCS#1 v2.2 compliant algorithm. |
|
|
Use the Mbed TLS PSA opaque driver with STM32 Key Wrap Engine to generate a wrapped ECDH private key. |
For the complete list of STFCF examples, see STFCF examples.