Skip to content

Commit

Permalink
minor fix, leftover from previous pr
Browse files Browse the repository at this point in the history
  • Loading branch information
dkostic committed Aug 26, 2024
1 parent 2bb8357 commit d4d2f11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crypto/fipsmodule/ml_kem/ml_kem_ref/indcpa.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static unsigned int rej_uniform(int16_t *r,
**************************************************/
#define GEN_MATRIX_NBLOCKS ((12*KYBER_N/8*(1 << 12)/KYBER_Q + XOF_BLOCKBYTES)/XOF_BLOCKBYTES)
// Not static for benchmarking
void gen_matrix(ml_kem_params *params, polyvec *a, const uint8_t *seed, int transposed)
void gen_matrix(ml_kem_params *params, polyvec *a, const uint8_t seed[KYBER_SYMBYTES], int transposed)
{
unsigned int ctr, i, j, k;
unsigned int buflen, off;
Expand Down Expand Up @@ -267,7 +267,7 @@ void indcpa_enc(ml_kem_params *params,
uint8_t *c,
const uint8_t *m,
const uint8_t *pk,
const uint8_t *coins)
const uint8_t coins[KYBER_SYMBYTES])
{
unsigned int i;
uint8_t seed[KYBER_SYMBYTES];
Expand Down
4 changes: 2 additions & 2 deletions crypto/fipsmodule/ml_kem/ml_kem_ref/indcpa.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "polyvec.h"

#define gen_matrix KYBER_NAMESPACE(gen_matrix)
void gen_matrix(ml_kem_params *params, polyvec *a, const uint8_t *seed, int transposed);
void gen_matrix(ml_kem_params *params, polyvec *a, const uint8_t seed[KYBER_SYMBYTES], int transposed);

#define indcpa_keypair_derand KYBER_NAMESPACE(indcpa_keypair_derand)
void indcpa_keypair_derand(ml_kem_params *params,
Expand All @@ -19,7 +19,7 @@ void indcpa_enc(ml_kem_params *params,
uint8_t *c,
const uint8_t *m,
const uint8_t *pk,
const uint8_t *coins);
const uint8_t coins[KYBER_SYMBYTES]);

#define indcpa_dec KYBER_NAMESPACE(indcpa_dec)
void indcpa_dec(ml_kem_params *params,
Expand Down

0 comments on commit d4d2f11

Please sign in to comment.