summaryrefslogtreecommitdiff
path: root/src/noise.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/noise.h')
-rw-r--r--src/noise.h24
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