20 #ifndef MCUXCLECC_TYPES_H_ 21 #define MCUXCLECC_TYPES_H_ 49 #define MCUXCLECC_STATUS_OK ((mcuxClEcc_Status_t) 0x55555555u) 50 #define MCUXCLECC_STATUS_KEYGEN_OK ((mcuxClEcc_Status_t) 0x55553CC3u) 51 #define MCUXCLECC_STATUS_KEYGEN_INVALID_PARAMS ((mcuxClEcc_Status_t) 0x55551DE2u) 52 #define MCUXCLECC_STATUS_KEYGEN_RNG_ERROR ((mcuxClEcc_Status_t) 0x555527D8u) 53 #define MCUXCLECC_STATUS_SIGN_OK ((mcuxClEcc_Status_t) 0x55555AA5u) 54 #define MCUXCLECC_STATUS_SIGN_INVALID_PARAMS ((mcuxClEcc_Status_t) 0x55551EE1u) 55 #define MCUXCLECC_STATUS_SIGN_RNG_ERROR ((mcuxClEcc_Status_t) 0x55552DD2u) 57 #define MCUXCLECC_STATUS_CALCPP_OK ((mcuxClEcc_Status_t) 0x555539C6u) 58 #define MCUXCLECC_STATUS_CALCPP_INVALID_PARAMS ((mcuxClEcc_Status_t) 0x55551BE4u) 60 #define MCUXCLECC_STATUS_VERIFY_OK ((mcuxClEcc_Status_t) 0x55556996u) 61 #define MCUXCLECC_STATUS_VERIFY_NOT_OK ((mcuxClEcc_Status_t) 0x555517E8u) 62 #define MCUXCLECC_STATUS_VERIFY_INVALID_PARAMS ((mcuxClEcc_Status_t) 0x55552BD4u) 63 #define MCUXCLECC_STATUS_POINTMULT_OK ((mcuxClEcc_Status_t) 0x55553AC5u) 64 #define MCUXCLECC_STATUS_POINTMULT_INVALID_PARAMS ((mcuxClEcc_Status_t) 0x55554BB4u) 65 #define MCUXCLECC_STATUS_POINTMULT_NEUTRAL_POINT ((mcuxClEcc_Status_t) 0x55558778u) 66 #define MCUXCLECC_STATUS_POINTMULT_RNG_ERROR ((mcuxClEcc_Status_t) 0x55552ED1u) 67 #define MCUXCLECC_STATUS_FAULT_ATTACK ((mcuxClEcc_Status_t) 0x5555F00Fu) 73 #define MCUXCLECC_STATUS_MONT_DHKEYGENERATION_OK ((mcuxClEcc_Status_t) 0x555533CCu) 75 #define MCUXCLECC_STATUS_MONT_DHKEYAGREEMENT_OK ((mcuxClEcc_Status_t) 0x555535CAu) 76 #define MCUXCLECC_STATUS_MONT_DHKEYAGREEMENT_ERROR_SMALL_SUBGROUP ((mcuxClEcc_Status_t) 0x55554DB2u) 77 #define MCUXCLECC_STATUS_MONT_RNG_ERROR ((mcuxClEcc_Status_t) 0x55551BE4u) 84 #define MCUXCLECC_MONT_CURVE25519_SIZE_PRIVATEKEY (32u) 85 #define MCUXCLECC_MONT_CURVE25519_SIZE_PUBLICKEY (32u) 86 #define MCUXCLECC_MONT_CURVE25519_SIZE_SHAREDSECRET (32u) 87 #define MCUXCLECC_MONT_CURVE25519_SIZE_PRIMEP (32u) 88 #define MCUXCLECC_MONT_CURVE25519_SIZE_BASEPOINTORDER (32u) 128 #define mcuxClEcc_DomainParam_misc_Pack(byteLenN, byteLenP) MCUXCLPKC_PACKARGS4(0u, 0u, (uint8_t) byteLenN, (uint8_t) byteLenP) 129 #define mcuxClEcc_DomainParam_misc_byteLenP_offset 0 130 #define mcuxClEcc_DomainParam_misc_byteLenP_mask ((uint32_t) 0x000000FFu) 131 #define mcuxClEcc_DomainParam_misc_byteLenN_offset 8 132 #define mcuxClEcc_DomainParam_misc_byteLenN_mask ((uint32_t) 0x0000FF00u) 139 uint8_t * pPublicKey;
161 #define mcuxClEcc_Sign_Param_optLen_Pack(byteLenHash) ((uint32_t) (byteLenHash) & 0xFFu) 162 #define mcuxClEcc_Sign_Param_optLen_byteLenHash_offset 0 163 #define mcuxClEcc_Sign_Param_optLen_byteLenHash_mask ((uint32_t) 0x000000FFu) 171 } mcuxClEcc_CalcPrecomputedPoint_Param_t;
181 const uint8_t * pHash;
184 const uint8_t * pPublicKey;
194 #define mcuxClEcc_Verify_Param_optLen_Pack(byteLenHash) ((uint32_t) (byteLenHash) & 0xFFu) 195 #define mcuxClEcc_Verify_Param_optLen_byteLenHash_offset 0 196 #define mcuxClEcc_Verify_Param_optLen_byteLenHash_mask ((uint32_t) 0x000000FFu) Parameter structure for function mcuxClEcc_Sign.
Definition: mcuxClEcc_Types.h:147
const uint8_t * pPrivateKey
[in] pointer to octet string of private key, which is of the same format as base point order n.
Definition: mcuxClEcc_Types.h:151
const uint8_t * pSignature
[in] pointer to octet string of signature R and S.
Definition: mcuxClEcc_Types.h:183
Parameter structure for function mcuxClEcc_KeyGen.
Definition: mcuxClEcc_Types.h:135
uint8_t * pPrivateKey
[out] pointer to memory area, where the private key will be exported if KeyGen is executed successful...
Definition: mcuxClEcc_Types.h:138
uint8_t * pResult
[out] pointer to memory area, where the result R = dQ will be exported if PointMult is executed succe...
Definition: mcuxClEcc_Types.h:204
const uint8_t * pHash
[in] pointer to string of message digest (hash), of which the length is byteLenHash (in optLen).
Definition: mcuxClEcc_Types.h:150
uint64_t mcuxClEcc_Status_Protected_t
Type for mcuxClEcc component return codes.
Definition: mcuxClEcc_Types.h:41
mcuxClEcc_DomainParam_t curveParam
[in] structure of pointers to curve parameters and length of parameters.
Definition: mcuxClEcc_Types.h:201
const uint8_t * pScalar
[in] pointer to octet string of scalar d, which is of the same format as base point order n.
Definition: mcuxClEcc_Types.h:202
const uint8_t * pPoint
[in] pointer to octet string of EC point Q, which is of the same format as base point G.
Definition: mcuxClEcc_Types.h:203
const uint8_t * pP
[in] pointer to octet string of prime modulus p, of which the length is byteLenP.
Definition: mcuxClEcc_Types.h:115
uint32_t mcuxClEcc_Status_t
Type for mcuxClEcc component return codes.
Definition: mcuxClEcc_Types.h:38
mcuxClEcc_DomainParam_t curveParam
[in] structure of pointers to curve parameters and length of parameters.
Definition: mcuxClEcc_Types.h:179
Parameter structure for function mcuxClEcc_Verify.
Definition: mcuxClEcc_Types.h:177
uint8_t * pOutputR
[out] pointer to memory area in which signature R calculated by verify function will be exported if s...
Definition: mcuxClEcc_Types.h:186
struct mcuxClEcc_Mont_DomainParams_t mcuxClEcc_Mont_DomainParams_t
Type for mcuxClEcc Mont domainParameters type.
Definition: mcuxClEcc_Types.h:44
const uint8_t * pB
[in] pointer to octet string of curve parameter b (< p), of which the length is byteLenP.
Definition: mcuxClEcc_Types.h:114
const uint8_t * pPrecG
[in] pointer to octet string of pre-computed point of base point G, which is of the same format as ba...
Definition: mcuxClEcc_Types.h:180
uint8_t * pSignature
[out] pointer to memory area in which signature R and S will be exported if signature is generated su...
Definition: mcuxClEcc_Types.h:152
mcuxClEcc_DomainParam_t curveParam
[in] structure of pointers to curve parameters and length of parameters.
Definition: mcuxClEcc_Types.h:137
mcuxClEcc_DomainParam_t curveParam
[in] structure of pointers to curve parameters and length of parameters.
Definition: mcuxClEcc_Types.h:149
Parameter structure for function mcuxClEcc_PointMult.
Definition: mcuxClEcc_Types.h:199
const uint8_t * pA
[in] pointer to octet string of curve parameter a (< p), of which the length is byteLenP.
Definition: mcuxClEcc_Types.h:113
Parameter structure of elliptic curve of the form, y^2 = x^3 + a*x + b modulo prime p.
Definition: mcuxClEcc_Types.h:111