Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gec.c File Reference

Galois embedded crypto iplementation. More...

+ Include dependency graph for gec.c:

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

Detailed Description

Galois embedded crypto iplementation.

Definition in file gec.c.

Function Documentation

uint32_t gec_bytes_to_counter ( uint8_t bytes)

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

+ Here is the caller graph for this function:

void gec_counter_to_bytes ( uint32_t  n,
uint8_t bytes 
)

Convert counter to bytes in network byte order.

Definition at line 142 of file gec.c.

Referenced by gec_encrypt_message().

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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(), gec_sts_ctx::my_private_ephemeral, gec_sts_ctx::my_private_key, PPRZ_KEY_LEN, gec_privkey::priv, gec_privkey::pub, gec_privkey::ready, gec_pubkey::ready, and gec_sts_ctx::their_public_key.

Referenced by gec_dl_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: