MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

Functions

void CASPER_ModExp (CASPER_Type *base, const uint8_t *signature, const uint8_t *pubN, size_t wordLen, uint32_t pubE, uint8_t *plaintext)
 Performs modular exponentiation - (A^E) mod N. More...
 
void CASPER_ECC_SECP256R1_Mul (CASPER_Type *base, uint32_t resX[8], uint32_t resY[8], uint32_t X[8], uint32_t Y[8], uint32_t scalar[8])
 Performs ECC secp256r1 point single scalar multiplication. More...
 
void CASPER_ECC_SECP256R1_MulAdd (CASPER_Type *base, uint32_t resX[8], uint32_t resY[8], uint32_t X1[8], uint32_t Y1[8], uint32_t scalar1[8], uint32_t X2[8], uint32_t Y2[8], uint32_t scalar2[8])
 Performs ECC secp256r1 point double scalar multiplication. More...
 
void CASPER_ECC_SECP384R1_Mul (CASPER_Type *base, uint32_t resX[12], uint32_t resY[12], uint32_t X[12], uint32_t Y[12], uint32_t scalar[12])
 Performs ECC secp384r1 point single scalar multiplication. More...
 
void CASPER_ECC_SECP384R1_MulAdd (CASPER_Type *base, uint32_t resX[12], uint32_t resY[12], uint32_t X1[12], uint32_t Y1[12], uint32_t scalar1[12], uint32_t X2[12], uint32_t Y2[12], uint32_t scalar2[12])
 Performs ECC secp384r1 point double scalar multiplication. More...
 

Function Documentation

void CASPER_ModExp ( CASPER_Type *  base,
const uint8_t *  signature,
const uint8_t *  pubN,
size_t  wordLen,
uint32_t  pubE,
uint8_t *  plaintext 
)

This function performs modular exponentiation.

Parameters
baseCASPER base address
signaturefirst addend (in little endian format)
pubNmodulus (in little endian format)
wordLenSize of pubN in bytes
pubEexponent
[out]plaintextOutput array to store result of operation (in little endian format)
void CASPER_ECC_SECP256R1_Mul ( CASPER_Type *  base,
uint32_t  resX[8],
uint32_t  resY[8],
uint32_t  X[8],
uint32_t  Y[8],
uint32_t  scalar[8] 
)

This function performs ECC secp256r1 point single scalar multiplication [resX; resY] = scalar * [X; Y] Coordinates are affine in normal form, little endian. Scalars are little endian. All arrays are little endian byte arrays, uint32_t type is used only to enforce the 32-bit alignment (0-mod-4 address).

Parameters
baseCASPER base address
[out]resXOutput X affine coordinate in normal form, little endian.
[out]resYOutput Y affine coordinate in normal form, little endian.
XInput X affine coordinate in normal form, little endian.
YInput Y affine coordinate in normal form, little endian.
scalarInput scalar integer, in normal form, little endian.
void CASPER_ECC_SECP256R1_MulAdd ( CASPER_Type *  base,
uint32_t  resX[8],
uint32_t  resY[8],
uint32_t  X1[8],
uint32_t  Y1[8],
uint32_t  scalar1[8],
uint32_t  X2[8],
uint32_t  Y2[8],
uint32_t  scalar2[8] 
)

This function performs ECC secp256r1 point double scalar multiplication [resX; resY] = scalar1 * [X1; Y1] + scalar2 * [X2; Y2] Coordinates are affine in normal form, little endian. Scalars are little endian. All arrays are little endian byte arrays, uint32_t type is used only to enforce the 32-bit alignment (0-mod-4 address).

Parameters
baseCASPER base address
[out]resXOutput X affine coordinate.
[out]resYOutput Y affine coordinate.
X1Input X1 affine coordinate.
Y1Input Y1 affine coordinate.
scalar1Input scalar1 integer.
X2Input X2 affine coordinate.
Y2Input Y2 affine coordinate.
scalar2Input scalar2 integer.
void CASPER_ECC_SECP384R1_Mul ( CASPER_Type *  base,
uint32_t  resX[12],
uint32_t  resY[12],
uint32_t  X[12],
uint32_t  Y[12],
uint32_t  scalar[12] 
)

This function performs ECC secp384r1 point single scalar multiplication [resX; resY] = scalar * [X; Y] Coordinates are affine in normal form, little endian. Scalars are little endian. All arrays are little endian byte arrays, uint32_t type is used only to enforce the 32-bit alignment (0-mod-4 address).

Parameters
baseCASPER base address
[out]resXOutput X affine coordinate in normal form, little endian.
[out]resYOutput Y affine coordinate in normal form, little endian.
XInput X affine coordinate in normal form, little endian.
YInput Y affine coordinate in normal form, little endian.
scalarInput scalar integer, in normal form, little endian.
void CASPER_ECC_SECP384R1_MulAdd ( CASPER_Type *  base,
uint32_t  resX[12],
uint32_t  resY[12],
uint32_t  X1[12],
uint32_t  Y1[12],
uint32_t  scalar1[12],
uint32_t  X2[12],
uint32_t  Y2[12],
uint32_t  scalar2[12] 
)

This function performs ECC secp384r1 point double scalar multiplication [resX; resY] = scalar1 * [X1; Y1] + scalar2 * [X2; Y2] Coordinates are affine in normal form, little endian. Scalars are little endian. All arrays are little endian byte arrays, uint32_t type is used only to enforce the 32-bit alignment (0-mod-4 address).

Parameters
baseCASPER base address
[out]resXOutput X affine coordinate.
[out]resYOutput Y affine coordinate.
X1Input X1 affine coordinate.
Y1Input Y1 affine coordinate.
scalar1Input scalar1 integer.
X2Input X2 affine coordinate.
Y2Input Y2 affine coordinate.
scalar2Input scalar2 integer.