Defines all functions of mcuxClEcc. More...
Functions | |
| mcuxClEcc_Status_t | mcuxClEcc_WeierECC_GenerateDomainParams (mcuxClSession_Handle_t pSession, mcuxClEcc_Weier_DomainParams_t *pEccWeierDomainParams, mcuxClEcc_Weier_BasicDomainParams_t *pEccWeierBasicDomainParams, uint32_t options) |
| ECC Weierstrass custom domain parameter generation function. | |
| mcuxClEcc_Status_t | mcuxClEcc_WeierECC_GenerateCustomKeyType (mcuxClKey_CustomType_t customType, mcuxClKey_AlgorithmId_t algoId, mcuxClKey_Size_t size, void *pCustomParams, mcuxClKey_Encoding_t plainEncoding) |
| Key type constructor. | |
| mcuxClEcc_Status_t | mcuxClEcc_WeierECC_DecodePoint (mcuxClSession_Handle_t pSession, mcuxCl_InputBuffer_t pEncodedPoint, mcuxCl_Buffer_t pDecodedPoint, mcuxClEcc_WeierECC_PointEncType_t pointEncType, mcuxClEcc_Weier_DomainParams_t *pEccWeierDomainParams) |
| Point decoding function. | |
Defines all functions of mcuxClEcc.
| mcuxClEcc_Status_t mcuxClEcc_WeierECC_GenerateDomainParams | ( | mcuxClSession_Handle_t | pSession, |
| mcuxClEcc_Weier_DomainParams_t * | pEccWeierDomainParams, | ||
| mcuxClEcc_Weier_BasicDomainParams_t * | pEccWeierBasicDomainParams, | ||
| uint32_t | options ) |
ECC Weierstrass custom domain parameter generation function.
Given pointers and lengths specifying domain parameters of a custom (short) Weierstrass curve with cofactor 1, this function generates a corresponding optimized custom domain parameter struct.
| pSession | Handle for the current CL session. | |
| [out] | pEccWeierDomainParams | Pointer to memory area in which the optimized domain parameters shall be stored. |
| [in] | pEccWeierBasicDomainParams | Pointer to struct containing pointers and lengths specifying the custom domain parameters. |
| [in] | options | Parameter specifying whether or not the pre-computed point (2 ^ (byteLenN * 4)) * G corresponding to the base point G shall be calculated or not, If set to
|
| MCUXCLECC_STATUS_OK | if optimized domain parameters are generated successfully; |
| MCUXCLECC_STATUS_INVALID_PARAMS | if parameters are invalid; |
| MCUXCLECC_STATUS_FAULT_ATTACK | if fault attack (unexpected behavior) is detected. |
| mcuxClEcc_Status_t mcuxClEcc_WeierECC_GenerateCustomKeyType | ( | mcuxClKey_CustomType_t | customType, |
| mcuxClKey_AlgorithmId_t | algoId, | ||
| mcuxClKey_Size_t | size, | ||
| void * | pCustomParams, | ||
| mcuxClKey_Encoding_t | plainEncoding ) |
Key type constructor.
This function allows to generate custom key types according to the passed algoId.
| [out] | customType | Handle for the custom key type. |
| [in] | algoId | Algorithm identifier specifying the key type descriptor to be generated. The supported algoIds are
|
| [in] | size | Algorithm based key size. |
| [in] | pCustomParams | Pointer to algorithm based custom parameters. If algoId & MCUXCLKEY_ALGO_ID_ALGO_MASK equals
|
| [in] | plainEncoding | The plain encoding function for the key. |
| MCUXCLECC_STATUS_OK | if custom key type is generated successfully; |
| MCUXCLECC_STATUS_INVALID_PARAMS | if Parameters are invalid. |
| MCUXCLECC_STATUS_FAULT_ATTACK | if fault attack (unexpected behavior) is detected. |
| mcuxClEcc_Status_t mcuxClEcc_WeierECC_DecodePoint | ( | mcuxClSession_Handle_t | pSession, |
| mcuxCl_InputBuffer_t | pEncodedPoint, | ||
| mcuxCl_Buffer_t | pDecodedPoint, | ||
| mcuxClEcc_WeierECC_PointEncType_t | pointEncType, | ||
| mcuxClEcc_Weier_DomainParams_t * | pEccWeierDomainParams ) |
Point decoding function.
Given a point on a short Weierstrass curve defined over the prime p in encoded form, this decoding function derives its plain format given by its x- and y-coordinates.
The following encoding variants are supported:
For each encoding variant dedicated point encoding type descriptors and buffer for the encoded points are available. Please refer to the definition of these descriptors for further information about the respective encoding.
| pSession | Handle for the current CL session. | |
| [in] | pEncodedPoint | Pointer to buffer containing the encoded point. The size of the buffer depends on the encoding variant. |
| [out] | pDecodedPoint | Pointer to buffer to where the x- and y-coordinates, both elements of GF(p), of the decoded point (x,y) shall be written. The coordinates x and y are written one after another in big endian format with byte length equal to the byte length of p. If MCUXCLECC_STATUS_NEUTRAL_POINT is returned, nothing is written to this buffer. |
| [in] | pointEncType | Point encoding type specifying all information needed about the applied point encoding format. |
| [in] | pEccWeierDomainParams | Pointer to short Weierstrass curve custom parameters. |
| MCUXCLECC_STATUS_OK | if the point decoding was successful; |
| MCUXCLECC_STATUS_NEUTRAL_POINT | if the encoded point is the neutral point; |
| MCUXCLECC_STATUS_INVALID_PARAMS | if Parameters are invalid. |
| MCUXCLECC_STATUS_FAULT_ATTACK | if fault attack (unexpected behavior) is detected. |