nRF5 SDK v13.0.0
Macros | Enumerations | Functions

This file contains all of the enums and definitions that are used for the CryptoCell Lib init and finish APIs, as well as the APIs themselves. More...

Macros

#define DX_VERSION_PRODUCT_BIT_SHIFT   0x18UL
 
#define DX_VERSION_PRODUCT_BIT_SIZE   0x8UL
 

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 (CRYS_RND_Context_t *rndContext_ptr, 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). More...
 
SA_SilibRetCode_t SaSi_LibFini (CRYS_RND_Context_t *rndContext_ptr)
 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 context. More...
 

Detailed Description

This file contains all of the enums and definitions that are used for the CryptoCell Lib init and finish APIs, as well as the APIs themselves.

Function Documentation

SA_SilibRetCode_t SaSi_LibFini ( CRYS_RND_Context_t rndContext_ptr)

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 context.

Returns
SA_SILIB_RET_OK on success.
A non-zero value in case of failure.
Parameters
[in,out]rndContext_ptrPointer to the RND context buffer that was initialized in SaSi_LibInit.
SA_SilibRetCode_t SaSi_LibInit ( CRYS_RND_Context_t rndContext_ptr,
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]rndContext_ptrPointer to the RND context buffer, allocated by the user. The context is used to maintain the RND state as well as pointers to a function used for random vector generation. This context must be saved and provided as parameter to any API that uses the RND module.
[in]rndWorkBuff_ptrScratchpad for the RND module's work.

Documentation feedback | Developer Zone | Subscribe | Updated