Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
cx_mlkem_polymat.h
Go to the documentation of this file.
1/*****************************************************************************
2 * (c) 2026 Ledger SAS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16#ifndef MLKEM_POLYMAT_H
17#define MLKEM_POLYMAT_H
18
19#include "lcx_mlkem.h"
20#include "cx_mlkem_polyvec.h"
21
25typedef struct {
27} polymat;
28
37void MLKEM_POLYMAT_gen_matrix(polymat *a, const uint8_t *seed, int32_t transposed, uint8_t k);
39 const uint8_t *seed,
40 int32_t transposed,
41 uint8_t i,
42 uint8_t k);
43
44#endif // MLKEM_POLYMAT_H
void MLKEM_POLYMAT_gen_matrix(polymat *a, const uint8_t *seed, int32_t transposed, uint8_t k)
Generates a matrix of polynomials from a seed using rejection sampling.
void MLKEM_POLYMAT_gen_matrix_row(polyvec *row, const uint8_t *seed, int32_t transposed, uint8_t i, uint8_t k)
ML-KEM (Module-Lattice Key Encapsulation Mechanism) public API.
#define MLKEM_MAX_K
Definition lcx_mlkem.h:154
Matrix of polynomial vectors with up to MLKEM_MAX_K rows.
Vector of polynomials with up to MLKEM_MAX_K elements.