From 4e0bec79b7f83f08fcc027e1fd24c702a58dc324 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Wed, 14 Jun 2023 20:30:43 +0100 Subject: [PATCH] iwyu: speck.h --- include/n2n.h | 1 - include/speck.h | 5 +---- src/edge.c | 1 + src/edge_utils.c | 1 + src/header_encryption.c | 1 + src/sn_utils.c | 1 + src/speck.c | 3 +++ src/transform_speck.c | 2 ++ 8 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/n2n.h b/include/n2n.h index cf8ebc6..9da119d 100644 --- a/include/n2n.h +++ b/include/n2n.h @@ -141,7 +141,6 @@ #include "n2n_wire.h" #include "portable_endian.h" #include "aes.h" -#include "speck.h" #include "curve25519.h" #include "n2n_regex.h" #include "sn_selection.h" diff --git a/include/speck.h b/include/speck.h index 686818b..9f9cb18 100644 --- a/include/speck.h +++ b/include/speck.h @@ -26,10 +26,7 @@ #define SPECK_H -#include -#include - -#include "portable_endian.h" +#include // for uint64_t, uint32_t #define u32 uint32_t diff --git a/src/edge.c b/src/edge.c index a898b63..cd671f0 100644 --- a/src/edge.c +++ b/src/edge.c @@ -20,6 +20,7 @@ #include "n2n.h" #include "pearson.h" // for pearson_hash_64 #include "random_numbers.h" // for n2n_seed, n2n_srand +#include "speck.h" // for speck_init, speck_context_t /* *************************************************** */ diff --git a/src/edge_utils.c b/src/edge_utils.c index dba863a..7bff220 100644 --- a/src/edge_utils.c +++ b/src/edge_utils.c @@ -23,6 +23,7 @@ #include "network_traffic_filter.h" // for create_network_traffic_filter #include "pearson.h" // for pearson_hash_128, pearson_hash_64 #include "random_numbers.h" // for n2n_rand, n2n_rand_sqr +#include "speck.h" // for speck_128_decrypt, speck_128_enc... /* ************************************** */ diff --git a/src/header_encryption.c b/src/header_encryption.c index 9ee2ee9..d2d0b56 100644 --- a/src/header_encryption.c +++ b/src/header_encryption.c @@ -21,6 +21,7 @@ #include "n2n.h" // for he_context_t, N2N_COMMUNITY_SIZE, TRA... #include "pearson.h" // for pearson_hash_128, pearson_hash_64 #include "random_numbers.h" // for n2n_rand +#include "speck.h" // for speck_init, speck_context_t, speck_ctr #define HASH_FIND_COMMUNITY(head, name, out) HASH_FIND_STR(head, name, out) diff --git a/src/sn_utils.c b/src/sn_utils.c index 56e8a89..442e954 100644 --- a/src/sn_utils.c +++ b/src/sn_utils.c @@ -22,6 +22,7 @@ #include "n2n.h" // for sn_community, n2n_sn_t, peer_info #include "pearson.h" // for pearson_hash_128, pearson_hash_32 #include "random_numbers.h" // for n2n_rand, n2n_rand_sqr, n2n_seed, n2n... +#include "speck.h" // for speck_128_encrypt, speck_context_t #define HASH_FIND_COMMUNITY(head, name, out) HASH_FIND_STR(head, name, out) diff --git a/src/speck.c b/src/speck.c index 4c43003..948f7c8 100644 --- a/src/speck.c +++ b/src/speck.c @@ -23,6 +23,9 @@ #include "speck.h" +#include // for htole64, le64toh +#include // for _mm_free, _mm_malloc +#include // for size_t #if defined (__AVX512F__) // AVX512 support ---------------------------------------------------------------------- diff --git a/src/transform_speck.c b/src/transform_speck.c index 1f9661d..9b18591 100644 --- a/src/transform_speck.c +++ b/src/transform_speck.c @@ -20,6 +20,8 @@ #include "n2n.h" // for n2n_trans_op_t, traceEvent, TRACE_DEBUG #include "pearson.h" // for pearson_hash_256 #include "random_numbers.h" // for n2n_rand +#include "speck.h" // for N2N_SPECK_IVEC_SIZE, speck_ctr, speck_de... + // Speck plaintext preamble #define TRANSOP_SPECK_PREAMBLE_SIZE (N2N_SPECK_IVEC_SIZE)