liboqs
|
#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) |
Key encapsulation mechanism object
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.
uint8_t OQS_KEM::claimed_nist_level |
The NIST security level (1, 2, 3, 4, 5) claimed in this algorithm's original NIST submission.
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_*
.
[out] | shared_secret | The shared secret represented as a byte string. |
[in] | ciphertext | The ciphertext (encapsulation) represented as a byte string. |
[in] | secret_key | The secret key represented as a byte string. |
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_*
.
[out] | ciphertext | The ciphertext (encapsulation) represented as a byte string. |
[out] | shared_secret | The shared secret represented as a byte string. |
[in] | public_key | The public key represented as a byte string. |
bool OQS_KEM::ind_cca |
Whether the KEM offers IND-CCA security (TRUE) or IND-CPA security (FALSE).
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_*
.
[out] | public_key | The public key represented as a byte string. |
[out] | secret_key | The secret key represented as a byte string. |
size_t OQS_KEM::length_ciphertext |
The length, in bytes, of ciphertexts for this KEM.
size_t OQS_KEM::length_public_key |
The length, in bytes, of public keys for this KEM.
size_t OQS_KEM::length_secret_key |
The length, in bytes, of secret keys for this KEM.
size_t OQS_KEM::length_shared_secret |
The length, in bytes, of shared secrets for this KEM.
const char* OQS_KEM::method_name |
Printable string representing the name of the key encapsulation mechanism.