MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches

Data integrity handling core functionality, based on secure counter. More...

Macros

#define MCUX_CSSL_DI_CHECK_PASSED_IMPL
 Positive comparison result value.
#define MCUX_CSSL_DI_CHECK_FAILED_IMPL
 Negative comparison result value.
#define MCUX_CSSL_DI_BACKUP_SC(backupValue)
 Backs up the current secure counter value.
#define MCUX_CSSL_DI_RESTORE_SC_REF(reference)
 Restores the data integrity reference value to the corresponding HW SFR.
#define MCUX_CSSL_DI_INIT_IMPL(backupValue)
 Backup of the current data integrity value, that will be checked later on with MCUX_CSSL_SC_CHECK.
#define MCUX_CSSL_DI_CHECK_IMPL(reference)
 Comparison operation implementation for the data integrity.
#define MCUX_CSSL_DI_CHECK_EXIT_IMPL(id, reference, fail)
 Comparison operation implementation for the data integrity.

Detailed Description

Data integrity handling core functionality, based on secure counter.

Macro Definition Documentation

◆ MCUX_CSSL_DI_CHECK_PASSED_IMPL

#define MCUX_CSSL_DI_CHECK_PASSED_IMPL

Positive comparison result value.

◆ MCUX_CSSL_DI_CHECK_FAILED_IMPL

#define MCUX_CSSL_DI_CHECK_FAILED_IMPL

Negative comparison result value.

◆ MCUX_CSSL_DI_BACKUP_SC

#define MCUX_CSSL_DI_BACKUP_SC ( backupValue)

Backs up the current secure counter value.

Parameters
backupValueFresh variable name to store the current SC value.

◆ MCUX_CSSL_DI_RESTORE_SC_REF

#define MCUX_CSSL_DI_RESTORE_SC_REF ( reference)

Restores the data integrity reference value to the corresponding HW SFR.

Parameters
referenceData integrity reference value that will be written to the HW SFR (ignored).

◆ MCUX_CSSL_DI_INIT_IMPL

#define MCUX_CSSL_DI_INIT_IMPL ( backupValue)

Backup of the current data integrity value, that will be checked later on with MCUX_CSSL_SC_CHECK.

Note that in case the secure counter back-end requires allocation, it is expected that this will be handled by the Flow Protection mechanism before the initialization of the Data Integrity.

Parameters
backupValueFresh variable name to store the current DI value.

◆ MCUX_CSSL_DI_CHECK_IMPL

#define MCUX_CSSL_DI_CHECK_IMPL ( reference)

Comparison operation implementation for the data integrity.

Parameters
referenceReference initial value to compare the data integrity value against.
Returns
Either MCUX_CSSL_DI_CHECK_PASSED, if the value matches, or MCUX_CSSL_DI_CHECK_FAILED if the value is different.

◆ MCUX_CSSL_DI_CHECK_EXIT_IMPL

#define MCUX_CSSL_DI_CHECK_EXIT_IMPL ( id,
reference,
fail )

Comparison operation implementation for the data integrity.

It compares the data integrity value to the reference initial value, and exits with the given fault status code if the comparison fails. The reference value shall be the initial value that was backed up with MCUX_CSSL_DI_INIT. If the comparison succeeds, the reference value is restored to the HW SFR, and normal execution will continue.

Parameters
idIdentifier of the function from which we will exit.
referenceReference initial data integrity value that will be restored to the HW SFR.
failResult that should be returned if the data integrity check failed.