|
Embedded SDK
Embedded SDK
|


Go to the source code of this file.
Functions | |
| void | MLKEM_SAMPLE_cbd2 (poly *r, const uint8_t *buf) |
| Samples a polynomial using the centered binomial distribution with eta=2. | |
| void | MLKEM_SAMPLE_cbd3 (poly *r, const uint8_t *buf) |
| Samples a polynomial using the centered binomial distribution with eta=3. | |
| void | MLKEM_SAMPLE_getnoise (poly *r, const uint8_t *seed, uint8_t nonce, uint8_t eta) |
| Samples a noise polynomial using PRF and CBD. | |
| void | MLKEM_SAMPLE_rej_uniform (poly *r, const uint8_t *seed, uint8_t x, uint8_t y) |
| Samples a polynomial using rejection sampling from a uniform distribution. | |
| void MLKEM_SAMPLE_cbd2 | ( | poly * | r, |
| const uint8_t * | buf | ||
| ) |
Samples a polynomial using the centered binomial distribution with eta=2.
| [out] | r | Output polynomial. |
| [in] | buf | Input byte buffer of 2 * MLKEM_N / 4 bytes. |
Definition at line 50 of file cx_mlkem_sample.c.
| void MLKEM_SAMPLE_cbd3 | ( | poly * | r, |
| const uint8_t * | buf | ||
| ) |
Samples a polynomial using the centered binomial distribution with eta=3.
| [out] | r | Output polynomial. |
| [in] | buf | Input byte buffer of 3 * MLKEM_N / 4 bytes. |
Definition at line 65 of file cx_mlkem_sample.c.
| void MLKEM_SAMPLE_getnoise | ( | poly * | r, |
| const uint8_t * | seed, | ||
| uint8_t | nonce, | ||
| uint8_t | eta | ||
| ) |
Samples a noise polynomial using PRF and CBD.
| [out] | r | Output polynomial. |
| [in] | seed | Seed of MLKEM_SYMBYTES bytes. |
| [in] | nonce | Nonce byte. |
| [in] | eta | CBD parameter (2 or 3). |
Definition at line 81 of file cx_mlkem_sample.c.
| void MLKEM_SAMPLE_rej_uniform | ( | poly * | r, |
| const uint8_t * | seed, | ||
| uint8_t | x, | ||
| uint8_t | y | ||
| ) |
Samples a polynomial using rejection sampling from a uniform distribution.
| [out] | r | Output polynomial with coefficients in [0, q-1]. |
| [in] | seed | Seed of MLKEM_SYMBYTES bytes. |
| [in] | x | First index byte for the XOF. |
| [in] | y | Second index byte for the XOF. |
Definition at line 100 of file cx_mlkem_sample.c.