APIs of mcuxClMath component. More...
#include <mcuxClCore_Platform.h>
#include <mcuxClCore_FunctionIdentifiers.h>
#include <mcuxCsslFlowProtection.h>
#include <mcuxClPkc.h>
#include <mcuxClSession.h>
#include <mcuxClMath_Types.h>
Go to the source code of this file.
Macros | |
#define | MCUXCLMATH_SHIFTMODULUS(iNShifted, iN) |
Helper macro for mcuxClMath_ShiftModulus. More... | |
#define | MCUXCLMATH_FP_SHIFTMODULUS(iNShifted, iN) |
Helper macro for mcuxClMath_ShiftModulus with flow protection. More... | |
#define | MCUXCLMATH_NDASH(iN, iT) |
Helper macro for mcuxClMath_NDash. More... | |
#define | MCUXCLMATH_FP_NDASH(iN, iT) |
Helper macro for mcuxClMath_NDash with flow protection. More... | |
#define | MCUXCLMATH_QDASH(iQDash, iNShifted, iN, iT, len) |
Helper macro for mcuxClMath_QDash. More... | |
#define | MCUXCLMATH_FP_QDASH(iQDash, iNShifted, iN, iT, len) |
Helper macro for mcuxClMath_QDash with flow protection. More... | |
#define | MCUXCLMATH_QSQUARED(iQSqr, iNShifted, iN, iT) |
Helper macro for mcuxClMath_QSquared. More... | |
#define | MCUXCLMATH_FP_QSQUARED(iQSqr, iNShifted, iN, iT) |
Helper macro for mcuxClMath_QSquared with flow protection. More... | |
#define | MCUXCLMATH_MODINV(iR, iX, iN, iT) |
Helper macro for mcuxClMath_ModInv. More... | |
#define | MCUXCLMATH_FP_MODINV(iR, iX, iN, iT) |
Helper macro for mcuxClMath_ModInv with flow protection. More... | |
#define | MCUXCLMATH_REDUCEMODEVEN(iR, iX, iN, iT0, iT1, iT2, iT3) |
Helper macro for mcuxClMath_ReduceModEven. More... | |
#define | MCUXCLMATH_FP_REDUCEMODEVEN(iR, iX, iN, iT0, iT1, iT2, iT3) |
Helper macro for mcuxClMath_ReduceModEven with flow protection. More... | |
#define | MCUXCLMATH_MODEXP_SQRMULTL2R(pExp, byteLenExp, iR, iX, iN, iT) |
Helper macro for mcuxClMath_ModExp_SqrMultL2R. More... | |
#define | MCUXCLMATH_FP_MODEXP_SQRMULTL2R(pExp, byteLenExp, iR, iX, iN, iT) |
Helper macro for mcuxClMath_ModExp_SqrMultL2R with flow protection. More... | |
#define | MCUXCLMATH_SECMODEXP(session, pExp, pExpTemp, byteLenExp, iR, iX, iN, iTE, iT0, iT1, iT2, iT3) |
Helper macro for mcuxClMath_SecModExp. More... | |
#define | MCUXCLMATH_SECMODEXP_WITHOUT_RERANDOMIZATION(session, pExp, pExpTemp, byteLenExp, iR, iX, iN, iTE, iT0, iT1, iT2, iT3) |
Helper macro for mcuxClMath_SecModExp with disabled operand re-randomization. More... | |
#define | MCUXCLMATH_EXACTDIVIDEODD(iR, iX, iN, iT, xPkcByteLen, yPkcByteLen) |
Helper macro for mcuxClMath_ExactDivideOdd. More... | |
#define | MCUXCLMATH_FP_EXACTDIVIDEODD(iR, iX, iN, iT, xPkcByteLen, yPkcByteLen) |
Helper macro for mcuxClMath_ExactDivideOdd with flow protection. More... | |
#define | MCUXCLMATH_EXACTDIVIDE(iR, iX, iN, iT, xPkcByteLen, yPkcByteLen) |
Helper macro for mcuxClMath_ExactDivide. More... | |
#define | MCUXCLMATH_FP_EXACTDIVIDE(iR, iX, iN, iT, xPkcByteLen, yPkcByteLen) |
Helper macro for mcuxClMath_ExactDivide with flow protection. More... | |
Functions | |
void | mcuxClMath_InitLocalUptrt (uint32_t i3_i2_i1_i0, uint32_t i7_i6_i5_i4, uint16_t *localPtrUptrt, uint8_t noOfIndices, const uint16_t **oldPtrUptrt) |
Initializes and uses the new UPTRT and returns the address of original UPTRT. More... | |
void | mcuxClMath_LeadingZeros (uint8_t iX, uint32_t *pNumLeadingZeros) |
Counts number of leading zero bits of a PKC operand. More... | |
uint32_t | mcuxClMath_TrailingZeros (uint8_t iX) |
Counts number of trailing zero bits of a PKC operand. More... | |
void | mcuxClMath_ShiftModulus (uint16_t iNShifted_iN) |
Prepares shifted modulus. More... | |
void | mcuxClMath_NDash (uint16_t iN_iT) |
Prepares modulus (calculates NDash) for PKC modular multiplication. More... | |
void | mcuxClMath_QDash (uint32_t iQDash_iNShifted_iN_iT, uint16_t length) |
Calculates QDash = Q * Q' mod n, where Q = 256^(operandSize) mod n, and Q' = 256^length mod n. More... | |
void | mcuxClMath_QSquared (uint32_t iQSqr_iNShifted_iN_iT) |
Calculates QSquared = Q^2 mod n, where Q = 256^(operandSize) mod n. More... | |
void | mcuxClMath_ModInv (uint32_t iR_iX_iN_iT) |
Calculates modular inversion, with odd modulus. More... | |
void | mcuxClMath_ReduceModEven (uint32_t iR_iX_iN_iT0, uint32_t iT1_iT2_iT3) |
Calculates modular reduction with even modulus. More... | |
void | mcuxClMath_ModExp_SqrMultL2R (const uint8_t *pExp, uint32_t expByteLength, uint32_t iR_iX_iN_iT) |
Calculates modular exponentiation. More... | |
mcuxClMath_Status_t | mcuxClMath_SecModExp (mcuxClSession_Handle_t session, const uint8_t *pExp, uint32_t *pExpTemp, uint32_t expByteLength, uint32_t iT3_iX_iT2_iT1, uint32_t iN_iTE_iT0_iR, uint32_t secOption) |
Securely calculates modular exponentiation. More... | |
void | mcuxClMath_ExactDivideOdd (uint32_t iR_iX_iY_iT, uint32_t xPkcByteLength, uint32_t yPkcByteLength) |
Calculates exact division with odd divisor. More... | |
void | mcuxClMath_ExactDivide (uint32_t iR_iX_iY_iT, uint32_t xPkcByteLength, uint32_t yPkcByteLength) |
Calculates exact division (supporting even divisor). More... | |
APIs of mcuxClMath component.