Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Galois embedded crypto iplementation. More...
#include "modules/datalink/gec/gec.h"
Go to the source code of this file.
Functions | |
void | gec_sts_init (struct gec_sts_ctx *sts) |
void | gec_clear_sts (struct gec_sts_ctx *sts) |
void | gec_generate_ephemeral_keys (struct gec_privkey *sk) |
Generate private and public key pairs for future use. More... | |
void | gec_derive_key_material (struct gec_sts_ctx *ctx, uint8_t *z) |
Derive key material for both sender and receiver. More... | |
uint32_t | gec_bytes_to_counter (uint8_t *bytes) |
Convert from network byte order (big endian) to the machine byte order. More... | |
void | gec_counter_to_bytes (uint32_t n, uint8_t *bytes) |
Convert counter to bytes in network byte order. More... | |
Galois embedded crypto iplementation.
Definition in file gec.c.
Convert from network byte order (big endian) to the machine byte order.
Definition at line 117 of file gec.c.
Referenced by gec_decrypt_message().
void gec_clear_sts | ( | struct gec_sts_ctx * | sts | ) |
Definition at line 54 of file gec.c.
References ERROR_NONE, RESPONDER, sts, and WAIT_MSG1.
Referenced by gec_sts_init().
Convert counter to bytes in network byte order.
Definition at line 142 of file gec.c.
Referenced by gec_encrypt_message().
void gec_derive_key_material | ( | struct gec_sts_ctx * | ctx, |
uint8_t * | z | ||
) |
Derive key material for both sender and receiver.
Definition at line 91 of file gec.c.
References gec_sym_key::counter, gec_sym_key::key, gec_sym_key::nonce, PPRZ_KEY_LEN, PPRZ_NONCE_LEN, gec_sym_key::ready, gec_sts_ctx::rx_sym_key, and gec_sts_ctx::tx_sym_key.
Referenced by gec_process_msg1().
void gec_generate_ephemeral_keys | ( | struct gec_privkey * | sk | ) |
Generate private and public key pairs for future use.
Definition at line 73 of file gec.c.
References PPRZ_KEY_LEN, gec_privkey::priv, gec_privkey::pub, gec_privkey::ready, and rng_wait_and_get().
Referenced by gec_process_msg1(), and gec_sts_init().
void gec_sts_init | ( | struct gec_sts_ctx * | sts | ) |
Definition at line 33 of file gec.c.
References gec_clear_sts(), gec_generate_ephemeral_keys(), PPRZ_KEY_LEN, and sts.
Referenced by gec_dl_init().