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) |
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 |
| 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 |
| 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