Skip to content

Commit

Permalink
move polyvec_decompress comment
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias J. Kannwischer <[email protected]>
  • Loading branch information
mkannwischer committed Nov 18, 2024
1 parent 75f52dc commit e054de9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 0 additions & 10 deletions mlkem/polyvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@ void polyvec_compress(uint8_t r[MLKEM_POLYVECCOMPRESSEDBYTES],
#endif
}

/*************************************************
* Name: polyvec_decompress
*
* Description: De-serialize and decompress vector of polynomials;
* approximate inverse of polyvec_compress
*
* Arguments: - polyvec *r: pointer to output vector of polynomials
* - const uint8_t *a: pointer to input byte array
* (of length MLKEM_POLYVECCOMPRESSEDBYTES)
**************************************************/
void polyvec_decompress(polyvec *r,
const uint8_t a[MLKEM_POLYVECCOMPRESSEDBYTES]) {
#if (MLKEM_POLYVECCOMPRESSEDBYTES == (MLKEM_K * 352))
Expand Down
11 changes: 11 additions & 0 deletions mlkem/polyvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ REQUIRES(FORALL(int, k0, 0, MLKEM_K - 1,
// clang-format on

#define polyvec_decompress MLKEM_NAMESPACE(polyvec_decompress)
/*************************************************
* Name: polyvec_decompress
*
* Description: De-serialize and decompress vector of polynomials;
* approximate inverse of polyvec_compress
*
* Arguments: - polyvec *r: pointer to output vector of polynomials.
* Output will have coefficients normalized to [0,..,q-1].
* - const uint8_t *a: pointer to input byte array
* (of length MLKEM_POLYVECCOMPRESSEDBYTES)
**************************************************/
void polyvec_decompress(
polyvec *r,
const uint8_t a[MLKEM_POLYVECCOMPRESSEDBYTES]) // clang-format off
Expand Down

0 comments on commit e054de9

Please sign in to comment.