MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClEls_Common_Functions

Defines all functions of mcuxClEls_Common. More...

Functions

MCUXCLELS_API MCUX_CSSL_FP_PROTECTED_TYPE (mcuxClEls_Status_t) mcuxClEls_GetHwVersion(mcuxClEls_HwVersion_t *result)
 Determines the version of the underlying ELS hardware IP. More...
 

Variables

MCUXCLELS_API mcuxClEls_ErrorHandling_t errorHandling
 
MCUXCLELS_API uint32_t * errorLevel
 

Detailed Description

Defines all functions of mcuxClEls_Common.

Function Documentation

◆ MCUX_CSSL_FP_PROTECTED_TYPE()

MCUXCLELS_API MCUX_CSSL_FP_PROTECTED_TYPE ( mcuxClEls_Status_t  )

Determines the version of the underlying ELS hardware IP.

Deprecated type for mcuxClSession protected status codes.

Deprecated type for RSA protected status codes.

Deprecated type for error codes used by code-flow protected PKC component functions.

Deprecated type for error codes used by code-flow protected mcuxClMemory component functions.

Deprecated type for error codes used by code-flow protected Math component functions.

Deprecated type for Key component error codes, returned by functions with code-flow protection.

Deprecated type for ELS driver protected status codes.

Deprecated type for mcuxClEcc component return codes.

Get the random start delay for AES based operations.

Set the random start delay for AES based operations.

Get the last ELS error code and level and optionally clear the error status.

Get the last ELS error code and optionally clear the error status.

Resets all error flags that have been set by a previous operation.

Await the completion of an ELS operation for a limited amount of time and optionally clear the error status.

Wait for an ELS operation and optionally clear the error status.

Set the interrupt status register, for debug and testing purposes.

Clear the interrupt status register.

Get interrupt enable flags.

Set interrupt enable flags.

Disable the ELS.

Perform a synchronous reset of the ELS.

Enables the ELS.

Determines the current state of the ELS.

Attention
This header was delivered as part of a CLNS release which is compatible with a specific ELS hardware IP version, which is defined by the macro MCUXCLELS_HW_VERSION.
Parameters
[out]resultPointer which will be filled with the ELS hardware version
Returns
An error code that is always MCUXCLELS_STATUS_OK
Parameters
[out]resultPointer which will be filled with the ELS status information
Returns
An error code that is always MCUXCLELS_STATUS_OK

Call #mcuxClEls_WaitForOperation to complete the operation.

Returns
An error code that is always MCUXCLELS_STATUS_OK_WAIT

This means that:

  • any running ELS command will be stopped,
  • all errors will be cleared,
  • all keys will be deleted,
  • any RNG entropy will be discarded,
  • the glitch detector will be reset and
  • the run-time fingerprint will be restored to its default value.

Call #mcuxClEls_WaitForOperation to complete the operation.

Parameters
[in]optionsA value indicating whether any running ELS operations shall be canceled
Returns
An error code that can be any error code in MCUXCLELS_STATUS_, see individual documentation for more information
Return values
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPTif a running operation prevented the reset
MCUXCLELS_STATUS_OK_WAITon successful request

This is useful as a power saving mechanism.

Returns
An error code that is always MCUXCLELS_STATUS_OK
Parameters
[in]optionsThe command options, determining which interrupts should be enabled or disabled. For more information, see mcuxClEls_InterruptOptionEn_t.
Returns
An error code that is always MCUXCLELS_STATUS_OK
Parameters
[out]resultPointer which is filled with the configuration of the interrupts enable register.
Returns
An error code that is always MCUXCLELS_STATUS_OK
Parameters
[in]optionsThe command options, determining which interrupt status bits should be cleared. For more information, see mcuxClEls_InterruptOptionRst_t.
Returns
An error code that is always MCUXCLELS_STATUS_OK
Parameters
[in]optionsThe command options, determining which interrupt status bits should be set. For more information, see mcuxClEls_InterruptOptionSet_t.
Returns
An error code that is always MCUXCLELS_STATUS_OK

If an ELS operation is active, this function waits for completion of that operation. For this, the busy flag of ELS is polled. Additionally, this function checks and returns any applicable error indication. If no operation is active, the function returns immediately.

Parameters
[in]errorHandlingDefine if error flags shall be cleared.
Return values
MCUXCLELS_STATUS_OKif the last operation was successful, or no operation was active
Returns
An error code that can be any error code in MCUXCLELS_STATUS_, see individual documentation for more information

If an ELS operation is active, this function waits for completion of that operation until a counter expires. For this, the busy flag of ELS is polled. The counting mechanism behaves like a simple for-loop from counterLimit to one. This counter does not have a well-defined relationship to real-world time. Additionally, this function checks and returns any applicable error indication. If no operation is active, the function returns immediately.

Parameters
[in]counterLimitThe limit of the wait counter.
[in]errorHandlingDefine if error flags shall be cleared.
Return values
MCUXCLELS_STATUS_OKif the last operation was successful, or no operation was active
MCUXCLELS_STATUS_SW_COUNTER_EXPIREDif the counter expired while waiting for the operation to complete
Returns
An error code that can be any error code in MCUXCLELS_STATUS_, see individual documentation for more information
An error code that is always MCUXCLELS_STATUS_OK
Parameters
[in]errorHandlingDefine if error flags shall be cleared.
Return values
MCUXCLELS_STATUS_OKif the last operation was successful or no operation was active
Returns
An error code that can be any error code in MCUXCLELS_STATUS_, see individual documentation for more information
Parameters
[in]errorHandlingDefine if error flags shall be cleared.
[out]errorLevelPointer to the location that will receive the value of the error level.
Return values
MCUXCLELS_STATUS_OKif the last operation was successful or no operation was active
#MCUXCLELS_STATUS_if the last operation resulted in an error
Returns
An error code that can be any error code in MCUXCLELS_STATUS_, see individual documentation for more information

This impacts mcuxClEls_Aead_*, mcuxClEls_Cipher_*, mcuxClEls_Cmac_*, ncpClEls_Ckdf_*, mcuxClEls_KeyImport_Async, mcuxClEls_KeyExport_Async

Parameters
[in]delayDefine the max random start delay. Acceptable values are a power of 2 minus one, starting from 0 to 1023 (0, 1, 3, 7, ..., 1023).
Return values
MCUXCLELS_STATUS_OKif the operation was successful
Returns
An error code that can be any error code in MCUXCLELS_STATUS_, see individual documentation for more information
Parameters
[out]delayPointer to store random start delay configuration.
Return values
MCUXCLELS_STATUS_OKif the operation was successful
Returns
An error code that can be any error code in MCUXCLELS_STATUS_, see individual documentation for more information