Skip to content

Commit

Permalink
Don't include config.h or params.h directly
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
hanno-becker committed Jan 6, 2025
1 parent f3029dd commit 7f621d2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions mlkem/fips202/keccakf1600.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
* from https://twitter.com/tweetfips202
* by Gilles Van Assche, Daniel J. Bernstein, and Peter Schwabe */

#include "keccakf1600.h"
#include <assert.h>
#include <stdint.h>

#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)))
Expand Down
2 changes: 1 addition & 1 deletion mlkem/kem.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <stdint.h>
#include "cbmc.h"
#include "params.h"
#include "commmon.h"

#define CRYPTO_SECRETKEYBYTES MLKEM_SECRETKEYBYTES
#define CRYPTO_PUBLICKEYBYTES MLKEM_PUBLICKEYBYTES
Expand Down
1 change: 0 additions & 1 deletion mlkem/polyvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "polyvec.h"
#include <stdint.h>
#include "arith_backend.h"
#include "config.h"
#include "ntt.h"
#include "poly.h"

Expand Down
2 changes: 1 addition & 1 deletion mlkem/verify.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <stddef.h>
#include <stdint.h>
#include "cbmc.h"
#include "params.h"
#include "common.h"

/* Static namespacing
* This is to facilitate building multiple instances
Expand Down

0 comments on commit 7f621d2

Please sign in to comment.