liboqs
Loading...
Searching...
No Matches
OQS_KEM Struct Reference

#include <kem.h>

Data Fields

const char * method_name
 
const char * alg_version
 
uint8_t claimed_nist_level
 
bool ind_cca
 
size_t length_public_key
 
size_t length_secret_key
 
size_t length_ciphertext
 
size_t length_shared_secret
 
OQS_STATUS(* keypair )(uint8_t *public_key, uint8_t *secret_key)
 
OQS_STATUS(* encaps )(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key)
 
OQS_STATUS(* decaps )(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key)
 

Detailed Description

Key encapsulation mechanism object

Field Documentation

◆ alg_version

const char* OQS_KEM::alg_version

Printable string representing the version of the cryptographic algorithm.

Implementations with the same method_name and same alg_version will be interoperable. See README.md for information about algorithm compatibility.

◆ claimed_nist_level

uint8_t OQS_KEM::claimed_nist_level

The NIST security level (1, 2, 3, 4, 5) claimed in this algorithm's original NIST submission.

◆ decaps

OQS_STATUS(* OQS_KEM::decaps) (uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key)

Decapsulation algorithm.

Caller is responsible for allocating sufficient memory for shared_secret, based on the length_* members in this object or the per-scheme compile-time macros OQS_KEM_*_length_*.

Parameters
[out]shared_secretThe shared secret represented as a byte string.
[in]ciphertextThe ciphertext (encapsulation) represented as a byte string.
[in]secret_keyThe secret key represented as a byte string.
Returns
OQS_SUCCESS or OQS_ERROR

◆ encaps

OQS_STATUS(* OQS_KEM::encaps) (uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key)

Encapsulation algorithm.

Caller is responsible for allocating sufficient memory for ciphertext and shared_secret, based on the length_* members in this object or the per-scheme compile-time macros OQS_KEM_*_length_*.

Parameters
[out]ciphertextThe ciphertext (encapsulation) represented as a byte string.
[out]shared_secretThe shared secret represented as a byte string.
[in]public_keyThe public key represented as a byte string.
Returns
OQS_SUCCESS or OQS_ERROR

◆ ind_cca

bool OQS_KEM::ind_cca

Whether the KEM offers IND-CCA security (TRUE) or IND-CPA security (FALSE).

◆ keypair

OQS_STATUS(* OQS_KEM::keypair) (uint8_t *public_key, uint8_t *secret_key)

Keypair generation algorithm.

Caller is responsible for allocating sufficient memory for public_key and secret_key, based on the length_* members in this object or the per-scheme compile-time macros OQS_KEM_*_length_*.

Parameters
[out]public_keyThe public key represented as a byte string.
[out]secret_keyThe secret key represented as a byte string.
Returns
OQS_SUCCESS or OQS_ERROR

◆ length_ciphertext

size_t OQS_KEM::length_ciphertext

The length, in bytes, of ciphertexts for this KEM.

◆ length_public_key

size_t OQS_KEM::length_public_key

The length, in bytes, of public keys for this KEM.

◆ length_secret_key

size_t OQS_KEM::length_secret_key

The length, in bytes, of secret keys for this KEM.

◆ length_shared_secret

size_t OQS_KEM::length_shared_secret

The length, in bytes, of shared secrets for this KEM.

◆ method_name

const char* OQS_KEM::method_name

Printable string representing the name of the key encapsulation mechanism.


The documentation for this struct was generated from the following file: