Internal structure of the NoiseSignState type. More...
#include <internal.h>
Data Fields | |
int(* | derive_public_key )(const NoiseSignState *state, const uint8_t *private_key, uint8_t *public_key) |
Derives a public key from a private key. More... | |
void(* | destroy )(NoiseSignState *state) |
Destroys this SignState prior to the memory being freed. More... | |
void(* | generate_keypair )(NoiseSignState *state) |
Generates a new key pair for this digital signature algorithm. More... | |
uint16_t | key_type |
The type of key stored within this SignState object. More... | |
uint8_t * | private_key |
Points to the private key in the subclass state. More... | |
uint16_t | private_key_len |
Length of the private key for this algorithm in bytes. More... | |
uint8_t * | public_key |
Points to the public key in the subclass state. More... | |
uint16_t | public_key_len |
Length of the public key for this algorithm in bytes. More... | |
int(* | sign )(const NoiseSignState *state, const uint8_t *message, size_t message_len, uint8_t *signature) |
Creates a signature. More... | |
int | sign_id |
Algorithm identifier for the digital signature operation. More... | |
uint16_t | signature_len |
Length of the signature for this algorithm in bytes. More... | |
size_t | size |
Total size of the structure including subclass state. More... | |
int(* | validate_keypair )(const NoiseSignState *state, const uint8_t *private_key, const uint8_t *public_key) |
Validates a keypair. More... | |
int(* | validate_public_key )(const NoiseSignState *state, const uint8_t *public_key) |
Validates a public key. More... | |
int(* | verify )(const NoiseSignState *state, const uint8_t *message, size_t message_len, const uint8_t *signature) |
Verifies a digital signature on a message. More... | |
Internal structure of the NoiseSignState type.
Definition at line 362 of file internal.h.
int(* NoiseSignState_s::derive_public_key)(const NoiseSignState *state, const uint8_t *private_key, uint8_t *public_key) |
Derives a public key from a private key.
state | Points to the SignState. |
private_key | Points to the private key for the keypair. |
public_key | Points to the public key for the keypair. |
Definition at line 426 of file internal.h.
void(* NoiseSignState_s::destroy)(NoiseSignState *state) |
Destroys this SignState prior to the memory being freed.
state | Points to the SignState. |
This function is called just before the memory for the SignState is deallocated. It gives the back end an opportunity to clean up linked objects.
This pointer can be NULL if the back end does not need any special clean up logic.
Definition at line 494 of file internal.h.
void(* NoiseSignState_s::generate_keypair)(NoiseSignState *state) |
Generates a new key pair for this digital signature algorithm.
state | Points to the SignState. |
Definition at line 393 of file internal.h.
uint16_t NoiseSignState_s::key_type |
The type of key stored within this SignState object.
Definition at line 371 of file internal.h.
uint8_t* NoiseSignState_s::private_key |
Points to the private key in the subclass state.
Definition at line 383 of file internal.h.
uint16_t NoiseSignState_s::private_key_len |
Length of the private key for this algorithm in bytes.
Definition at line 374 of file internal.h.
uint8_t* NoiseSignState_s::public_key |
Points to the public key in the subclass state.
Definition at line 386 of file internal.h.
uint16_t NoiseSignState_s::public_key_len |
Length of the public key for this algorithm in bytes.
Definition at line 377 of file internal.h.
int(* NoiseSignState_s::sign)(const NoiseSignState *state, const uint8_t *message, size_t message_len, uint8_t *signature) |
Creates a signature.
state | Points to the SignState. |
message | Points to the message to be signed. |
message_len | The length of the message to be signed. |
signature | Points to the signature on exit. |
This function must always operate in the same amount of time, even if the private or public key is invalid.
Definition at line 460 of file internal.h.
int NoiseSignState_s::sign_id |
Algorithm identifier for the digital signature operation.
Definition at line 368 of file internal.h.
uint16_t NoiseSignState_s::signature_len |
Length of the signature for this algorithm in bytes.
Definition at line 380 of file internal.h.
size_t NoiseSignState_s::size |
Total size of the structure including subclass state.
Definition at line 365 of file internal.h.
int(* NoiseSignState_s::validate_keypair)(const NoiseSignState *state, const uint8_t *private_key, const uint8_t *public_key) |
Validates a keypair.
state | Points to the SignState. |
private_key | Points to the private key for the keypair. |
public_key | Points to the public key for the keypair. |
Definition at line 409 of file internal.h.
int(* NoiseSignState_s::validate_public_key)(const NoiseSignState *state, const uint8_t *public_key) |
Validates a public key.
state | Points to the SignState. |
public_key | Points to the public key. |
Definition at line 440 of file internal.h.
int(* NoiseSignState_s::verify)(const NoiseSignState *state, const uint8_t *message, size_t message_len, const uint8_t *signature) |
Verifies a digital signature on a message.
state | Points to the SignState. |
message | Points to the message whose signature should be verified, which is usually a short hash value. |
message_len | The length of the message to be verified. |
signature | Points to the signature to be verified. |
Definition at line 479 of file internal.h.