MCUX CLNS MCUX Crypto Library Normal Secure |

Macros | Typedefs | Functions
McuxClPkc_Functions_Calculation
mcuxClPkc » mcuxClPkc_Functions

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
mcuxClPkc_Status_Protected_t | mcuxClPkc_Calc (uint16_t param_mode, uint32_t iR_iX_iY_iZ)
| Start a PKC calculation. More...
mcuxClPkc_Status_Protected_t | mcuxClPkc_CalcConst (uint16_t param_mode, uint32_t iR_iX_iY_C)
| Start a PKC calculation with one constant parameter. More...
mcuxClPkc_Status_Protected_t | mcuxClPkc_CalcFup (mcuxClPkc_PtrFUPEntry_t pUPTR, uint8_t ulen)
| 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()

mcuxClPkc_Status_Protected_t 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_mode | param (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_iZ | indices of the operand(s) and the result in UPTR table.

Returns
  A flow-protected status code (see Flow Protection API).

Return values

  MCUXCLPKC_STATUS_OK | this function always returns OK.

Attention
  The PKC calculation might be still on-going, call mcuxClPkc_WaitForFinish before CPU accesses to the result.

## ◆ mcuxClPkc_CalcConst()

mcuxClPkc_Status_Protected_t 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.

Parameters

  [in] | param_mode | param (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_C | indices of the operand(s) and the result in UPTR table, and a direct 8-bit constant.

Returns
  A flow-protected status code (see Flow Protection API).

Return values

  MCUXCLPKC_STATUS_OK | this function always returns OK.

Attention
  The PKC calculation might be still on-going, call mcuxClPkc_WaitForFinish before CPU accesses to the result.

## ◆ mcuxClPkc_CalcFup()

mcuxClPkc_Status_Protected_t mcuxClPkc_CalcFup | ( | mcuxClPkc_PtrFUPEntry_t | pUPTR,
|  | uint8_t | ulen
| ) |  |

Start a PKC FUP program calculation.

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

Parameters

  [in] | pUPTR | address of the FUP program.
  [in] | ulen | length (number of calculation) of the FUP program.

Returns
  A flow-protected status code (see Flow Protection API).

Return values

  MCUXCLPKC_STATUS_OK | this function always returns OK.

Attention
  The PKC calculation might be still on-going, call mcuxClPkc_WaitForFinish before CPU accesses to the result.