Contiki-NG
Files | Functions

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...
 

Detailed Description

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.

Note
Only one request can be processed at a time. Maximal supported key length is 384bit (12 words).

Function Documentation

◆ PT_THREAD() [1/4]

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() [2/4]

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() [3/4]

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() [4/4]

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.

Note
some error codes signal internal errors and others signal falls signatures.

Definition at line 134 of file ecc-algorithm.c.