|
Embedded SDK
Embedded SDK
|


Go to the source code of this file.
Functions | |
| void | MLDSA_PACK_polyt1 (uint8_t r[MLDSA_POLYT1_PACKEDBYTES], const mldsa_poly *a) |
| Bit-pack polynomial with coefficients a1 from power2round (10-bit values). Each coefficient uses 10 bits. | |
| void | MLDSA_PACK_unpack_polyt1 (mldsa_poly *r, const uint8_t a[MLDSA_POLYT1_PACKEDBYTES]) |
| Unpack polynomial t1 from bytes. | |
| void | MLDSA_PACK_polyt0 (uint8_t r[MLDSA_POLYT0_PACKEDBYTES], const mldsa_poly *a) |
| Bit-pack polynomial with coefficients a0 from power2round. Coefficients in (-(2^{D-1}-1), 2^{D-1}], using 13 bits. | |
| void | MLDSA_PACK_unpack_polyt0 (mldsa_poly *r, const uint8_t a[MLDSA_POLYT0_PACKEDBYTES]) |
| Unpack polynomial t0 from bytes. | |
| uint32_t | MLDSA_PACK_polyeta (uint8_t *r, const mldsa_poly *a, uint8_t eta) |
| Bit-pack polynomial with coefficients in [-eta, eta]. | |
| uint32_t | MLDSA_PACK_unpack_polyeta (mldsa_poly *r, const uint8_t *a, uint8_t eta) |
| Unpack polynomial with coefficients in [-eta, eta]. | |
| uint32_t | MLDSA_PACK_polyz (uint8_t *r, const mldsa_poly *a, int32_t gamma1) |
| Bit-pack polynomial z with coefficients in [-(gamma1-1), gamma1]. | |
| uint32_t | MLDSA_PACK_unpack_polyz (mldsa_poly *r, const uint8_t *a, int32_t gamma1) |
| Unpack polynomial z. | |
| uint32_t | MLDSA_PACK_polyw1 (uint8_t *r, const mldsa_poly *a, int32_t gamma2) |
| Bit-pack polynomial w1 with coefficients fitting in ceil(log2((q-1)/(2*gamma2))) bits. | |
| void | MLDSA_PACK_pk (uint8_t *pk, const uint8_t rho[MLDSA_SEEDBYTES], const mldsa_poly *t1, const MLDSA_param_info_t *p) |
| Pack the public key (rho || t1). | |
| void | MLDSA_PACK_unpack_pk (uint8_t rho[MLDSA_SEEDBYTES], mldsa_poly *t1, const uint8_t *pk, const MLDSA_param_info_t *p) |
| Unpack the public key. | |
| void | MLDSA_PACK_sk (uint8_t *sk, const uint8_t rho[MLDSA_SEEDBYTES], const uint8_t K[MLDSA_SEEDBYTES], const uint8_t tr[MLDSA_TRBYTES], const mldsa_poly *s1, const mldsa_poly *s2, const mldsa_poly *t0, const MLDSA_param_info_t *p) |
| Pack the secret key (rho || K || tr || s1 || s2 || t0). | |
| void | MLDSA_PACK_unpack_sk (uint8_t rho[MLDSA_SEEDBYTES], uint8_t K[MLDSA_SEEDBYTES], uint8_t tr[MLDSA_TRBYTES], mldsa_poly *s1, mldsa_poly *s2, mldsa_poly *t0, const uint8_t *sk, const MLDSA_param_info_t *p) |
| Unpack the secret key. | |
| void | MLDSA_PACK_sig (uint8_t *sig, const uint8_t *ctilde, const mldsa_poly *z, const mldsa_poly *h, const MLDSA_param_info_t *p) |
| Pack signature (c_tilde || z || h). | |
| int | MLDSA_PACK_unpack_sig (uint8_t *ctilde, mldsa_poly *z, mldsa_poly *h, const uint8_t *sig, const MLDSA_param_info_t *p) |
| Unpack signature. | |
| void MLDSA_PACK_pk | ( | uint8_t * | pk, |
| const uint8_t | rho[MLDSA_SEEDBYTES], | ||
| const mldsa_poly * | t1, | ||
| const MLDSA_param_info_t * | p | ||
| ) |
Pack the public key (rho || t1).
| [out] | pk | Output byte array. |
| [in] | rho | Seed of MLDSA_SEEDBYTES bytes. |
| [in] | t1 | Array of k polynomials. |
| [in] | p | Parameter info. |
Definition at line 321 of file cx_mldsa_packing.c.
| uint32_t MLDSA_PACK_polyeta | ( | uint8_t * | r, |
| const mldsa_poly * | a, | ||
| uint8_t | eta | ||
| ) |
Bit-pack polynomial with coefficients in [-eta, eta].
| [out] | r | Output byte array. |
| [in] | a | Input polynomial. |
| [in] | eta | Range parameter (2 or 4). |
Definition at line 140 of file cx_mldsa_packing.c.
| void MLDSA_PACK_polyt0 | ( | uint8_t | r[MLDSA_POLYT0_PACKEDBYTES], |
| const mldsa_poly * | a | ||
| ) |
Bit-pack polynomial with coefficients a0 from power2round. Coefficients in (-(2^{D-1}-1), 2^{D-1}], using 13 bits.
| [out] | r | Output byte array (MLDSA_POLYT0_PACKEDBYTES bytes). |
| [in] | a | Input polynomial. |
Definition at line 58 of file cx_mldsa_packing.c.
| void MLDSA_PACK_polyt1 | ( | uint8_t | r[MLDSA_POLYT1_PACKEDBYTES], |
| const mldsa_poly * | a | ||
| ) |
Bit-pack polynomial with coefficients a1 from power2round (10-bit values). Each coefficient uses 10 bits.
| [out] | r | Output byte array (MLDSA_POLYT1_PACKEDBYTES bytes). |
| [in] | a | Input polynomial. |
Definition at line 27 of file cx_mldsa_packing.c.
| uint32_t MLDSA_PACK_polyw1 | ( | uint8_t * | r, |
| const mldsa_poly * | a, | ||
| int32_t | gamma2 | ||
| ) |
Bit-pack polynomial w1 with coefficients fitting in ceil(log2((q-1)/(2*gamma2))) bits.
| [out] | r | Output byte array. |
| [in] | a | Input polynomial. |
| [in] | gamma2 | Low-order rounding range. |
Definition at line 296 of file cx_mldsa_packing.c.
| uint32_t MLDSA_PACK_polyz | ( | uint8_t * | r, |
| const mldsa_poly * | a, | ||
| int32_t | gamma1 | ||
| ) |
Bit-pack polynomial z with coefficients in [-(gamma1-1), gamma1].
| [out] | r | Output byte array. |
| [in] | a | Input polynomial. |
| [in] | gamma1 | Coefficient range. |
Definition at line 207 of file cx_mldsa_packing.c.
| void MLDSA_PACK_sig | ( | uint8_t * | sig, |
| const uint8_t * | ctilde, | ||
| const mldsa_poly * | z, | ||
| const mldsa_poly * | h, | ||
| const MLDSA_param_info_t * | p | ||
| ) |
Pack signature (c_tilde || z || h).
| [out] | sig | Signature output. |
| [in] | ctilde | Challenge hash. |
| [in] | z | Array of l polynomials. |
| [in] | h | Array of k polynomials (hint). |
| [in] | p | Parameter info. |
Definition at line 418 of file cx_mldsa_packing.c.
| void MLDSA_PACK_sk | ( | uint8_t * | sk, |
| const uint8_t | rho[MLDSA_SEEDBYTES], | ||
| const uint8_t | K[MLDSA_SEEDBYTES], | ||
| const uint8_t | tr[MLDSA_TRBYTES], | ||
| const mldsa_poly * | s1, | ||
| const mldsa_poly * | s2, | ||
| const mldsa_poly * | t0, | ||
| const MLDSA_param_info_t * | p | ||
| ) |
Pack the secret key (rho || K || tr || s1 || s2 || t0).
| [out] | sk | Output byte array. |
| [in] | rho | Seed of MLDSA_SEEDBYTES bytes. |
| [in] | K | Key seed of MLDSA_SEEDBYTES bytes. |
| [in] | tr | Hash of MLDSA_TRBYTES bytes. |
| [in] | s1 | Array of l polynomials. |
| [in] | s2 | Array of k polynomials. |
| [in] | t0 | Array of k polynomials. |
| [in] | p | Parameter info. |
Definition at line 343 of file cx_mldsa_packing.c.
| void MLDSA_PACK_unpack_pk | ( | uint8_t | rho[MLDSA_SEEDBYTES], |
| mldsa_poly * | t1, | ||
| const uint8_t * | pk, | ||
| const MLDSA_param_info_t * | p | ||
| ) |
Unpack the public key.
| [out] | rho | Seed output. |
| [out] | t1 | Array of k polynomials output. |
| [in] | pk | Packed public key. |
| [in] | p | Parameter info. |
Definition at line 332 of file cx_mldsa_packing.c.
| uint32_t MLDSA_PACK_unpack_polyeta | ( | mldsa_poly * | r, |
| const uint8_t * | a, | ||
| uint8_t | eta | ||
| ) |
Unpack polynomial with coefficients in [-eta, eta].
| [out] | r | Output polynomial. |
| [in] | a | Input byte array. |
| [in] | eta | Range parameter (2 or 4). |
Definition at line 167 of file cx_mldsa_packing.c.
| void MLDSA_PACK_unpack_polyt0 | ( | mldsa_poly * | r, |
| const uint8_t | a[MLDSA_POLYT0_PACKEDBYTES] | ||
| ) |
Unpack polynomial t0 from bytes.
| [out] | r | Output polynomial. |
| [in] | a | Input byte array. |
Definition at line 94 of file cx_mldsa_packing.c.
| void MLDSA_PACK_unpack_polyt1 | ( | mldsa_poly * | r, |
| const uint8_t | a[MLDSA_POLYT1_PACKEDBYTES] | ||
| ) |
Unpack polynomial t1 from bytes.
| [out] | r | Output polynomial. |
| [in] | a | Input byte array. |
Definition at line 41 of file cx_mldsa_packing.c.
| uint32_t MLDSA_PACK_unpack_polyz | ( | mldsa_poly * | r, |
| const uint8_t * | a, | ||
| int32_t | gamma1 | ||
| ) |
Unpack polynomial z.
| [out] | r | Output polynomial. |
| [in] | a | Input byte array. |
| [in] | gamma1 | Coefficient range. |
Definition at line 247 of file cx_mldsa_packing.c.
| int MLDSA_PACK_unpack_sig | ( | uint8_t * | ctilde, |
| mldsa_poly * | z, | ||
| mldsa_poly * | h, | ||
| const uint8_t * | sig, | ||
| const MLDSA_param_info_t * | p | ||
| ) |
Unpack signature.
| [out] | ctilde | Challenge hash output. |
| [out] | z | Array of l polynomials output. |
| [out] | h | Array of k polynomials (hint) output. |
| [in] | sig | Packed signature. |
| [in] | p | Parameter info. |
Definition at line 451 of file cx_mldsa_packing.c.
| void MLDSA_PACK_unpack_sk | ( | uint8_t | rho[MLDSA_SEEDBYTES], |
| uint8_t | K[MLDSA_SEEDBYTES], | ||
| uint8_t | tr[MLDSA_TRBYTES], | ||
| mldsa_poly * | s1, | ||
| mldsa_poly * | s2, | ||
| mldsa_poly * | t0, | ||
| const uint8_t * | sk, | ||
| const MLDSA_param_info_t * | p | ||
| ) |
Unpack the secret key.
| [out] | rho | Seed output. |
| [out] | K | Key seed output. |
| [out] | tr | Hash output. |
| [out] | s1 | Array of l polynomials output. |
| [out] | s2 | Array of k polynomials output. |
| [out] | t0 | Array of k polynomials output. |
| [in] | sk | Packed secret key. |
| [in] | p | Parameter info. |
Definition at line 379 of file cx_mldsa_packing.c.