|
Embedded SDK
Embedded SDK
|
Internal ML-KEM deterministic routines (not part of the public API). More...
#include <string.h>#include "cx_mlkem_internal.h"#include "cx_mlkem_indcpa.h"#include "cx_mlkem_util.h"#include "cx_utils.h"
Go to the source code of this file.
Functions | |
| 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. | |
| 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. | |
Internal ML-KEM deterministic routines (not part of the public API).
Contains the derandomized key-generation and encapsulation functions that are used internally and exposed only for testing.
Definition in file cx_mlkem_internal.c.
| 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.
Produces a ciphertext and a shared secret from a public key using caller-supplied random coins.
| [out] | ct | Ciphertext output buffer. |
| [in] | ct_len | Size of the ciphertext buffer in bytes. |
| [out] | ss | Shared secret output buffer. |
| [in] | ss_len | Size of the shared secret buffer in bytes. |
| [in] | pk | Public key. |
| [in] | pk_len | Size of the public key in bytes. |
| [in] | coins | Random coins of 2 * MLKEM_SYMBYTES bytes. |
| [in] | param | ML-KEM parameter set selector. |
Definition at line 77 of file cx_mlkem_internal.c.
| 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.
Generates a key pair from caller-supplied random coins.
| [out] | pk | Public key output buffer. |
| [in] | pk_len | Size of the public key buffer in bytes. |
| [out] | sk | Secret key output buffer. |
| [in] | sk_len | Size of the secret key buffer in bytes. |
| [in] | coins | Random coins of 2 * MLKEM_SYMBYTES bytes. |
| [in] | param | ML-KEM parameter set selector. |
Definition at line 31 of file cx_mlkem_internal.c.