Contiki-NG
|
Driver for the cc2538 ECC mode of the PKC engine. More...
Modules | |
cc2538 ECC Algorithms | |
This is a implementation of ECDH, ECDSA sign and ECDSA verify. | |
cc2538 NIST curves | |
NIST curves for various key sizes. | |
Files | |
file | ecc-driver.c |
Implementation of the cc2538 ECC driver. | |
file | ecc-driver.h |
Header file for the cc2538 ECC driver. | |
ECC functions | |
| |
uint8_t | ecc_mul_start (uint32_t *scalar, ec_point_t *ec_point, ecc_curve_info_t *curve, uint32_t *result_vector, struct process *process) |
Starts ECC Multiplication. More... | |
uint8_t | ecc_mul_get_result (ec_point_t *ec_point, uint32_t result_vector) |
Gets the result of ECC Multiplication. More... | |
uint8_t | ecc_mul_gen_pt_start (uint32_t *scalar, ecc_curve_info_t *curve, uint32_t *result_vector, struct process *process) |
Starts the ECC Multiplication with Generator point. More... | |
uint8_t | ecc_mul_gen_pt_get_result (ec_point_t *ec_point, uint32_t result_vector) |
Gets the result of ECC Multiplication with Generator point. More... | |
uint8_t | ecc_add_start (ec_point_t *ec_point1, ec_point_t *ec_point2, ecc_curve_info_t *curve, uint32_t *result_vector, struct process *process) |
Starts the ECC Addition. More... | |
uint8_t | ecc_add_get_result (ec_point_t *ptOutEcPt, uint32_t ui32ResultLoc) |
Gets the result of the ECC Addition. More... | |
Driver for the cc2538 ECC mode of the PKC engine.
uint8_t ecc_add_get_result | ( | ec_point_t * | ptOutEcPt, |
uint32_t | ui32ResultLoc | ||
) |
Gets the result of the ECC Addition.
ptOutEcPt | Pointer to the structure where the resultant point will be stored. The callee is responsible to allocate memory, for the ec point structure including the memory for x and y co-ordinate values. |
ui32ResultLoc | Address of the result location which was provided by the function |
This function gets the result of ecc point addition operation on the on the two given ec points, previously started using the function
PKA_STATUS_SUCCESS | if the operation is successful. |
PKA_STATUS_OPERATION_INPRG | if the PKA hw module is busy performing the operation. |
PKA_STATUS_RESULT_0 | if the result is all zeroes. |
PKA_STATUS_FAILURE | if the operation is not successful. |
Definition at line 503 of file ecc-driver.c.
References addr.
uint8_t ecc_add_start | ( | ec_point_t * | ec_point1, |
ec_point_t * | ec_point2, | ||
ecc_curve_info_t * | curve, | ||
uint32_t * | result_vector, | ||
struct process * | process | ||
) |
Starts the ECC Addition.
ec_point1 | Pointer to the structure containing the first ecc point. |
ec_point2 | Pointer to the structure containing the second ecc point. |
curve | Pointer to the structure containing the curve info. |
result_vector | Pointer to the result vector location which will be set by this function. |
process | Process to be polled upon completion of the operation, or NULL |
This function starts the ecc point addition operation on the two given ec points and generates the resultant ecc point.
PKA_STATUS_SUCCESS | if successful in starting the operation. |
PKA_STATUS_OPERATION_INPRG | if the PKA hw module is busy doing some other operation. |
Definition at line 391 of file ecc-driver.c.
uint8_t ecc_mul_gen_pt_get_result | ( | ec_point_t * | ec_point, |
uint32_t | result_vector | ||
) |
Gets the result of ECC Multiplication with Generator point.
ec_point | Pointer to the structure where the resultant EC point will be stored. The callee is responsible to allocate the space for the ec point structure and the x and y co-ordinate as well. |
result_vector | Address of the result location which was provided by the start function |
This function gets the result of ecc point multiplication operation on the scalar point and the known generator point on the curve, previously started using the function
PKA_STATUS_SUCCESS | if the operation is successful. |
PKA_STATUS_OPERATION_INPRG | if the PKA hw module is busy performing the operation. |
PKA_STATUS_RESULT_0 | if the result is all zeroes. |
PKA_STATUS_FAILURE | if the operation is not successful. |
Definition at line 330 of file ecc-driver.c.
uint8_t ecc_mul_gen_pt_start | ( | uint32_t * | scalar, |
ecc_curve_info_t * | curve, | ||
uint32_t * | result_vector, | ||
struct process * | process | ||
) |
Starts the ECC Multiplication with Generator point.
scalar | Pointer to the buffer containing the scalar value. |
curve | Pointer to the structure containing the curve info. |
result_vector | Pointer to the result vector location which will be set by this function. |
process | Process to be polled upon completion of the operation, or NULL |
This function starts the ecc point multiplication operation of the scalar value with the well known generator point of the given curve.
PKA_STATUS_SUCCESS | if successful in starting the operation. |
PKA_STATUS_OPERATION_INPRG | if the PKA hw module is busy doing some other operation. |
Definition at line 223 of file ecc-driver.c.
uint8_t ecc_mul_get_result | ( | ec_point_t * | ec_point, |
uint32_t | result_vector | ||
) |
Gets the result of ECC Multiplication.
ec_point | Pointer to the structure where the resultant EC point will be stored. The callee is responsible to allocate the space for the ec point structure and the x and y co-ordinate as well. |
result_vector | Address of the result location which was provided by the start function |
This function gets the result of ecc point multiplication operation on the ec point and the scalar value, previously started using the function
PKA_STATUS_SUCCESS | if the operation is successful. |
PKA_STATUS_OPERATION_INPRG | if the PKA hw module is busy performing the operation. |
PKA_STATUS_RESULT_0 | if the result is all zeroes. |
PKA_STATUS_FAILURE | if the operation is not successful. |
Definition at line 163 of file ecc-driver.c.
uint8_t ecc_mul_start | ( | uint32_t * | scalar, |
ec_point_t * | ec_point, | ||
ecc_curve_info_t * | curve, | ||
uint32_t * | result_vector, | ||
struct process * | process | ||
) |
Starts ECC Multiplication.
scalar | Pointer to the buffer containing the scalar value to be multiplied. |
ec_point | Pointer to the structure containing the elliptic curve point to be multiplied. The point should be on the given curve. |
curve | Pointer to the structure containing the curve info. |
result_vector | Pointer to the result vector location which will be set by this function. |
process | Process to be polled upon completion of the operation, or NULL |
This function starts the Elliptical curve cryptography (ECC) point multiplication operation on the EC point and the scalar value.
PKA_STATUS_SUCCESS | if successful in starting the operation. |
PKA_STATUS_OPERATION_INPRG | if the PKA hw module is busy doing some other operation. |
Definition at line 50 of file ecc-driver.c.