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

#include <sig.h>

Data Fields

const char * method_name
 
const char * alg_version
 
uint8_t claimed_nist_level
 
bool euf_cma
 
size_t length_public_key
 
size_t length_secret_key
 
size_t length_signature
 
OQS_STATUS(* keypair )(uint8_t *public_key, uint8_t *secret_key)
 
OQS_STATUS(* sign )(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *secret_key)
 
OQS_STATUS(* verify )(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key)
 

Detailed Description

Signature schemes object

Field Documentation

◆ alg_version

const char* OQS_SIG::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_SIG::claimed_nist_level

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

◆ euf_cma

bool OQS_SIG::euf_cma

Whether the signature offers EUF-CMA security (TRUE) or not (FALSE).

◆ keypair

OQS_STATUS(* OQS_SIG::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_SIG_*_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_public_key

size_t OQS_SIG::length_public_key

The length, in bytes, of public keys for this signature scheme.

◆ length_secret_key

size_t OQS_SIG::length_secret_key

The length, in bytes, of secret keys for this signature scheme.

◆ length_signature

size_t OQS_SIG::length_signature

The (maximum) length, in bytes, of signatures for this signature scheme.

◆ method_name

const char* OQS_SIG::method_name

Printable string representing the name of the signature scheme.

◆ sign

OQS_STATUS(* OQS_SIG::sign) (uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *secret_key)

Signature generation algorithm.

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

Parameters
[out]signatureThe signature on the message represented as a byte string.
[out]signature_lenThe actual length of the signature. May be smaller than length_signature for some algorithms since some algorithms have variable length signatures.
[in]messageThe message to sign represented as a byte string.
[in]message_lenThe length of the message to sign.
[in]secret_keyThe secret key represented as a byte string.
Returns
OQS_SUCCESS or OQS_ERROR

◆ verify

OQS_STATUS(* OQS_SIG::verify) (const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key)

Signature verification algorithm.

Parameters
[in]messageThe message represented as a byte string.
[in]message_lenThe length of the message.
[in]signatureThe signature on the message represented as a byte string.
[in]signature_lenThe length of the signature.
[in]public_keyThe public key represented as a byte string.
Returns
OQS_SUCCESS or OQS_ERROR

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