![]() |
Contiki-NG
|
Implementation of PKA-accelerated ECDH and ECDSA. More...
#include "lib/ecc.h"#include "lib/csprng.h"#include "dev/pka.h"#include <stdbool.h>#include "sys/log.h"Go to the source code of this file.
Functions | |
| static bool | test_bit (const uint32_t *element, size_t bit) |
| Tells if a bit in a little-endian element is set. | |
| static char | compare_a_and_b (uintptr_t a_offset, uintptr_t b_offset, int *const result) |
| static char | check_bounds (uintptr_t x_offset, uintptr_t a_offset, uintptr_t b_offset, int *const result) |
| static char | invert_modulo (uintptr_t number_offset, uintptr_t modulus_offset, uintptr_t result_offset, int *const result) |
| static char | add_or_multiply_modulo (uint32_t function, uintptr_t a_offset, uintptr_t b_offset, uintptr_t modulus_offset, uintptr_t result_offset, int *const result) |
| static char | subtract (uintptr_t a_offset, uintptr_t b_offset, uintptr_t result_offset) |
| static char | reduce_to_element (uintptr_t hash_offset, int *const result) |
| static char | add_or_multiply_point (uint32_t function, uintptr_t a_offset, uintptr_t c_offset, uintptr_t result_offset, int *const result) |
| char | ecc_validate_public_key (const uint8_t *public_key, int *const result) |
| char | ecc_decompress_public_key (const uint8_t *compressed_public_key, uint8_t *uncompressed_public_key, int *const result) |
| char | ecc_sign (const uint8_t *message_hash, const uint8_t *private_key, uint8_t *signature, int *const result) |
| char | ecc_verify (const uint8_t *signature, const uint8_t *message_hash, const uint8_t *public_key, int *const result) |
| char | ecc_generate_key_pair (uint8_t *public_key, uint8_t *private_key, int *const result) |
| char | ecc_generate_shared_secret (const uint8_t *public_key, const uint8_t *private_key, uint8_t *shared_secret, int *const result) |
Implementation of PKA-accelerated ECDH and ECDSA.
Definition in file cc2538-ecc.c.