Mistake on this page?
Report an issue in GitHub or email us
Macros | Enumerations | Functions
CryptoCell library basic APIs

Macros

#define DX_VERSION_PRODUCT_BIT_SHIFT   0x18UL
 
#define DX_VERSION_PRODUCT_BIT_SIZE   0x8UL
 

Enumerations

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). More...
 
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. More...
 

Detailed Description

Macro Definition Documentation

#define DX_VERSION_PRODUCT_BIT_SHIFT   0x18UL

Internal defintion for the product register.

Definition at line 72 of file sns_silib.h.

#define DX_VERSION_PRODUCT_BIT_SIZE   0x8UL

Internal defintion for the product register size.

Definition at line 74 of file sns_silib.h.

Enumeration Type Documentation

Definitions for error returns from SaSi_LibInit or SaSi_LibFini functions.

Enumerator
SA_SILIB_RET_OK 

Success defintion.

SA_SILIB_RET_EINVAL_CTX_PTR 

Illegal context pointer.

SA_SILIB_RET_EINVAL_WORK_BUF_PTR 

Illegal work buffer pointer.

SA_SILIB_RET_HAL 

Error returned from HAL layer.

SA_SILIB_RET_PAL 

Error returned from PAL layer.

SA_SILIB_RET_RND_INST_ERR 

RND instantiation faied.

SA_SILIB_RET_EINVAL_HW_VERSION 

Invalid HW version.

SA_SILIB_RET_EINVAL_HW_SIGNATURE 

Invalid HW signature.

SA_SILIB_RESERVE32B 

Reserved.

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_ctxPointer 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_ctxPointer 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_ptrScratchpad for the RND module's work.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.