Skip to content

Commit

Permalink
Minor fixes as suggested by Matt Johnston.
Browse files Browse the repository at this point in the history
Signed-off-by: Loganaden Velvindron <[email protected]>
Signed-off-by: Jaykishan Mutkawoa <[email protected]>
Signed-off-by: Kavish nadan <[email protected]>
  • Loading branch information
loganaden committed Jan 13, 2025
1 parent 95df38c commit bc182cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/mlkem768.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#include "kex.h"

#ifdef DROPBEAR_MLKEM768
#if DROPBEAR_MLKEM768

#include "libcrux_mlkem768_sha3.h"
#include "mlkem768.h"
Expand All @@ -51,7 +51,7 @@
int
crypto_kem_mlkem768_keypair(unsigned char *pk, unsigned char *sk)
{
u_char rnd[LIBCRUX_ML_KEM_KEY_PAIR_PRNG_LEN];
unsigned char rnd[LIBCRUX_ML_KEM_KEY_PAIR_PRNG_LEN];
struct libcrux_mlkem768_keypair keypair;

genrandom(rnd, sizeof(rnd));
Expand Down
8 changes: 4 additions & 4 deletions src/sysoptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
#define DROPBEAR_SK_ED25519 ((DROPBEAR_SK_KEYS) && (DROPBEAR_ED25519))
#endif

#define DROPBEAR_PQHYBRID DROPBEAR_SNTRUP761 || DROPBEAR_MLKEM768
#define DROPBEAR_PQHYBRID (DROPBEAR_SNTRUP761 || DROPBEAR_MLKEM768)
#define DROPBEAR_CURVE25519_DEP (DROPBEAR_CURVE25519 || DROPBEAR_PQHYBRID)

/* Dropbear only uses server-sig-algs, only needed if we have rsa-sha256 pubkey auth */
Expand Down Expand Up @@ -261,11 +261,11 @@
#endif

/* For kex hash buffer, worst case size for Q_C || Q_S || K */
#if DROPBEAR_SNTRUP761
#if DROPBEAR_MLKEM768
#define MAX_KEX_PARTS (2*4 + 1184 + 1088 + 32*2 + 68)
#elif DROPBEAR_SNTRUP761
/* 2337 */
#define MAX_KEX_PARTS (2*4 + 1158 + 1039 + 32*2 + 68)
#elif DROPBEAR_MLKEM768
#define MAX_KEX_PARTS (2*4 + 1184 + 1088 + 32*2 + 68)
#elif DROPBEAR_DH_GROUP16
/* 4096 bit group */
#define MAX_KEX_PARTS (3 * 520)
Expand Down

0 comments on commit bc182cf

Please sign in to comment.