MCUX CLNS
MCUX Crypto Library Normal Secure
McuxClPkc_Functions_Calculation

mcuxClPkc functions of PKC calculation More...

Macros

#define MCUXCLPKC_FP_CALCFUP(pUPTR, ulen)
 Helper macro to call mcuxClPkc_CalcFup with flow protection. More...
 
#define MCUXCLPKC_FP_CALCFUP_OFFSET(pUPTR, skipLen, ulen)
 Helper macro to call mcuxClPkc_CalcFup (skipping first skipLen calculation(s)) with flow protection. More...
 

Typedefs

typedef const struct mcuxClPkc_FUPEntry * mcuxClPkc_PtrFUPEntry_t
 type of FUP program address. More...
 

Functions

void mcuxClPkc_Calc (uint16_t param_mode, uint32_t iR_iX_iY_iZ)
 Start a PKC calculation. More...
 
void mcuxClPkc_CalcConst (uint16_t param_mode, uint32_t iR_iX_iY_C)
 Start a PKC calculation with one constant parameter. More...
 
void mcuxClPkc_CalcFup (mcuxClPkc_PtrFUPEntry_t pUPTR, uint8_t uLength)
 Start a PKC FUP program calculation. More...
 

Detailed Description

mcuxClPkc functions of PKC calculation

Macro Definition Documentation

◆ MCUXCLPKC_FP_CALCFUP

#define MCUXCLPKC_FP_CALCFUP (   pUPTR,
  ulen 
)

Helper macro to call mcuxClPkc_CalcFup with flow protection.

◆ MCUXCLPKC_FP_CALCFUP_OFFSET

#define MCUXCLPKC_FP_CALCFUP_OFFSET (   pUPTR,
  skipLen,
  ulen 
)

Helper macro to call mcuxClPkc_CalcFup (skipping first skipLen calculation(s)) with flow protection.

Typedef Documentation

◆ mcuxClPkc_PtrFUPEntry_t

typedef const struct mcuxClPkc_FUPEntry* mcuxClPkc_PtrFUPEntry_t

type of FUP program address.

Function Documentation

◆ mcuxClPkc_Calc()

void mcuxClPkc_Calc ( uint16_t  param_mode,
uint32_t  iR_iX_iY_iZ 
)

Start a PKC calculation.

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.

◆ mcuxClPkc_CalcConst()

void mcuxClPkc_CalcConst ( uint16_t  param_mode,
uint32_t  iR_iX_iY_C 
)

Start a PKC calculation with one constant parameter.

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.

◆ mcuxClPkc_CalcFup()

void mcuxClPkc_CalcFup ( mcuxClPkc_PtrFUPEntry_t  pUPTR,
uint8_t  uLength 
)

Start a PKC FUP program calculation.

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.