Skip to content

Commit

Permalink
Remove CRYPTO_ALGNAME from kem.h
Browse files Browse the repository at this point in the history
Move it to `gen_NISTKAT.c`, which is the only place where it is used.

Signed-off-by: Hanno Becker <[email protected]>
  • Loading branch information
hanno-becker committed Jan 6, 2025
1 parent 826fb60 commit f3c5f30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions mlkem/kem.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
#define CRYPTO_CIPHERTEXTBYTES MLKEM_CIPHERTEXTBYTES
#define CRYPTO_BYTES MLKEM_SSBYTES

#if (MLKEM_K == 2)
#define CRYPTO_ALGNAME "Kyber512"
#elif (MLKEM_K == 3)
#define CRYPTO_ALGNAME "Kyber768"
#elif (MLKEM_K == 4)
#define CRYPTO_ALGNAME "Kyber1024"
#endif

#define crypto_kem_keypair_derand MLKEM_NAMESPACE(keypair_derand)
/*************************************************
* Name: crypto_kem_keypair_derand
Expand Down
8 changes: 8 additions & 0 deletions test/gen_NISTKAT.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
#include "nistrng.h"
#include "randombytes.h"

#if (MLKEM_K == 2)
#define CRYPTO_ALGNAME "Kyber512"
#elif (MLKEM_K == 3)
#define CRYPTO_ALGNAME "Kyber768"
#elif (MLKEM_K == 4)
#define CRYPTO_ALGNAME "Kyber1024"
#endif

static void fprintBstr(FILE *fp, const char *S, const uint8_t *A, size_t L)
{
size_t i;
Expand Down

0 comments on commit f3c5f30

Please sign in to comment.