Source code
Revision control
Copy as Markdown
Other Tools
/*
* SPDX-FileCopyrightText: 2024 Cryspen Sarl <info@cryspen.com>
*
* SPDX-License-Identifier: MIT or Apache-2.0
*
* This code was generated with the following revisions:
* Charon: b351338f6a84c7a1afc27433eb0ffdc668b3581d
* Eurydice: 7efec1624422fd5e94388ef06b9c76dfe7a48d46
* Karamel: c96fb69d15693284644d6aecaa90afa37e4de8f0
* F*: 58c915a86a2c07c8eca8d9deafd76cb7a91f0eb7
* Libcrux: 6ff01fb3c57ff29ecb59bc62d9dc7fd231060cfb
*/
#ifndef __libcrux_mlkem768_H
#define __libcrux_mlkem768_H
#if defined(__cplusplus)
extern "C" {
#endif
#include "eurydice_glue.h"
#include "libcrux_core.h"
#define LIBCRUX_ML_KEM_MLKEM768_VECTOR_U_COMPRESSION_FACTOR_768 ((size_t)10U)
#define LIBCRUX_ML_KEM_MLKEM768_C1_BLOCK_SIZE_768 \
(LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT * \
LIBCRUX_ML_KEM_MLKEM768_VECTOR_U_COMPRESSION_FACTOR_768 / (size_t)8U)
#define LIBCRUX_ML_KEM_MLKEM768_RANK_768 ((size_t)3U)
#define LIBCRUX_ML_KEM_MLKEM768_C1_SIZE_768 \
(LIBCRUX_ML_KEM_MLKEM768_C1_BLOCK_SIZE_768 * LIBCRUX_ML_KEM_MLKEM768_RANK_768)
#define LIBCRUX_ML_KEM_MLKEM768_VECTOR_V_COMPRESSION_FACTOR_768 ((size_t)4U)
#define LIBCRUX_ML_KEM_MLKEM768_C2_SIZE_768 \
(LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT * \
LIBCRUX_ML_KEM_MLKEM768_VECTOR_V_COMPRESSION_FACTOR_768 / (size_t)8U)
#define LIBCRUX_ML_KEM_MLKEM768_CPA_PKE_CIPHERTEXT_SIZE_768 \
(LIBCRUX_ML_KEM_MLKEM768_C1_SIZE_768 + LIBCRUX_ML_KEM_MLKEM768_C2_SIZE_768)
#define LIBCRUX_ML_KEM_MLKEM768_T_AS_NTT_ENCODED_SIZE_768 \
(LIBCRUX_ML_KEM_MLKEM768_RANK_768 * \
LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT * \
LIBCRUX_ML_KEM_CONSTANTS_BITS_PER_COEFFICIENT / (size_t)8U)
#define LIBCRUX_ML_KEM_MLKEM768_CPA_PKE_PUBLIC_KEY_SIZE_768 \
(LIBCRUX_ML_KEM_MLKEM768_T_AS_NTT_ENCODED_SIZE_768 + (size_t)32U)
#define LIBCRUX_ML_KEM_MLKEM768_CPA_PKE_SECRET_KEY_SIZE_768 \
(LIBCRUX_ML_KEM_MLKEM768_RANK_768 * \
LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT * \
LIBCRUX_ML_KEM_CONSTANTS_BITS_PER_COEFFICIENT / (size_t)8U)
#define LIBCRUX_ML_KEM_MLKEM768_ETA1 ((size_t)2U)
#define LIBCRUX_ML_KEM_MLKEM768_ETA1_RANDOMNESS_SIZE \
(LIBCRUX_ML_KEM_MLKEM768_ETA1 * (size_t)64U)
#define LIBCRUX_ML_KEM_MLKEM768_ETA2 ((size_t)2U)
#define LIBCRUX_ML_KEM_MLKEM768_ETA2_RANDOMNESS_SIZE \
(LIBCRUX_ML_KEM_MLKEM768_ETA2 * (size_t)64U)
#define LIBCRUX_ML_KEM_MLKEM768_IMPLICIT_REJECTION_HASH_INPUT_SIZE \
(LIBCRUX_ML_KEM_CONSTANTS_SHARED_SECRET_SIZE + \
LIBCRUX_ML_KEM_MLKEM768_CPA_PKE_CIPHERTEXT_SIZE_768)
typedef libcrux_ml_kem_types_MlKemPrivateKey_55
libcrux_ml_kem_mlkem768_MlKem768PrivateKey;
typedef libcrux_ml_kem_types_MlKemPublicKey_15
libcrux_ml_kem_mlkem768_MlKem768PublicKey;
#define LIBCRUX_ML_KEM_MLKEM768_RANKED_BYTES_PER_RING_ELEMENT_768 \
(LIBCRUX_ML_KEM_MLKEM768_RANK_768 * \
LIBCRUX_ML_KEM_CONSTANTS_BITS_PER_RING_ELEMENT / (size_t)8U)
#define LIBCRUX_ML_KEM_MLKEM768_SECRET_KEY_SIZE_768 \
(LIBCRUX_ML_KEM_MLKEM768_CPA_PKE_SECRET_KEY_SIZE_768 + \
LIBCRUX_ML_KEM_MLKEM768_CPA_PKE_PUBLIC_KEY_SIZE_768 + \
LIBCRUX_ML_KEM_CONSTANTS_H_DIGEST_SIZE + \
LIBCRUX_ML_KEM_CONSTANTS_SHARED_SECRET_SIZE)
#if defined(__cplusplus)
}
#endif
#define __libcrux_mlkem768_H_DEFINED
#endif