struct OQS_SIG

Signature schemes object



Includes


#include <sig.h>

Members

const char * method_name
const char * alg_version
uint8_t claimed_nist_level
bool euf_cma
bool sig_with_ctx_support
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(* sign_with_ctx_str)(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_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)
OQS_STATUS(* verify_with_ctx_str)(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key)

method_name

const char * method_name

Printable string representing the name of the signature scheme.


alg_version

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

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


euf_cma

bool euf_cma

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


sig_with_ctx_support

bool sig_with_ctx_support

Whether the signature supports signing with a context string (TRUE) or not (FALSE).


length_public_key

size_t length_public_key

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


length_secret_key

size_t length_secret_key

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


length_signature

size_t length_signature

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


keypair

OQS_STATUS(* 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

public_key

The public key represented as a byte string.

secret_key

The secret key represented as a byte string.

Returns

OQS_SUCCESS or OQS_ERROR


sign

OQS_STATUS(* 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

signature

The signature on the message represented as a byte string.

signature_len

The actual length of the signature. May be smaller than length_signature for some algorithms since some algorithms have variable length signatures.

message

The message to sign represented as a byte string.

message_len

The length of the message to sign.

secret_key

The secret key represented as a byte string.

Returns

OQS_SUCCESS or OQS_ERROR


sign_with_ctx_str

OQS_STATUS(* sign_with_ctx_str)(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key)

Signature generation algorithm, with custom context string.

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

signature

The signature on the message represented as a byte string.

signature_len

The actual length of the signature. May be smaller than length_signature for some algorithms since some algorithms have variable length signatures.

message

The message to sign represented as a byte string.

message_len

The length of the message to sign.

ctx_str

The context string used for the signature. This value can be set to NULL if a context string is not needed (i.e., for algorithms that do not support context strings or if an empty context string is used).

ctx_str_len

The context string used for the signature. This value can be set to 0 if a context string is not needed (i.e., for algorithms that do not support context strings or if an empty context string is used).

secret_key

The secret key represented as a byte string.

Returns

OQS_SUCCESS or OQS_ERROR


verify

OQS_STATUS(* 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

message

The message represented as a byte string.

message_len

The length of the message.

signature

The signature on the message represented as a byte string.

signature_len

The length of the signature.

public_key

The public key represented as a byte string.

Returns

OQS_SUCCESS or OQS_ERROR


verify_with_ctx_str

OQS_STATUS(* verify_with_ctx_str)(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key)

Signature verification algorithm, with custom context string.

Parameters

message

The message represented as a byte string.

message_len

The length of the message.

signature

The signature on the message represented as a byte string.

signature_len

The length of the signature.

ctx_str

The context string for the signature. This value can be set to NULL if a context string is not needed (i.e., for algorithms that do not support context strings or if an empty context string is used).

ctx_str_len

The length of the context string. This value can be set to 0 if a context string is not needed (i.e., for algorithms that do not support context strings or if an empty context string is used).

public_key

The public key represented as a byte string.

Returns

OQS_SUCCESS or OQS_ERROR



Copyright © Open Quantum Safe a Series of LF Projects, LLC.
For website terms of use, trademark policy, and other project policies, please see https://lfprojects.org.
This site uses Just the Docs, a documentation theme for Jekyll. Background image by Rick Doble.