From 7f621d2ccf7620fb3551cc0b45e0bf301c04b187 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Mon, 6 Jan 2025 06:56:33 +0000 Subject: [PATCH] Don't include config.h or params.h directly mlkem-native's source and header files should instead include `common.h`. This commit fixes a few header and source files in this regard. Signed-off-by: Hanno Becker --- mlkem/fips202/keccakf1600.c | 6 ++---- mlkem/kem.h | 2 +- mlkem/polyvec.c | 1 - mlkem/verify.h | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/mlkem/fips202/keccakf1600.c b/mlkem/fips202/keccakf1600.c index 7c7a2d71d..7c04efcea 100644 --- a/mlkem/fips202/keccakf1600.c +++ b/mlkem/fips202/keccakf1600.c @@ -10,14 +10,12 @@ * from https://twitter.com/tweetfips202 * by Gilles Van Assche, Daniel J. Bernstein, and Peter Schwabe */ -#include "keccakf1600.h" #include #include -#include "config.h" -#include "fips202_backend.h" - #include "cbmc.h" +#include "fips202_backend.h" +#include "keccakf1600.h" #define NROUNDS 24 #define ROL(a, offset) ((a << offset) ^ (a >> (64 - offset))) diff --git a/mlkem/kem.h b/mlkem/kem.h index 2ba4af066..fc0c04bf9 100644 --- a/mlkem/kem.h +++ b/mlkem/kem.h @@ -7,7 +7,7 @@ #include #include "cbmc.h" -#include "params.h" +#include "commmon.h" #define CRYPTO_SECRETKEYBYTES MLKEM_SECRETKEYBYTES #define CRYPTO_PUBLICKEYBYTES MLKEM_PUBLICKEYBYTES diff --git a/mlkem/polyvec.c b/mlkem/polyvec.c index 72277a626..d1150ca85 100644 --- a/mlkem/polyvec.c +++ b/mlkem/polyvec.c @@ -5,7 +5,6 @@ #include "polyvec.h" #include #include "arith_backend.h" -#include "config.h" #include "ntt.h" #include "poly.h" diff --git a/mlkem/verify.h b/mlkem/verify.h index 126eeb279..4398eafe7 100644 --- a/mlkem/verify.h +++ b/mlkem/verify.h @@ -9,7 +9,7 @@ #include #include #include "cbmc.h" -#include "params.h" +#include "common.h" /* Static namespacing * This is to facilitate building multiple instances