MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
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... | |
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.
base | CASPER base address | |
signature | first addend (in little endian format) | |
pubN | modulus (in little endian format) | |
wordLen | Size of pubN in bytes | |
pubE | exponent | |
[out] | plaintext | Output 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).
base | CASPER base address | |
[out] | resX | Output X affine coordinate in normal form, little endian. |
[out] | resY | Output Y affine coordinate in normal form, little endian. |
X | Input X affine coordinate in normal form, little endian. | |
Y | Input Y affine coordinate in normal form, little endian. | |
scalar | Input 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).
base | CASPER base address | |
[out] | resX | Output X affine coordinate. |
[out] | resY | Output Y affine coordinate. |
X1 | Input X1 affine coordinate. | |
Y1 | Input Y1 affine coordinate. | |
scalar1 | Input scalar1 integer. | |
X2 | Input X2 affine coordinate. | |
Y2 | Input Y2 affine coordinate. | |
scalar2 | Input 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).
base | CASPER base address | |
[out] | resX | Output X affine coordinate in normal form, little endian. |
[out] | resY | Output Y affine coordinate in normal form, little endian. |
X | Input X affine coordinate in normal form, little endian. | |
Y | Input Y affine coordinate in normal form, little endian. | |
scalar | Input 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).
base | CASPER base address | |
[out] | resX | Output X affine coordinate. |
[out] | resY | Output Y affine coordinate. |
X1 | Input X1 affine coordinate. | |
Y1 | Input Y1 affine coordinate. | |
scalar1 | Input scalar1 integer. | |
X2 | Input X2 affine coordinate. | |
Y2 | Input Y2 affine coordinate. | |
scalar2 | Input scalar2 integer. |