Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Functions
cx_mldsa_polymat.h File Reference
#include "cx_mldsa_polyvec.h"
#include "lcx_mldsa.h"
Include dependency graph for cx_mldsa_polymat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void MLDSA_POLYMAT_expand (mldsa_polyvecl *mat, const uint8_t rho[MLDSA_SEEDBYTES], const MLDSA_param_info_t *p)
 Expand the k x l matrix A from a seed rho using SHAKE128. Each polynomial A[i][j] is stored as mat[i].vec[j].
 
void MLDSA_POLYMAT_pointwise_montgomery (mldsa_polyveck *t, const mldsa_polyvecl *mat, const mldsa_polyvecl *s, const MLDSA_param_info_t *p)
 Matrix-vector multiply: t = A * s (in NTT domain). Both A and s must already be in NTT domain. t is computed and left in NTT domain.
 
void MLDSA_POLYMAT_expand_and_multiply (mldsa_polyveck *t, const uint8_t rho[MLDSA_SEEDBYTES], const mldsa_polyvecl *s, const MLDSA_param_info_t *p)
 On-the-fly A expansion with matrix-vector multiply.
 

Function Documentation

◆ MLDSA_POLYMAT_expand()

void MLDSA_POLYMAT_expand ( mldsa_polyvecl mat,
const uint8_t  rho[MLDSA_SEEDBYTES],
const MLDSA_param_info_t p 
)

Expand the k x l matrix A from a seed rho using SHAKE128. Each polynomial A[i][j] is stored as mat[i].vec[j].

Parameters
[out]matArray of k polyvecl rows.
[in]rhoSeed of MLDSA_SEEDBYTES bytes.
[in]pParameter info.

Definition at line 24 of file cx_mldsa_polymat.c.

◆ MLDSA_POLYMAT_expand_and_multiply()

void MLDSA_POLYMAT_expand_and_multiply ( mldsa_polyveck t,
const uint8_t  rho[MLDSA_SEEDBYTES],
const mldsa_polyvecl s,
const MLDSA_param_info_t p 
)

On-the-fly A expansion with matrix-vector multiply.

     Expands A one element at a time and accumulates A*s
     without ever storing the full matrix.  Only a single
     polynomial is kept on the callee stack.
Parameters
[out]tOutput K-vector (NTT domain).
[in]rhoSeed of MLDSA_SEEDBYTES bytes.
[in]sInput L-vector (must be in NTT domain).
[in]pParameter info.

Definition at line 46 of file cx_mldsa_polymat.c.

◆ MLDSA_POLYMAT_pointwise_montgomery()

void MLDSA_POLYMAT_pointwise_montgomery ( mldsa_polyveck t,
const mldsa_polyvecl mat,
const mldsa_polyvecl s,
const MLDSA_param_info_t p 
)

Matrix-vector multiply: t = A * s (in NTT domain). Both A and s must already be in NTT domain. t is computed and left in NTT domain.

Parameters
[out]tOutput K-vector (NTT domain).
[in]matMatrix as array of k polyvecl rows (NTT domain).
[in]sInput L-vector (NTT domain).
[in]pParameter info.

Definition at line 36 of file cx_mldsa_polymat.c.