Contiki-NG
|
This is a implementation of ECDH, ECDSA sign and ECDSA verify. More...
Files | |
file | ecc-algorithm.c |
Implementation of the cc2538 ECC Algorithms. | |
file | ecc-algorithm.h |
Header file for the cc2538 ECC Algorithms. | |
Functions | |
PT_THREAD (ecc_compare(ecc_compare_state_t *state)) | |
Do a compare of two big numbers. More... | |
PT_THREAD (ecc_multiply(ecc_multiply_state_t *state)) | |
Do a Multiplication on a EC. More... | |
PT_THREAD (ecc_dsa_sign(ecc_dsa_sign_state_t *state)) | |
Sign a Hash. More... | |
PT_THREAD (ecc_dsa_verify(ecc_dsa_verify_state_t *state)) | |
Verify Signature. More... | |
This is a implementation of ECDH, ECDSA sign and ECDSA verify.
It uses ecc-driver to communicate with the PKA. It uses continuations to free the main CPU / thread while the PKA is calculating.
PT_THREAD | ( | ecc_compare(ecc_compare_state_t *state) | ) |
Do a compare of two big numbers.
This function can be used for ECDH as well as Calculating a Public Key for ECDSA
Definition at line 56 of file ecc-algorithm.c.
PT_THREAD | ( | ecc_multiply(ecc_multiply_state_t *state) | ) |
Do a Multiplication on a EC.
This function can be used for ECDH as well as Calculating a Public Key for ECDSA
Definition at line 66 of file ecc-algorithm.c.
PT_THREAD | ( | ecc_dsa_sign(ecc_dsa_sign_state_t *state) | ) |
Sign a Hash.
This function has to be called several times until the pt state is EXIT If the result code is 0 (SUCCESS) the signature can be read from point_r and signature_s
Definition at line 76 of file ecc-algorithm.c.
PT_THREAD | ( | ecc_dsa_verify(ecc_dsa_verify_state_t *state) | ) |
Verify Signature.
This function has to be called several times until the pt state is EXIT If the result code is 0 (SUCCESS) the verification was success full.
Definition at line 134 of file ecc-algorithm.c.