Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
cx_mlkem_internal.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 *****************************************************************************/
24#ifndef CX_MLKEM_INTERNAL_H
25#define CX_MLKEM_INTERNAL_H
26
27#include <stdint.h>
28#include "cx_errors.h"
29#include "lcx_mlkem.h"
30
45cx_err_t MLKEM_crypto_kem_keypair_derand(uint8_t *pk,
46 size_t pk_len,
47 uint8_t *sk,
48 size_t sk_len,
49 const uint8_t coins[2 * MLKEM_SYMBYTES],
50 MLKEM_param_t param);
51
69cx_err_t MLKEM_crypto_kem_enc_derand(uint8_t *ct,
70 size_t ct_len,
71 uint8_t *ss,
72 size_t ss_len,
73 const uint8_t *pk,
74 size_t pk_len,
75 const uint8_t coins[2 * MLKEM_SYMBYTES],
76 MLKEM_param_t param);
77
78#endif // CX_MLKEM_INTERNAL_H
cx_err_t MLKEM_crypto_kem_enc_derand(uint8_t *ct, size_t ct_len, uint8_t *ss, size_t ss_len, const uint8_t *pk, size_t pk_len, const uint8_t coins[2 *MLKEM_SYMBYTES], MLKEM_param_t param)
Deterministic ML-KEM encapsulation.
cx_err_t MLKEM_crypto_kem_keypair_derand(uint8_t *pk, size_t pk_len, uint8_t *sk, size_t sk_len, const uint8_t coins[2 *MLKEM_SYMBYTES], MLKEM_param_t param)
Deterministic ML-KEM key pair generation.
#define MLKEM_SYMBYTES
Definition lcx_mlkem.h:38
ML-KEM (Module-Lattice Key Encapsulation Mechanism) public API.
enum MLKEM_param_e MLKEM_param_t
ML-KEM parameter set selector.