diff options
author | jaseg <git@jaseg.net> | 2018-11-08 19:01:10 +0900 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2018-11-08 19:01:10 +0900 |
commit | e4e231880413c58215130c4b084ac49a03c16b9b (patch) | |
tree | 1ba6c1684499b7405a90b58a34dfd4a1a36b654b /src/noise.h | |
parent | 333d94bf9f1b4e4c83a125342dd20fea62589057 (diff) | |
download | secure-hid-e4e231880413c58215130c4b084ac49a03c16b9b.tar.gz secure-hid-e4e231880413c58215130c4b084ac49a03c16b9b.tar.bz2 secure-hid-e4e231880413c58215130c4b084ac49a03c16b9b.zip |
Break out noise.c and packet_interface.c
Diffstat (limited to 'src/noise.h')
-rw-r--r-- | src/noise.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/noise.h b/src/noise.h new file mode 100644 index 0000000..68d15e1 --- /dev/null +++ b/src/noise.h @@ -0,0 +1,24 @@ +#ifndef __NOISE_H__ +#define __NOISE_H__ + +#include <stdint.h> + +#include <noise/protocol.h> + +#include "usart_helpers.h" +#include "rand_stm32.h" + + +#define CURVE25519_KEY_LEN 32 +#define MAX_HOST_PACKET_SIZE 128 + + +extern volatile uint8_t host_packet_buf[MAX_HOST_PACKET_SIZE]; +extern volatile uint8_t host_packet_length; + + +NoiseHandshakeState *start_protocol_handshake(void); +int generate_identity_key(void); +NoiseHandshakeState *try_continue_noise_handshake(NoiseHandshakeState *handshake); + +#endif |