|
Embedded SDK
Embedded SDK
|
ML-KEM polynomial vector operations (FIPS 203). More...

Go to the source code of this file.
Functions | |
| void | MLKEM_POLYVEC_tobytes (uint8_t *r, const polyvec *a, uint8_t k) |
| Serializes a polynomial vector to bytes. | |
| void | MLKEM_POLYVEC_frombytes (polyvec *r, const uint8_t *a, uint8_t k) |
| Deserializes a polynomial vector from bytes. | |
| void | MLKEM_POLYVEC_ntt (polyvec *r, uint8_t k) |
| Applies the NTT to each polynomial in a vector. | |
| void | MLKEM_POLYVEC_invntt_tomont (polyvec *r, uint8_t k) |
| Applies the inverse NTT to each polynomial in a vector. | |
| void | MLKEM_POLYVEC_reduce (polyvec *r, uint8_t k) |
| Reduces all coefficients of each polynomial in a vector. | |
| void | MLKEM_POLYVEC_add (polyvec *r, const polyvec *b, uint8_t k) |
| Adds polynomial vector b to r in place. | |
| void | MLKEM_POLYVEC_tomont (polyvec *r, uint8_t k) |
| Converts each polynomial in a vector to Montgomery domain. | |
| void | MLKEM_POLYVEC_compress (uint8_t *r, const polyvec *a, uint8_t k, uint8_t du) |
| Compresses and serializes a polynomial vector. | |
| void | MLKEM_POLYVEC_decompress (polyvec *r, const uint8_t *a, uint8_t k, uint8_t du) |
| Decompresses and deserializes a polynomial vector. | |
| void | MLKEM_POLYVEC_basemul_acc_montgomery (poly *r, const polyvec *a, const polyvec *b, uint8_t k) |
| Accumulated pointwise multiplication of two polynomial vectors in the NTT domain. | |
ML-KEM polynomial vector operations (FIPS 203).
Implements vector-level wrappers over polynomial operations, including serialization, NTT, reduction, compression/decompression, and accumulated base multiplication.
Definition in file cx_mlkem_polyvec.c.
Adds polynomial vector b to r in place.
| [in,out] | r | Accumulator polynomial vector. |
| [in] | b | Polynomial vector to add. |
| [in] | k | Number of polynomials in the vectors. |
Definition at line 67 of file cx_mlkem_polyvec.c.
| void MLKEM_POLYVEC_basemul_acc_montgomery | ( | poly * | r, |
| const polyvec * | a, | ||
| const polyvec * | b, | ||
| uint8_t | k | ||
| ) |
Accumulated pointwise multiplication of two polynomial vectors in the NTT domain.
| [out] | r | Result polynomial (inner product of a and b). |
| [in] | a | First polynomial vector. |
| [in] | b | Second polynomial vector. |
| [in] | k | Number of polynomials in the vectors. |
Definition at line 109 of file cx_mlkem_polyvec.c.
| void MLKEM_POLYVEC_compress | ( | uint8_t * | r, |
| const polyvec * | a, | ||
| uint8_t | k, | ||
| uint8_t | du | ||
| ) |
Compresses and serializes a polynomial vector.
| [out] | r | Output byte array. |
| [in] | a | Polynomial vector to compress. |
| [in] | k | Number of polynomials in the vector. |
| [in] | du | Compression parameter (10 or 11). |
Definition at line 81 of file cx_mlkem_polyvec.c.
| void MLKEM_POLYVEC_decompress | ( | polyvec * | r, |
| const uint8_t * | a, | ||
| uint8_t | k, | ||
| uint8_t | du | ||
| ) |
Decompresses and deserializes a polynomial vector.
| [out] | r | Output polynomial vector. |
| [in] | a | Input compressed byte array. |
| [in] | k | Number of polynomials in the vector. |
| [in] | du | Compression parameter (10 or 11). |
Definition at line 95 of file cx_mlkem_polyvec.c.
| void MLKEM_POLYVEC_frombytes | ( | polyvec * | r, |
| const uint8_t * | a, | ||
| uint8_t | k | ||
| ) |
Deserializes a polynomial vector from bytes.
| [out] | r | Output polynomial vector. |
| [in] | a | Input byte array. |
| [in] | k | Number of polynomials in the vector. |
Definition at line 39 of file cx_mlkem_polyvec.c.
| void MLKEM_POLYVEC_invntt_tomont | ( | polyvec * | r, |
| uint8_t | k | ||
| ) |
Applies the inverse NTT to each polynomial in a vector.
| [in,out] | r | Polynomial vector to transform in place. |
| [in] | k | Number of polynomials in the vector. |
Definition at line 53 of file cx_mlkem_polyvec.c.
| void MLKEM_POLYVEC_ntt | ( | polyvec * | r, |
| uint8_t | k | ||
| ) |
Applies the NTT to each polynomial in a vector.
| [in,out] | r | Polynomial vector to transform in place. |
| [in] | k | Number of polynomials in the vector. |
Definition at line 46 of file cx_mlkem_polyvec.c.
| void MLKEM_POLYVEC_reduce | ( | polyvec * | r, |
| uint8_t | k | ||
| ) |
Reduces all coefficients of each polynomial in a vector.
| [in,out] | r | Polynomial vector to reduce in place. |
| [in] | k | Number of polynomials in the vector. |
Definition at line 60 of file cx_mlkem_polyvec.c.
| void MLKEM_POLYVEC_tobytes | ( | uint8_t * | r, |
| const polyvec * | a, | ||
| uint8_t | k | ||
| ) |
Serializes a polynomial vector to bytes.
| [out] | r | Output byte array. |
| [in] | a | Polynomial vector to serialize. |
| [in] | k | Number of polynomials in the vector. |
Definition at line 32 of file cx_mlkem_polyvec.c.
| void MLKEM_POLYVEC_tomont | ( | polyvec * | r, |
| uint8_t | k | ||
| ) |
Converts each polynomial in a vector to Montgomery domain.
| [in,out] | r | Polynomial vector to convert in place. |
| [in] | k | Number of polynomials in the vector. |
Definition at line 74 of file cx_mlkem_polyvec.c.