Defines all functions of mcuxClSession.
More...
|
| mcuxClSession_Status_t | mcuxClSession_init (mcuxClSession_Handle_t pSession, uint32_t *const pCpuWaBuffer, uint32_t cpuWaLength, uint32_t *const pPkcWaBuffer, uint32_t pkcWaLength) |
| | Initialize a Crypto Library session.
|
| mcuxClSession_Status_t | mcuxClSession_setResource (mcuxClSession_Handle_t session, mcuxClResource_Context_t *pResourceCtx) |
| | Set the resource context in a Crypto Library session.
|
| mcuxClSession_Status_t | mcuxClSession_configure_job (mcuxClSession_Handle_t session, mcuxClSession_Channels_t dmaChannels, mcuxClSession_Callback_t pUserCallback, void *pUserData) |
| | Configure the parameters for non-blocking operations (jobs) in this session.
|
| mcuxClSession_Status_t | mcuxClSession_cleanup (mcuxClSession_Handle_t pSession) |
| | Clean up a Crypto Library session.
|
| mcuxClSession_Status_t | mcuxClSession_destroy (mcuxClSession_Handle_t pSession) |
| | Destroy a Crypto Library session.
|
| mcuxClSession_Status_t | mcuxClSession_setRandom (mcuxClSession_Handle_t session, mcuxClRandom_Mode_t randomMode, mcuxClRandom_Context_t randomCtx) |
| | Function to switch to another random configuration.
|
| mcuxClSession_Status_t | mcuxClSession_cleanupOnError (mcuxClSession_Handle_t pSession) |
| | Clean up HW Resources after error case.
|
Defines all functions of mcuxClSession.
◆ mcuxClSession_init()
Initialize a Crypto Library session.
- Parameters
-
| pSession | Session to be initialized. |
| pCpuWaBuffer | Pointer to buffer to be used as workarea for CPU operations. This pointer shall be CPU-word aligned. |
| cpuWaLength | Size (in bytes) of the workarea for CPU operations. The size shall be a multiple of CPU wordsize. |
| pPkcWaBuffer | Pointer to buffer to be used as workarea for PKC operations. This pointer shall be PKC-word aligned. |
| pkcWaLength | Size (in bytes) of the workarea for PKC operations. The size shall be a multiple of CPU wordsize. |
- Returns
- status
- Return values
-
◆ mcuxClSession_setResource()
Set the resource context in a Crypto Library session.
- Parameters
-
| session | Session to be initialized. |
| pResourceCtx | Pointer to the global resource context. |
- Returns
- status
- Return values
-
◆ mcuxClSession_configure_job()
Configure the parameters for non-blocking operations (jobs) in this session.
- Parameters
-
| session | Handle for the current CL session. |
| dmaChannels | DMA channels to be used for non-blocking operations. |
| pUserCallback | Callback triggered on CL status changes. |
| pUserData | Data passed back to the callback function. |
- Returns
- status
- Return values
-
- Examples
- mcuxClCipherModes_Cbc_Aes128_Multipart_PaddingZero_Dma_NonBlocking_example.c, mcuxClCipherModes_Cbc_Aes128_Oneshot_Dma_NonBlocking_example.c, mcuxClCipherModes_Ctr_Aes128_Multipart_Dma_NonBlocking_example.c, mcuxClCipherModes_Ctr_Aes128_Oneshot_Dma_NonBlocking_example.c, mcuxClCipherModes_Ecb_Aes128_Multipart_PaddingZero_Dma_NonBlocking_MultipleProcess_example.c, mcuxClCipherModes_Ecb_Aes128_Multipart_PaddingZero_Dma_NonBlocking_example.c, mcuxClCipherModes_Ecb_Aes128_Oneshot_Dma_NonBlocking_example.c, mcuxClHashModes_sha256_oneshot_dma_nonBlocking_example.c, mcuxClHashModes_sha256_streaming_dma_nonBlocking_example.c, mcuxClMacModes_Cmac_Aes128_Compute_Dma_NonBlocking_example.c, and mcuxClMacModes_Cmac_Aes128_Multipart_Dma_NonBlocking_example.c.
◆ mcuxClSession_cleanup()
Clean up a Crypto Library session.
This function will (securely) cleanup the session, which will still be usable afterwards.
- Parameters
-
| pSession | Session to be cleaned. |
- Returns
- status
- Return values
-
◆ mcuxClSession_destroy()
Destroy a Crypto Library session.
This function will (securely) cleanup the session, including uninitialization etc. The session will no longer be usable afterwards.
- Parameters
-
| pSession | Session to be destroyed. |
- Returns
- status
- Return values
-
◆ mcuxClSession_setRandom()
Function to switch to another random configuration.
- Parameters
-
| session | Session to set the new random configuration. |
| randomMode | Random data generation mode/algorithm. It should be the same mode used to initialize randomCtx. |
| randomCtx | Random context. |
- Returns
- status
- Examples
- mcuxClRandomModes_Different_Sessions_example.c.
◆ mcuxClSession_cleanupOnError()
Clean up HW Resources after error case.
(Early Exit scenario)
This function will reset all used HW Resources after an error (Early Exit scenario). Additionally it will clear the CPU workspace and PKC workspace if applicable. Random context associated with the session will not be cleared and must be reinitialized before further usage.
- Attention
- This function must not be used in case of Fault Attack error case but instead Power-On-Reset or System Reset must be performed.
- Parameters
-
| pSession | Session which is used when the error occurred. |
- Returns
- status
- Return values
-
- Examples
- mcuxClSession_cleanupOnError_example.c.