MCUX CLNS
MCUX Crypto Library Normal Secure
McuxClPkc_Functions_Init

mcuxClPkc functions of PKC initialization and deinitialization More...

Data Structures

struct  mcuxClPkc_State_t
 Structure of PKC state backup. More...
 

Macros

#define MCUXCLPKC_FP_INITIALIZE(pState)
 Helper macro to call #mcuxClPkc_Initialize with flow protection. More...
 
#define MCUXCLPKC_FP_DEINITIALIZE(pState)
 Helper macro to call #mcuxClPkc_Deinitialize with flow protection. More...
 

Functions

 MCUX_CSSL_FP_FUNCTION_POINTER (mcuxClPkc_PkcInitializeEngine_t, typedef MCUX_CSSL_FP_PROTECTED_TYPE(void)(*mcuxClPkc_PkcInitializeEngine_t)(mcuxClPkc_State_t *pState))
 Function type for PKC initialization engine. More...
 
 MCUX_CSSL_FP_FUNCTION_POINTER (mcuxClPkc_PkcDeInitializeEngine_t, typedef MCUX_CSSL_FP_PROTECTED_TYPE(void)(*mcuxClPkc_PkcDeInitializeEngine_t)(const mcuxClPkc_State_t *pState))
 Function type for PKC deinitialization engine. More...
 
 MCUX_CSSL_FP_PROTECTED_TYPE (void) mcuxClPkc_Initialize(mcuxClPkc_State_t *pState)
 initialize PKC hardware More...
 

Detailed Description

mcuxClPkc functions of PKC initialization and deinitialization

Macro Definition Documentation

◆ MCUXCLPKC_FP_INITIALIZE

#define MCUXCLPKC_FP_INITIALIZE (   pState)

Helper macro to call #mcuxClPkc_Initialize with flow protection.

◆ MCUXCLPKC_FP_DEINITIALIZE

#define MCUXCLPKC_FP_DEINITIALIZE (   pState)

Helper macro to call #mcuxClPkc_Deinitialize with flow protection.

Function Documentation

◆ MCUX_CSSL_FP_FUNCTION_POINTER() [1/2]

MCUX_CSSL_FP_FUNCTION_POINTER ( mcuxClPkc_PkcInitializeEngine_t  ,
typedef MCUX_CSSL_FP_PROTECTED_TYPE(void)(*)(mcuxClPkc_State_t *pState)  mcuxClPkc_PkcInitializeEngine_t 
)

Function type for PKC initialization engine.

Generic function pointer to PKC initialization function

Parameters
[out]pStatepointer to PKC state backup structure. If it's not a NULL pointer, PKC state before initialization will be stored in this structure.

◆ MCUX_CSSL_FP_FUNCTION_POINTER() [2/2]

MCUX_CSSL_FP_FUNCTION_POINTER ( mcuxClPkc_PkcDeInitializeEngine_t  ,
typedef MCUX_CSSL_FP_PROTECTED_TYPE(void)(*)(const mcuxClPkc_State_t *pState)  mcuxClPkc_PkcDeInitializeEngine_t 
)

Function type for PKC deinitialization engine.

Generic function pointer to PKC deinitialization function

Parameters
[in]pStatepointer to PKC state backup structure. If it's not a NULL pointer, PKC state will be restored from this structure.

◆ MCUX_CSSL_FP_PROTECTED_TYPE()

MCUX_CSSL_FP_PROTECTED_TYPE ( void  )

initialize PKC hardware

Wait until PKC is ready to accept new calculation.

Wait until PKC finishes calculations.

Start a PKC FUP program calculation.

Start a PKC calculation with one constant parameter.

Start a PKC calculation.

Initialize UPTR table.

deinitialize PKC hardware

This function initializes PKC hardware, and optionally backups the original PKC configuration (except STOP bit).

Parameters
[out]pStatepointer to PKC state backup structure. If it's not a NULL pointer, PKC state before initialization will be stored in this structure.

This function deinitializes PKC hardware, and optionally restores PKC configuration (except STOP bit).

Parameters
[in]pStatepointer to PKC state backup structure. If it's not a NULL pointer, PKC state will be restored from this structure.

This function initializes elements in UPTR table. UPTR table contains the address (16-bit offset in PKC workarea) of each buffer (PKC operand). Each element of the table will be initialized with a 16-bit offset, associated with a buffer allocated in sequence in PKC workarea. When calling this function, there shall be no on-going and pending PKC calculations using the specified UPTR table elements.

Parameters
[out]pUPTRTpointer to the first element to be initialized in UPTR table.
[in]pBaseBufferaddress of the buffer in PKC workarea, with which the first element will be associated.
[in]bufferLengthbyte length of each buffer in PKC workarea.
[in]noOfBuffernumber of elements to be initialized.
Parameter properties
pUPTRT
this pointer shall be 2-byte aligned.
pBaseBuffer
this address shall be MCUXCLPKC_WORDSIZE aligned.
bufferLength
this length shall be a multiple of MCUXCLPKC_WORDSIZE.

This function performs one specified PKC calculation, of which the operand(s) and result are specified by the indices of UPTR table.

Parameters
[in]param_modeparam (the higher 8 bits) indicates the type of the calculation (L0 or L1) and the parameter set (PS1 or PS2).
mode (the lower 8 bits) indicates the calculation, either an L0 operation or L1 microcode.
[in]iR_iX_iY_iZindices of the operand(s) and the result in UPTR table.
Attention
The PKC calculation might be still on-going when returning to caller, call #mcuxClPkc_WaitForFinish before CPU accesses to the result.

This function performs one specified PKC calculation, of which the operand(s) and result are specified by the indices of UPTR table, and a 8-bit constant parameter is directly provided. This function can also be used to perform an L0 operation without using Z operand, e.g., OP_MUL, R = X0 * Y.

Parameters
[in]param_modeparam (the higher 8 bits) indicates the type of the calculation (always L0) and the parameter set (PS1 or PS2).
mode (the lower 8 bits) indicates the calculation, an L0 operation.
[in]iR_iX_iY_Cindices of the operand(s) and the result in UPTR table, and a direct 8-bit constant.
Attention
The PKC calculation might be still on-going when returning to caller, call #mcuxClPkc_WaitForFinish before CPU accesses to the result.

This function triggers PKC to start the calculation of a FUP program.

Parameters
[in]pUPTR2-byte aligned address of the FUP program.
[in]uLengthlength (number of calculation) of the FUP program.
Attention
The PKC calculation might be still on-going when returning to caller, call #mcuxClPkc_WaitForFinish before CPU accesses to the result.

This function waits until PKC finishes on-going and pending calculations (if there is any). When returning to caller, PKC is in idle state, and result in PKC workarea is ready.

This function waits until PKC is ready to accept next calculation (i.e., no pending calculation).