|
Contiki 3.x
|
Files | |
| file | ecc-algorithm.c |
| Implementation of 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... | |
| 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 55 of file ecc-algorithm.c.
References bignum_cmp_get_result(), bignum_cmp_start(), pka_check_status(), PT_BEGIN, PT_END, and PT_WAIT_UNTIL.
| 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 65 of file ecc-algorithm.c.
References ecc_mul_get_result(), ecc_mul_start(), pka_check_status(), PT_BEGIN, PT_END, and PT_WAIT_UNTIL.
| 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 75 of file ecc-algorithm.c.
References bignum_add_get_result(), bignum_add_start(), bignum_inv_mod_get_result(), bignum_inv_mod_start(), bignum_mod_get_result(), bignum_mod_start(), bignum_mul_get_result(), bignum_mul_start(), ecc_mul_get_result(), ecc_mul_start(), pka_check_status(), PT_BEGIN, PT_END, and PT_WAIT_UNTIL.
| 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 133 of file ecc-algorithm.c.
References bignum_cmp_get_result(), bignum_cmp_start(), bignum_inv_mod_get_result(), bignum_inv_mod_start(), bignum_mod_get_result(), bignum_mod_start(), bignum_mul_get_result(), bignum_mul_start(), ecc_add_get_result(), ecc_add_start(), ecc_mul_get_result(), ecc_mul_start(), pka_check_status(), PKA_STATUS_A_GR_B, PKA_STATUS_A_LT_B, PKA_STATUS_SIGNATURE_INVALID, PT_BEGIN, PT_END, and PT_WAIT_UNTIL.
1.8.6