MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxCsslMemory_Copy Function Definitions

mcuxCsslMemory_Copy Function Definitions More...

Functions

 MCUX_CSSL_FP_PROTECTED_TYPE (mcuxCsslMemory_Status_t) mcuxCsslMemory_Copy(mcuxCsslParamIntegrity_Checksum_t chk
 Copies length bytes of data from pSrc to pDst. More...
 

Variables

void const * pSrc
 
void const void * pDst
 
void const void size_t dstLength
 
void const void size_t size_t length
 

Detailed Description

mcuxCsslMemory_Copy Function Definitions

Function Documentation

◆ MCUX_CSSL_FP_PROTECTED_TYPE()

MCUX_CSSL_FP_PROTECTED_TYPE ( mcuxCsslMemory_Status_t  )

Copies length bytes of data from pSrc to pDst.

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.

The implementation is secure in the following aspects:

  • Constant execution time: If pSrc and pDst have the same offset to the nearest 16-byte boundary, and if length is the same, the execution sequence of the code is always identical.
  • Parameter integrity protection: An incorrect parameter checksum makes the function return immediately.
  • Code flow protection: The function call is protected. Additionally, the result depends on all steps of the calculation.
  • Buffer overflow protection: No data is written to pDst beyond dstLength bytes.
Parameters
[in]chkThe parameter checksum, generated with mcuxCsslParamIntegrity_Protect.
[in]pSrcThe data to be copied. Must not be NULL. Must not overlap with pDst.
[out]pDstThe destination pointer. Must not be NULL. Must not overlap with pSrc.
[in]dstLengthThe size of the destination data buffer in bytes.
[in]lengthThe number of bytes to copy. Must be different from zero.
Returns
A status code encapsulated in a flow-protection type.
Return values
MCUXCSSLMEMORY_STATUS_OKIf the contents of src and dst are equal.
MCUXCSSLMEMORY_STATUS_INVALID_PARAMETERIf one of the parameters was invalid (i.e. pSrc or pDst was NULL or length was zero).
MCUXCSSLMEMORY_STATUS_FAULTIf a fault was detected.