|
Embedded SDK
Embedded SDK
|


Go to the source code of this file.
Functions | |
| int32_t | MLDSA_ROUNDING_power2round (int32_t a, int32_t *a0) |
| For coefficient a, compute high and low bits a0, a1 such that a mod q = a1*2^D + a0, with -2^{D-1} < a0 <= 2^{D-1}. | |
| int32_t | MLDSA_ROUNDING_decompose (int32_t a, int32_t *a0, int32_t gamma2) |
| For coefficient a, compute high and low bits a0, a1 such that a mod q = a1*ALPHA + a0, where ALPHA = 2*gamma2. | |
| uint32_t | MLDSA_ROUNDING_make_hint (int32_t a0, int32_t a1, int32_t gamma2) |
| Compute hint bit. Returns 1 if adding ct0 to w - ct0 would change the high bits (i.e., the verifier must correct them). | |
| int32_t | MLDSA_ROUNDING_use_hint (int32_t a, uint32_t hint, int32_t gamma2) |
| Correct high bits using hint. | |
| void | MLDSA_ROUNDING_poly_power2round (mldsa_poly *a1, mldsa_poly *a0, const mldsa_poly *a) |
| Applies power2round to all coefficients of a polynomial. | |
| void | MLDSA_ROUNDING_poly_decompose (mldsa_poly *a1, mldsa_poly *a0, const mldsa_poly *a, int32_t gamma2) |
| Applies decompose to all coefficients of a polynomial. | |
| void | MLDSA_ROUNDING_poly_use_hint (mldsa_poly *b, const mldsa_poly *a, const mldsa_poly *h, int32_t gamma2) |
| Applies use_hint to all coefficients of a polynomial. | |
| int32_t MLDSA_ROUNDING_decompose | ( | int32_t | a, |
| int32_t * | a0, | ||
| int32_t | gamma2 | ||
| ) |
For coefficient a, compute high and low bits a0, a1 such that a mod q = a1*ALPHA + a0, where ALPHA = 2*gamma2.
| [in] | a | Coefficient (standard representative). |
| [out] | a0 | Low bits output. |
| [in] | gamma2 | Low-order rounding range. |
Definition at line 31 of file cx_mldsa_rounding.c.
| uint32_t MLDSA_ROUNDING_make_hint | ( | int32_t | a0, |
| int32_t | a1, | ||
| int32_t | gamma2 | ||
| ) |
Compute hint bit. Returns 1 if adding ct0 to w - ct0 would change the high bits (i.e., the verifier must correct them).
| [in] | a0 | Low part. |
| [in] | a1 | High part. |
| [in] | gamma2 | Low-order rounding range. |
Definition at line 51 of file cx_mldsa_rounding.c.
| void MLDSA_ROUNDING_poly_decompose | ( | mldsa_poly * | a1, |
| mldsa_poly * | a0, | ||
| const mldsa_poly * | a, | ||
| int32_t | gamma2 | ||
| ) |
Applies decompose to all coefficients of a polynomial.
| [out] | a1 | High bits output polynomial. |
| [out] | a0 | Low bits output polynomial. |
| [in] | a | Input polynomial. |
| [in] | gamma2 | Low-order rounding range. |
Definition at line 94 of file cx_mldsa_rounding.c.
| void MLDSA_ROUNDING_poly_power2round | ( | mldsa_poly * | a1, |
| mldsa_poly * | a0, | ||
| const mldsa_poly * | a | ||
| ) |
Applies power2round to all coefficients of a polynomial.
| [out] | a1 | High bits output polynomial. |
| [out] | a0 | Low bits output polynomial. |
| [in] | a | Input polynomial. |
Definition at line 87 of file cx_mldsa_rounding.c.
| void MLDSA_ROUNDING_poly_use_hint | ( | mldsa_poly * | b, |
| const mldsa_poly * | a, | ||
| const mldsa_poly * | h, | ||
| int32_t | gamma2 | ||
| ) |
Applies use_hint to all coefficients of a polynomial.
| [out] | b | Output polynomial. |
| [in] | a | Input polynomial. |
| [in] | h | Hint polynomial. |
| [in] | gamma2 | Low-order rounding range. |
Definition at line 104 of file cx_mldsa_rounding.c.
| int32_t MLDSA_ROUNDING_power2round | ( | int32_t | a, |
| int32_t * | a0 | ||
| ) |
For coefficient a, compute high and low bits a0, a1 such that a mod q = a1*2^D + a0, with -2^{D-1} < a0 <= 2^{D-1}.
| [in] | a | Coefficient. |
| [out] | a0 | Low bits output. |
Definition at line 23 of file cx_mldsa_rounding.c.
| int32_t MLDSA_ROUNDING_use_hint | ( | int32_t | a, |
| uint32_t | hint, | ||
| int32_t | gamma2 | ||
| ) |
Correct high bits using hint.
| [in] | a | Coefficient. |
| [in] | hint | Hint bit (0 or 1). |
| [in] | gamma2 | Low-order rounding range. |
Definition at line 59 of file cx_mldsa_rounding.c.