Security and Crypto#
The Security and Crypto module provides interfaces for implementing cryptographic operations within the Sidewalk SDK. These interfaces ensure secure data transmission and storage by offering functionalities such as encryption, decryption, hashing, and key management, enabling developers to protect sensitive information across different hardware platforms.
Modules#
Functions#
Initialize sid_pal crypto HAL.
Deinitialize crypto HAL.
Generate random number.
Generate hash.
Generate HMAC.
Encrypt or decrypt using following AES algorithm.
Encrypt or decrypt using AEAD algorithm.
Sign or verify elliptic curve digital signature using given algorithm.
Generate shared secret using private key and public key.
Generate ECC key pair using given algorithm.
Function Documentation#
sid_pal_crypto_init#
sid_error_t sid_pal_crypto_init (void )
Initialize sid_pal crypto HAL.
N/A |
This function initializes the SID PAL crypto HAL and prepares it for cryptographic operations.
244
of file /home/jenkins/workspace/pal-layer-using-doxygen-comments/component/amazon/projects/sid/sal/common/public/sid_pal_ifc/crypto/sid_pal_crypto_ifc.h
sid_pal_crypto_deinit#
sid_error_t sid_pal_crypto_deinit (void )
Deinitialize crypto HAL.
N/A |
This function deinitializes the SID PAL crypto HAL and releases any resources that were allocated.
254
of file /home/jenkins/workspace/pal-layer-using-doxygen-comments/component/amazon/projects/sid/sal/common/public/sid_pal_ifc/crypto/sid_pal_crypto_ifc.h
sid_pal_crypto_rand#
sid_error_t sid_pal_crypto_rand (uint8_t * rand, size_t size)
Generate random number.
[out] | rand | Pointer to rand buffer. |
[in] | size | Size of rand number |
This function generates a random number and stores it in the provided buffer.
267
of file /home/jenkins/workspace/pal-layer-using-doxygen-comments/component/amazon/projects/sid/sal/common/public/sid_pal_ifc/crypto/sid_pal_crypto_ifc.h
sid_pal_crypto_hash#
sid_error_t sid_pal_crypto_hash (sid_pal_hash_params_t * params)
Generate hash.
[inout] | params | Pointer to the hash parameters. |
SHA256 and SHA512 is now supported.
This function generates a hash using the specified parameters.
278
of file /home/jenkins/workspace/pal-layer-using-doxygen-comments/component/amazon/projects/sid/sal/common/public/sid_pal_ifc/crypto/sid_pal_crypto_ifc.h
sid_pal_crypto_hmac#
sid_error_t sid_pal_crypto_hmac (sid_pal_hmac_params_t * params)
Generate HMAC.
[inout] | params | Pointer to the hash parameters. |
HMAC/SHA256 and HMAC/SHA512 is now supported.
This function generates an HMAC using the specified parameters.
289
of file /home/jenkins/workspace/pal-layer-using-doxygen-comments/component/amazon/projects/sid/sal/common/public/sid_pal_ifc/crypto/sid_pal_crypto_ifc.h
sid_pal_crypto_aes_crypt#
sid_error_t sid_pal_crypto_aes_crypt (sid_pal_aes_params_t * params)
Encrypt or decrypt using following AES algorithm.
[inout] | params | Pointer to AES parameters. |
AES-CMAC AES-CTR are supported.
This function encrypts or decrypts data using the specified AES algorithm.
300
of file /home/jenkins/workspace/pal-layer-using-doxygen-comments/component/amazon/projects/sid/sal/common/public/sid_pal_ifc/crypto/sid_pal_crypto_ifc.h
sid_pal_crypto_aead_crypt#
sid_error_t sid_pal_crypto_aead_crypt (sid_pal_aead_params_t * params)
Encrypt or decrypt using AEAD algorithm.
[inout] | params | Pointer to the AEAD parameters. |
This function encrypts or decrypts data using the specified AEAD algorithm.
311
of file /home/jenkins/workspace/pal-layer-using-doxygen-comments/component/amazon/projects/sid/sal/common/public/sid_pal_ifc/crypto/sid_pal_crypto_ifc.h
sid_pal_crypto_ecc_dsa#
sid_error_t sid_pal_crypto_ecc_dsa (sid_pal_dsa_params_t * params)
Sign or verify elliptic curve digital signature using given algorithm.
[inout] | params | Pointer to the ECC DSA parameters. |
This function signs or verifies an elliptic curve digital signature using the specified parameters.
323
of file /home/jenkins/workspace/pal-layer-using-doxygen-comments/component/amazon/projects/sid/sal/common/public/sid_pal_ifc/crypto/sid_pal_crypto_ifc.h
sid_pal_crypto_ecc_ecdh#
sid_error_t sid_pal_crypto_ecc_ecdh (sid_pal_ecdh_params_t * params)
Generate shared secret using private key and public key.
[inout] | params | Pointer to the ECDH parameters. |
This function generates a shared secret using the specified private key and public key.
334
of file /home/jenkins/workspace/pal-layer-using-doxygen-comments/component/amazon/projects/sid/sal/common/public/sid_pal_ifc/crypto/sid_pal_crypto_ifc.h
sid_pal_crypto_ecc_key_gen#
sid_error_t sid_pal_crypto_ecc_key_gen (sid_pal_ecc_key_gen_params_t * params)
Generate ECC key pair using given algorithm.
[inout] | params | Generate ECC key pair using given algorithm. |
This function generates an ECC key pair using the specified algorithm.
345
of file /home/jenkins/workspace/pal-layer-using-doxygen-comments/component/amazon/projects/sid/sal/common/public/sid_pal_ifc/crypto/sid_pal_crypto_ifc.h