Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
CryptoCell library basic APIs
Enumerations | |
enum | SA_SilibRetCode_t { SA_SILIB_RET_OK = 0, SA_SILIB_RET_EINVAL_CTX_PTR, SA_SILIB_RET_EINVAL_WORK_BUF_PTR, SA_SILIB_RET_HAL, SA_SILIB_RET_PAL, SA_SILIB_RET_RND_INST_ERR, SA_SILIB_RET_EINVAL_HW_VERSION, SA_SILIB_RET_EINVAL_HW_SIGNATURE, SA_SILIB_RESERVE32B = 0x7FFFFFFFL } |
Functions | |
SA_SilibRetCode_t | SaSi_LibInit (void *rnd_ctx, CRYS_RND_WorkBuff_t *rndWorkBuff_ptr) |
This function Perform global initialization of the ARM CryptoCell 3xx runtime library; it must be called once per ARM CryptoCell for 3xx cold boot cycle. Among other initializations, this function calls CRYS_RND_Instantiation and CRYS_RND_SetGenerateVectorFunc to initialize the TRNG and the primary RND context. An initialized RND context is required for calling RND APIs and asymmetric cryptography key generation and signatures. The primary context returned by this function can be used as a single global context for all RND needs. Alternatively, other contexts may be initialized and used with a more limited scope (for specific applications or specific threads). | |
SA_SilibRetCode_t | SaSi_LibFini (void *rnd_ctx) |
This function finalize the library operations. It frees the associated resources (mutexes) and call hal and pal terminate functions. the function also call CRYS_RND_UnInstantiation to clean the rnd state. |
Enumeration Type Documentation
enum SA_SilibRetCode_t |
Definitions for error returns from SaSi_LibInit or SaSi_LibFini functions.
- Enumerator:
Definition at line 58 of file sns_silib.h.
Function Documentation
SA_SilibRetCode_t SaSi_LibFini | ( | void * | rnd_ctx ) |
This function finalize the library operations. It frees the associated resources (mutexes) and call hal and pal terminate functions. the function also call CRYS_RND_UnInstantiation to clean the rnd state.
- Returns:
- SA_SILIB_RET_OK on success.
- A non-zero value in case of failure.
- Parameters:
-
[in,out] rnd_ctx Pointer to the RND state buffer that was initialized in SaSi_LibInit.
SA_SilibRetCode_t SaSi_LibInit | ( | void * | rnd_ctx, |
CRYS_RND_WorkBuff_t * | rndWorkBuff_ptr | ||
) |
This function Perform global initialization of the ARM CryptoCell 3xx runtime library; it must be called once per ARM CryptoCell for 3xx cold boot cycle. Among other initializations, this function calls CRYS_RND_Instantiation and CRYS_RND_SetGenerateVectorFunc to initialize the TRNG and the primary RND context. An initialized RND context is required for calling RND APIs and asymmetric cryptography key generation and signatures. The primary context returned by this function can be used as a single global context for all RND needs. Alternatively, other contexts may be initialized and used with a more limited scope (for specific applications or specific threads).
- Note:
- The Mutexes, if used, are initialized by this API. Therefore, unlike the other APIs in the library, this API is not thread-safe.
- Returns:
- SA_SILIB_RET_OK on success.
- A non-zero value in case of failure.
- Parameters:
-
[in,out] rnd_ctx Pointer to the RND state buffer, allocated by the user. This state must be saved and provided as parameter to any API that uses the RND module. [in] rndWorkBuff_ptr Scratchpad for the RND module's work.
Generated on Tue Jul 12 2022 13:55:22 by
