16 #ifndef XMSS_SIGNING_H_INCLUDED
18 #define XMSS_SIGNING_H_INCLUDED
334 uint8_t cache_level, uint32_t generation_partitions);
426 uint32_t signature_count);
struct XmssSigningContext XmssSigningContext
The context of an instantiation of the signing library.
Definition: opaque_structures.h:37
struct XmssKeyGenerationContext XmssKeyGenerationContext
The temporary context to gather all the results of generating a public key.
Definition: opaque_structures.h:181
struct XmssInternalCache XmssInternalCache
In-memory representation of a loaded cache.
Definition: opaque_structures.h:67
struct XmssKeyContext XmssKeyContext
Context for using the signature generation part of the library, with a loaded private key partition.
Definition: opaque_structures.h:123
XmssError xmss_verify_private_key_stateful(const XmssPrivateKeyStatefulBlob *key_usage, const XmssPrivateKeyStatelessBlob *private_key, const XmssKeyContext *key_context, const XmssSigningContext *signing_context)
Verify the validity and integrity of a stateful private key partition part.
XmssError xmss_sign_message(XmssSignatureBlob **signature, XmssKeyContext *key_context, const XmssBuffer *message)
Create a signature for a message.
XmssError xmss_verify_private_key_stateless(const XmssPrivateKeyStatelessBlob *private_key, const XmssSigningContext *context)
Verify the validity and integrity of a stateless private key part.
XmssError xmss_context_initialize(XmssSigningContext **context, XmssParameterSetOID parameter_set, XmssReallocFunction custom_realloc, XmssFreeFunction custom_free, XmssZeroizeFunction zeroize)
Initialize a new instantiation of the signature key and generation library.
XmssError xmss_load_public_key(XmssInternalCache **cache, XmssKeyContext *key_context, const XmssPublicKeyInternalBlob *public_key)
Load a public key from storage.
XmssError xmss_calculate_public_key_part(XmssKeyGenerationContext *generation_buffer, uint32_t partition_index)
Perform work on an ongoing public key calculation.
XmssError xmss_verify_public_key(const XmssPublicKeyInternalBlob *pub_key, const XmssPrivateKeyStatelessBlob *private_key, const XmssKeyContext *key_context)
Verify the validity and integrity of a public key blob.
XmssError xmss_get_caching_in_public_key(XmssCacheType *cache_type, uint32_t *cache_level, const XmssPublicKeyInternalBlob *pub_key)
Extract the level of the cache that is stored in a public key blob.
XmssError xmss_generate_private_key(XmssKeyContext **key_context, XmssPrivateKeyStatelessBlob **private_key, XmssPrivateKeyStatefulBlob **key_usage, const XmssBuffer *secure_random, XmssIndexObfuscationSetting index_obfuscation_setting, const XmssBuffer *random, const XmssSigningContext *context)
Generate a new private key.
XmssError xmss_generate_public_key(XmssKeyGenerationContext **generation_buffer, XmssInternalCache **cache, XmssInternalCache **generation_cache, const XmssKeyContext *key_context, XmssCacheType cache_type, uint8_t cache_level, uint32_t generation_partitions)
Set up the process of generating the public key.
XmssError xmss_partition_signature_space(XmssPrivateKeyStatefulBlob **new_partition, XmssPrivateKeyStatefulBlob **updated_current_partition, XmssKeyContext *key_context, uint32_t new_partition_size)
Partition a private key into two private keys.
XmssError xmss_merge_signature_space(XmssPrivateKeyStatefulBlob **new_key_usage, XmssKeyContext *key_context, const XmssPrivateKeyStatefulBlob *partition_extension)
Merge two partitions of a private key into one private key partition.
XmssError xmss_get_signature_count(size_t *total_count, size_t *remaining_count, const XmssKeyContext *key_context)
The number of signatures that can still be created with a private key partition.
XmssError xmss_finish_calculate_public_key(XmssPublicKeyInternalBlob **public_key, XmssKeyGenerationContext **generation_buffer, XmssKeyContext *key_context)
Finalize calculation on a public key.
XmssError xmss_verify_exported_public_key(const XmssPublicKey *exported_pub_key, const XmssKeyContext *key_context)
Verify the correctness of an exported public key.
XmssError xmss_export_public_key(XmssPublicKey *exported_pub_key, const XmssKeyContext *key_context)
Write the public key to an exportable format.
XmssError xmss_request_future_signatures(XmssPrivateKeyStatefulBlob **new_key_usage, XmssKeyContext *key_context, uint32_t signature_count)
Request permission to sign one or more messages.
XmssError xmss_load_private_key(XmssKeyContext **key_context, const XmssPrivateKeyStatelessBlob *private_key, const XmssPrivateKeyStatefulBlob *key_usage, const XmssSigningContext *context)
Load a private key partition from storage.
A pointer to a buffer with a given size.
Definition: types.h:329
A stored stateful private key part.
Definition: structures.h:66
A stored stateless private key part.
Definition: structures.h:39
A stored public key for the signing library.
Definition: structures.h:94
Exportable format for a public key.
Definition: structures.h:126
Structure that embeds the exportable format for a signature, along with the signature's data size.
Definition: structures.h:194
XMSS library specific structured types.
Enumerations, basic types and callback function specifications.
void(* XmssFreeFunction)(void *ptr)
A function to deallocate memory.
Definition: types.h:371
XmssError
The return codes for the functions in the XMSS library.
Definition: types.h:103
XmssCacheType
The type of caching to use.
Definition: types.h:241
void(* XmssZeroizeFunction)(void *ptr, size_t size)
A function to securely erase sensitive data.
Definition: types.h:383
XmssIndexObfuscationSetting
The supported settings for index obfuscation.
Definition: types.h:228
XmssParameterSetOID
The XMSS parameter sets that are supported by this library.
Definition: types.h:186
void *(* XmssReallocFunction)(void *ptr, size_t size)
A function to reallocate memory.
Definition: types.h:354