STCryptoLib Examples ¶
The STCryptoLib library provides a comprehensive set of cryptographic primitives and utilities for STM32 microcontrollers. To help users understand and integrate these features, the package 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, and key exchange.
These examples are designed to:
Illustrate the correct usage of the STCryptoLib APIs,
Serve as reference implementations for common cryptographic tasks,
Accelerate development and integration of security features in STM32-based projects.
List of STCryptoLib 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. |
|
|
Authenticate and verify a message using the HMAC SHA2 algorithm. |
|
|
Generate and verify a message authentication code using the KMAC algorithm. |
|
|
Perform encryption and decryption using the AES CBC algorithm. |
|
|
Perform authenticated encryption/decryption using the AES GCM algorithm. |
|
|
Perform authenticated encryption and verified decryption using the ChaCha20-Poly1305 algorithm. |
|
|
Encrypt and decrypt a message using the RSA PKCS#1 v2.2 compliant algorithm. |
|
|
Perform encryption and decryption using the SM4 CTR algorithm. |
|
|
Generate random numbers based on known input entropy, nonce, and personalization. |
|
|
Digest a message using the SHA256 algorithm. |
|
|
Hash a message using the SHA3-512 algorithm. |
|
|
Hash a message using the SHAKE algorithm. |
|
|
Hash a message using the SM3 algorithm. |
|
|
Establish and verify a shared secret using the ECDH algorithm over SECP256R1 curve. |
|
|
Sign and verify a message using the ECDSA algorithm. |
|
|
Perform signature and verification of a message using the SM2 algorithm. |
|
|
Perform signature and verification using the RSA PKCS#1 v1.5 compliant algorithm. |
|
|
Sign and verify a message using the RSA PKCS#1 v2.2 compliant algorithm. |
For the complete list of STCryptoLib examples, see STCryptoLib examples.