Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Functions
cx_mlkem_indcpa.h File Reference
#include <stdint.h>
#include "cx_errors.h"
#include "lcx_mlkem.h"
Include dependency graph for cx_mlkem_indcpa.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

cx_err_t MLKEM_INDCPA_keypair_derand (uint8_t *pk, size_t pk_len, uint8_t *sk, size_t sk_len, const uint8_t *coins, const MLKEM_param_info_t *p)
 Generates an IND-CPA key pair deterministically.
 
cx_err_t MLKEM_INDCPA_enc (uint8_t *c, size_t c_len, const uint8_t *m, size_t m_len, const uint8_t *pk, size_t pk_len, const uint8_t coins[2 *MLKEM_SYMBYTES], const MLKEM_param_info_t *p)
 
cx_err_t MLKEM_INDCPA_dec (uint8_t *m, size_t m_len, const uint8_t *c, size_t c_len, const uint8_t *sk, size_t sk_len, const MLKEM_param_info_t *p)
 

Function Documentation

◆ MLKEM_INDCPA_dec()

cx_err_t MLKEM_INDCPA_dec ( uint8_t *  m,
size_t  m_len,
const uint8_t *  c,
size_t  c_len,
const uint8_t *  sk,
size_t  sk_len,
const MLKEM_param_info_t p 
)

Definition at line 179 of file cx_mlkem_indcpa.c.

◆ MLKEM_INDCPA_enc()

cx_err_t MLKEM_INDCPA_enc ( uint8_t *  c,
size_t  c_len,
const uint8_t *  m,
size_t  m_len,
const uint8_t *  pk,
size_t  pk_len,
const uint8_t  coins[2 *MLKEM_SYMBYTES],
const MLKEM_param_info_t p 
)

Definition at line 99 of file cx_mlkem_indcpa.c.

◆ MLKEM_INDCPA_keypair_derand()

cx_err_t MLKEM_INDCPA_keypair_derand ( uint8_t *  pk,
size_t  pk_len,
uint8_t *  sk,
size_t  sk_len,
const uint8_t *  coins,
const MLKEM_param_info_t p 
)

Generates an IND-CPA key pair deterministically.

Parameters
[out]pkPublic key output buffer.
[in]pk_lenSize of the public key buffer in bytes.
[out]skSecret key output buffer.
[in]sk_lenSize of the secret key buffer in bytes.
[in]coinsRandom coins of 2 * MLKEM_SYMBYTES bytes.
[in]pPointer to the ML-KEM parameter set.
Returns
CX_OK on success, error code otherwise.