From 1a5d021c53ca5aa786e49707733cb105ccc0a113 Mon Sep 17 00:00:00 2001 From: Douglas Stebila Date: Sun, 7 May 2023 15:53:03 -0400 Subject: [PATCH 1/8] Initial addition of sig_stfl API and dummy XMSS variant --- src/CMakeLists.txt | 2 ++ src/sig_stfl/sig_stfl.h | 3 -- src/sig_stfl/xmss/sig_stfl_xmss_sha256.c | 43 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 src/sig_stfl/xmss/sig_stfl_xmss_sha256.c diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2016316a0e..4fb5d0b1e7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -65,6 +65,8 @@ add_library(oqs kem/kem.c ${SIG_OBJS} sig_stfl/sig_stfl.c ${SIG_STFL_OBJS} + sig_stfl/sig_stfl.c + ${SIG_STFL_OBJS} ${COMMON_OBJS}) set(COMMON_OBJS ${COMMON_OBJS} PARENT_SCOPE) if(DEFINED SANITIZER_LD_FLAGS) diff --git a/src/sig_stfl/sig_stfl.h b/src/sig_stfl/sig_stfl.h index 5ef5317376..ff8f0ad851 100644 --- a/src/sig_stfl/sig_stfl.h +++ b/src/sig_stfl/sig_stfl.h @@ -315,7 +315,6 @@ OQS_API OQS_STATUS OQS_SIG_STFL_verify(const OQS_SIG_STFL *sig, const uint8_t *m * Query number of remaining signatures * * @param[in] sig The OQS_SIG_STFL object representing the signature scheme. - * @param[out] remain The number of remaining signatures * @param[in] secret_key The secret key represented as a byte string. * @return OQS_SUCCESS or OQS_ERROR */ @@ -334,8 +333,6 @@ OQS_API OQS_STATUS OQS_SIG_STFL_sigs_total(const OQS_SIG_STFL *sig, unsigned lon /** * Frees an OQS_SIG_STFL object that was constructed by OQS_SIG_STFL_new. * - * @param[in] sig The OQS_SIG_STFL object to free. - */ OQS_API void OQS_SIG_STFL_free(OQS_SIG_STFL *sig); /** diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha256.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha256.c new file mode 100644 index 0000000000..b2a84fb75c --- /dev/null +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha256.c @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT + +#include +#include + +#include +#include "sig_stfl_xmss.h" + +// ======================== XMSS10-SHA256 ======================== // + +OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_sha256_h10_new(void) { + + OQS_SIG_STFL *sig = (OQS_SIG_STFL *)malloc(sizeof(OQS_SIG_STFL)); + if (sig == NULL) { + return NULL; + } + memset(sig, 0, sizeof(OQS_SIG_STFL)); + + sig->method_name = "XMSS-SHA2_10_256"; + sig->alg_version = "https://datatracker.ietf.org/doc/html/rfc8391"; + sig->euf_cma = true; + + sig->length_public_key = OQS_SIG_STFL_alg_xmss_sha256_h10_length_pk; + sig->length_signature = OQS_SIG_STFL_alg_xmss_sha256_h10_length_signature; + + sig->keypair = OQS_SIG_STFL_alg_xmss_sha256_h10_keypair; + sig->sign = OQS_SIG_STFL_alg_xmss_sha256_h10_sign; + sig->verify = OQS_SIG_STFL_alg_xmss_sha256_h10_verify; + + return sig; +} + +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_keypair(uint8_t *public_key, uint8_t *secret_key) { + return OQS_ERROR; +} + +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key) { + return OQS_ERROR; +} + +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key) { + return OQS_ERROR; +} From 36546513231685569c4cbbe144c76dfb4cd481a7 Mon Sep 17 00:00:00 2001 From: Duc Nguyen Date: Thu, 17 Aug 2023 16:55:34 -0400 Subject: [PATCH 2/8] add secret key object --- src/sig_stfl/sig_stfl.c | 2 +- src/sig_stfl/sig_stfl.h | 4 +- src/sig_stfl/xmss/sig_stfl_xmss.h | 224 +++++++++--------- src/sig_stfl/xmss/sig_stfl_xmss_sha256_h10.c | 24 +- src/sig_stfl/xmss/sig_stfl_xmss_sha256_h16.c | 24 +- src/sig_stfl/xmss/sig_stfl_xmss_sha256_h20.c | 24 +- src/sig_stfl/xmss/sig_stfl_xmss_sha512_h10.c | 24 +- src/sig_stfl/xmss/sig_stfl_xmss_sha512_h16.c | 24 +- src/sig_stfl/xmss/sig_stfl_xmss_sha512_h20.c | 24 +- .../xmss/sig_stfl_xmss_shake128_h10.c | 24 +- .../xmss/sig_stfl_xmss_shake128_h16.c | 24 +- .../xmss/sig_stfl_xmss_shake128_h20.c | 24 +- .../xmss/sig_stfl_xmss_shake256_h10.c | 24 +- .../xmss/sig_stfl_xmss_shake256_h16.c | 24 +- .../xmss/sig_stfl_xmss_shake256_h20.c | 24 +- .../xmss/sig_stfl_xmssmt_sha256_h20_2.c | 24 +- .../xmss/sig_stfl_xmssmt_sha256_h20_4.c | 24 +- .../xmss/sig_stfl_xmssmt_sha256_h40_2.c | 24 +- .../xmss/sig_stfl_xmssmt_sha256_h40_4.c | 24 +- .../xmss/sig_stfl_xmssmt_sha256_h40_8.c | 24 +- .../xmss/sig_stfl_xmssmt_sha256_h60_12.c | 24 +- .../xmss/sig_stfl_xmssmt_sha256_h60_3.c | 24 +- .../xmss/sig_stfl_xmssmt_sha256_h60_6.c | 24 +- .../xmss/sig_stfl_xmssmt_shake128_h20_2.c | 24 +- .../xmss/sig_stfl_xmssmt_shake128_h20_4.c | 24 +- .../xmss/sig_stfl_xmssmt_shake128_h40_2.c | 24 +- .../xmss/sig_stfl_xmssmt_shake128_h40_4.c | 24 +- .../xmss/sig_stfl_xmssmt_shake128_h40_8.c | 24 +- .../xmss/sig_stfl_xmssmt_shake128_h60_12.c | 24 +- .../xmss/sig_stfl_xmssmt_shake128_h60_3.c | 24 +- .../xmss/sig_stfl_xmssmt_shake128_h60_6.c | 24 +- tests/kat_sig_stfl.c | 17 +- tests/test_sig_stfl.c | 38 +-- 33 files changed, 487 insertions(+), 470 deletions(-) diff --git a/src/sig_stfl/sig_stfl.c b/src/sig_stfl/sig_stfl.c index c440e9e95d..c77139e20a 100644 --- a/src/sig_stfl/sig_stfl.c +++ b/src/sig_stfl/sig_stfl.c @@ -438,7 +438,7 @@ OQS_API OQS_STATUS OQS_SIG_STFL_keypair(const OQS_SIG_STFL *sig, uint8_t *public } OQS_API OQS_STATUS OQS_SIG_STFL_sign(const OQS_SIG_STFL *sig, uint8_t *signature, size_t *signature_len, const uint8_t *message, - size_t message_len, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key) { if (sig == NULL || sig->sign == NULL || sig->sign(signature, signature_len, message, message_len, secret_key) != 0) { return OQS_ERROR; } else { diff --git a/src/sig_stfl/sig_stfl.h b/src/sig_stfl/sig_stfl.h index ff8f0ad851..fe27b37e09 100644 --- a/src/sig_stfl/sig_stfl.h +++ b/src/sig_stfl/sig_stfl.h @@ -147,7 +147,7 @@ typedef struct OQS_SIG_STFL { * @param[in] secret_key The secret key represented as a byte string. * @return OQS_SUCCESS or OQS_ERROR */ - OQS_STATUS (*sign)(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const OQS_SIG_STFL_SECRET_KEY *secret_key); + OQS_STATUS (*sign)(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); /** * Signature verification algorithm. @@ -296,7 +296,7 @@ OQS_API OQS_STATUS OQS_SIG_STFL_keypair(const OQS_SIG_STFL *sig, uint8_t *pk, OQ * @param[in] secret_key The secret key represented as a byte string. * @return OQS_SUCCESS or OQS_ERROR */ -OQS_API OQS_STATUS OQS_SIG_STFL_sign(const OQS_SIG_STFL *sig, uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_sign(const OQS_SIG_STFL *sig, uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); /** * Signature verification algorithm. diff --git a/src/sig_stfl/xmss/sig_stfl_xmss.h b/src/sig_stfl/xmss/sig_stfl_xmss.h index aa326dfff5..1cf29900f3 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss.h +++ b/src/sig_stfl/xmss/sig_stfl_xmss.h @@ -54,11 +54,11 @@ void OQS_SECRET_KEY_XMSS_free(OQS_SIG_STFL_SECRET_KEY *sk); OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_sha256_h10_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA256_H10_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -70,11 +70,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sigs_total(unsigned long lon OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_sha256_h16_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA256_H16_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -86,11 +86,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sigs_total(unsigned long lon OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_sha256_h20_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA256_H20_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -102,11 +102,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sigs_total(unsigned long lon OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_shake128_h10_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE128_H10_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -118,11 +118,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sigs_total(unsigned long l OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_shake128_h16_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE128_H16_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -134,11 +134,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sigs_total(unsigned long l OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_shake128_h20_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE128_H20_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -150,11 +150,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sigs_total(unsigned long l OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_sha512_h10_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA512_H10_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -166,11 +166,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sigs_total(unsigned long lon OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_sha512_h16_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA512_H16_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -182,11 +182,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sigs_total(unsigned long lon OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_sha512_h20_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA512_H20_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -198,11 +198,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sigs_total(unsigned long lon OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_shake256_h10_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE256_H10_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -214,11 +214,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sigs_total(unsigned long l OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_shake256_h16_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE256_H16_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -230,11 +230,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sigs_total(unsigned long l OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_shake256_h20_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE256_H20_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -246,11 +246,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sigs_total(unsigned long l OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H20_2_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -262,11 +262,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sigs_total(unsigned long OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H20_4_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -278,11 +278,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sigs_total(unsigned long OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H40_2_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -294,11 +294,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sigs_total(unsigned long OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H40_4_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -310,11 +310,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sigs_total(unsigned long OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H40_8_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -326,11 +326,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sigs_total(unsigned long OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H60_3_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -342,11 +342,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sigs_total(unsigned long OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H60_6_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -358,11 +358,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sigs_total(unsigned long OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H60_12_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -374,11 +374,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sigs_total(unsigned lon OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H20_2_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -390,11 +390,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sigs_total(unsigned lo OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H20_4_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -406,11 +406,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sigs_total(unsigned lo OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H40_2_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -422,11 +422,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sigs_total(unsigned lo OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H40_4_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -438,11 +438,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sigs_total(unsigned lo OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H40_8_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -454,11 +454,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sigs_total(unsigned lo OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H60_3_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -470,11 +470,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sigs_total(unsigned lo OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H60_6_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif @@ -486,11 +486,11 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sigs_total(unsigned lo OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_new(void); OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H60_12_new(void); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_keypair(uint8_t *public_key, uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key); OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key); -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sigs_total(unsigned long long *total, const uint8_t *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key); +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key); #endif diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h10.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h10.c index 9a30f7c4f0..4ff8f24e7d 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h10.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h10.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA256_H10_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_sha256_h10_oid = 0x01; - if (xmss_keypair(public_key, secret_key, xmss_sha256_h10_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_sha256_h10_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t)sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_verify(XMSS_UNUSED_ATT const return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h16.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h16.c index 289732ecdb..9df67cfe5b 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h16.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h16.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA256_H16_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_sha256_h16_oid = 0x02; - if (xmss_keypair(public_key, secret_key, xmss_sha256_h16_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_sha256_h16_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_verify(XMSS_UNUSED_ATT const return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h20.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h20.c index 936fbdd32a..1fb8054afb 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h20.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h20.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA256_H20_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_sha256_h20_oid = 0x03; - if (xmss_keypair(public_key, secret_key, xmss_sha256_h20_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_sha256_h20_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_verify(XMSS_UNUSED_ATT const return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h10.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h10.c index 488713d95a..cf067a1d21 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h10.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h10.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA512_H10_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_sha512_h10_oid = 0x04; - if (xmss_keypair(public_key, secret_key, xmss_sha512_h10_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_sha512_h10_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_verify(XMSS_UNUSED_ATT const return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h16.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h16.c index 6993faf83a..9ed41dbced 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h16.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h16.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA512_H16_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_sha512_h16_oid = 0x05; - if (xmss_keypair(public_key, secret_key, xmss_sha512_h16_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_sha512_h16_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_verify(XMSS_UNUSED_ATT const return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h20.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h20.c index 2ebfc9dd57..c9b115053a 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h20.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h20.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHA512_H20_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_sha512_h20_oid = 0x06; - if (xmss_keypair(public_key, secret_key, xmss_sha512_h20_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_sha512_h20_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_verify(XMSS_UNUSED_ATT const return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h10.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h10.c index 3e961c076b..2d7e201bbb 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h10.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h10.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE128_H10_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_shake128_h10_oid = 0x07; - if (xmss_keypair(public_key, secret_key, xmss_shake128_h10_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_shake128_h10_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_verify(XMSS_UNUSED_ATT con return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h16.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h16.c index a8ed4fa37e..893d42e790 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h16.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h16.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE128_H16_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_shake128_h16_oid = 0x08; - if (xmss_keypair(public_key, secret_key, xmss_shake128_h16_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_shake128_h16_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_verify(XMSS_UNUSED_ATT con return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h20.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h20.c index e39f3912c2..c926950a17 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h20.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h20.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE128_H20_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_shake128_h20_oid = 0x09; - if (xmss_keypair(public_key, secret_key, xmss_shake128_h20_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_shake128_h20_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_verify(XMSS_UNUSED_ATT con return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h10.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h10.c index 26bd706c9c..70ea7d7182 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h10.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h10.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE256_H10_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_shake256_h10_oid = 0x0a; - if (xmss_keypair(public_key, secret_key, xmss_shake256_h10_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_shake256_h10_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_verify(XMSS_UNUSED_ATT con return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h16.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h16.c index c5c44d6655..bf40c5721b 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h16.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h16.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE256_H16_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_shake256_h16_oid = 0x0b; - if (xmss_keypair(public_key, secret_key, xmss_shake256_h16_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_shake256_h16_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_verify(XMSS_UNUSED_ATT con return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h20.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h20.c index 439f4b3f99..e37b793622 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h20.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h20.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE256_H20_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmss_shake256_h20_oid = 0x0c; - if (xmss_keypair(public_key, secret_key, xmss_shake256_h20_oid)) { + if (xmss_keypair(public_key, secret_key->secret_key_data, xmss_shake256_h20_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmss_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmss_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_verify(XMSS_UNUSED_ATT con return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_remaining_signatures(remain, secret_key)) { + if (xmss_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmss_total_signatures(total, secret_key)) { + if (xmss_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_2.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_2.c index 4cbd91beb5..7833fabcfc 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_2.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_2.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H20_2_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_sha256_h20_2_oid = 0x01; - if (xmssmt_keypair(public_key, secret_key, xmssmt_sha256_h20_2_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_sha256_h20_2_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_verify(XMSS_UNUSED_ATT c return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_4.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_4.c index 9e830571cd..635d5dda3b 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_4.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_4.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H20_4_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_sha256_h20_4_oid = 0x02; - if (xmssmt_keypair(public_key, secret_key, xmssmt_sha256_h20_4_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_sha256_h20_4_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_verify(XMSS_UNUSED_ATT c return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_2.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_2.c index 42181f75f6..8290e5611e 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_2.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_2.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H40_2_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_sha256_h40_2_oid = 0x03; - if (xmssmt_keypair(public_key, secret_key, xmssmt_sha256_h40_2_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_sha256_h40_2_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_verify(XMSS_UNUSED_ATT c return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_4.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_4.c index 69df1302f8..73c1145a0d 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_4.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_4.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H40_4_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_sha256_h40_4_oid = 0x04; - if (xmssmt_keypair(public_key, secret_key, xmssmt_sha256_h40_4_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_sha256_h40_4_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_verify(XMSS_UNUSED_ATT c return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_8.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_8.c index 6d4e161d53..1e1ecf5e1d 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_8.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_8.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H40_8_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_sha256_h40_8_oid = 0x05; - if (xmssmt_keypair(public_key, secret_key, xmssmt_sha256_h40_8_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_sha256_h40_8_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_verify(XMSS_UNUSED_ATT c return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_12.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_12.c index 377518a0da..b3632382ae 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_12.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_12.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H60_12_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_sha256_h60_12_oid = 0x08; - if (xmssmt_keypair(public_key, secret_key, xmssmt_sha256_h60_12_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_sha256_h60_12_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_verify(XMSS_UNUSED_ATT return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_3.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_3.c index a455e43814..4f78c4b9a0 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_3.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_3.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H60_3_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_sha256_h60_3_oid = 0x06; - if (xmssmt_keypair(public_key, secret_key, xmssmt_sha256_h60_3_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_sha256_h60_3_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_verify(XMSS_UNUSED_ATT c return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_6.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_6.c index e57d298615..31ec8b88fd 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_6.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_6.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHA256_H60_6_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_sha256_h60_6_oid = 0x07; - if (xmssmt_keypair(public_key, secret_key, xmssmt_sha256_h60_6_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_sha256_h60_6_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_verify(XMSS_UNUSED_ATT c return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_2.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_2.c index 331949be1f..bba88ff1d2 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_2.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_2.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H20_2_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_shake128_h20_2_oid = 0x11; - if (xmssmt_keypair(public_key, secret_key, xmssmt_shake128_h20_2_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_shake128_h20_2_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_verify(XMSS_UNUSED_ATT return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_4.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_4.c index 0acc511e7a..839cf47a3a 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_4.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_4.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H20_4_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_shake128_h20_4_oid = 0x12; - if (xmssmt_keypair(public_key, secret_key, xmssmt_shake128_h20_4_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_shake128_h20_4_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_verify(XMSS_UNUSED_ATT return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_2.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_2.c index cc379336b2..65c3b24718 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_2.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_2.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H40_2_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_shake128_h40_2_oid = 0x13; - if (xmssmt_keypair(public_key, secret_key, xmssmt_shake128_h40_2_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_shake128_h40_2_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_verify(XMSS_UNUSED_ATT return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_4.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_4.c index 11030a2494..f496b344f9 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_4.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_4.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H40_4_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_shake128_h40_4_oid = 0x14; - if (xmssmt_keypair(public_key, secret_key, xmssmt_shake128_h40_4_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_shake128_h40_4_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_verify(XMSS_UNUSED_ATT return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_8.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_8.c index cec3c1cd73..1451aa51d7 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_8.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_8.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H40_8_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_shake128_h40_8_oid = 0x15; - if (xmssmt_keypair(public_key, secret_key, xmssmt_shake128_h40_8_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_shake128_h40_8_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_verify(XMSS_UNUSED_ATT return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_12.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_12.c index 3cb5f20300..5863f7094f 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_12.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_12.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H60_12_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_shake128_h60_12_oid = 0x18; - if (xmssmt_keypair(public_key, secret_key, xmssmt_shake128_h60_12_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_shake128_h60_12_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_verify(XMSS_UNUSED_AT return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_3.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_3.c index bc8f7a96bb..13c3ff0b1c 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_3.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_3.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H60_3_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_shake128_h60_3_oid = 0x16; - if (xmssmt_keypair(public_key, secret_key, xmssmt_shake128_h60_3_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_shake128_h60_3_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_verify(XMSS_UNUSED_ATT return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_6.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_6.c index 8bcb4dc0dd..2b6e7e464f 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_6.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_6.c @@ -65,28 +65,28 @@ OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSSMT_SHAKE128_H60_6_new(void) { return sk; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_keypair(XMSS_UNUSED_ATT uint8_t *public_key, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (public_key == NULL || secret_key == NULL) { + if (public_key == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } const uint32_t xmssmt_shake128_h60_6_oid = 0x17; - if (xmssmt_keypair(public_key, secret_key, xmssmt_shake128_h60_6_oid)) { + if (xmssmt_keypair(public_key, secret_key->secret_key_data, xmssmt_shake128_h60_6_oid)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT uint8_t *secret_key) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sign(uint8_t *signature, size_t *signature_len, XMSS_UNUSED_ATT const uint8_t *message, XMSS_UNUSED_ATT size_t message_len, XMSS_UNUSED_ATT OQS_SIG_STFL_SECRET_KEY *secret_key) { - if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL) { + if (signature == NULL || signature_len == NULL || message == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } unsigned long long sig_length = 0; - if (xmssmt_sign(secret_key, signature, &sig_length, message, message_len)) { + if (xmssmt_sign(secret_key->secret_key_data, signature, &sig_length, message, message_len)) { return OQS_ERROR; } *signature_len = (size_t) sig_length; @@ -107,24 +107,24 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_verify(XMSS_UNUSED_ATT return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sigs_remaining(unsigned long long *remain, const uint8_t *secret_key) { - if (remain == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sigs_remaining(unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (remain == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_remaining_signatures(remain, secret_key)) { + if (xmssmt_remaining_signatures(remain, secret_key->secret_key_data)) { return OQS_ERROR; } return OQS_SUCCESS; } -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sigs_total(unsigned long long *total, const uint8_t *secret_key) { - if (total == NULL || secret_key == NULL) { +OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) { + if (total == NULL || secret_key == NULL || secret_key->secret_key_data == NULL) { return OQS_ERROR; } - if (xmssmt_total_signatures(total, secret_key)) { + if (xmssmt_total_signatures(total, secret_key->secret_key_data)) { return OQS_ERROR; } diff --git a/tests/kat_sig_stfl.c b/tests/kat_sig_stfl.c index a2b2e51e87..19553e5d45 100644 --- a/tests/kat_sig_stfl.c +++ b/tests/kat_sig_stfl.c @@ -141,7 +141,7 @@ OQS_STATUS sig_stfl_kat(const char *method_name, const char *katfile) { uint8_t *msg = NULL, *msg_rand = NULL; size_t msg_len = 0; uint8_t *public_key = NULL; - uint8_t *secret_key = NULL; + OQS_SIG_STFL_SECRET_KEY *secret_key = NULL; uint8_t *signature = NULL, *signature_kat = NULL; uint8_t *signed_msg = NULL; size_t signature_len = 0; @@ -168,7 +168,7 @@ OQS_STATUS sig_stfl_kat(const char *method_name, const char *katfile) { // Grab the pk and sk from KAT file public_key = malloc(sig->length_public_key); - secret_key = calloc(sig->length_secret_key, sizeof(uint8_t)); + secret_key = malloc(sizeof(OQS_SIG_STFL_SECRET_KEY)); signature = calloc(sig->length_signature, sizeof(uint8_t)); signature_kat = calloc(sig->length_signature, sizeof(uint8_t)); @@ -176,13 +176,19 @@ OQS_STATUS sig_stfl_kat(const char *method_name, const char *katfile) { fprintf(stderr, "[kat_stfl_sig] %s ERROR: malloc failed!\n", method_name); goto err; } + secret_key->secret_key_data = calloc(sig->length_secret_key, sizeof(uint8_t)); + if (secret_key->secret_key_data == NULL) + { + fprintf(stderr, "[kat_stfl_sig] %s ERROR: malloc failed!\n", method_name); + goto err; + } if (!ReadHex(fp_rsp, public_key, sig->length_public_key, "pk = ")) { fprintf(stderr, "ERROR: unable to read 'pk' from <%s>\n", katfile); goto err; } - if (!ReadHex(fp_rsp, secret_key, sig->length_secret_key, "sk = ")) { + if (!ReadHex(fp_rsp, secret_key->secret_key_data, sig->length_secret_key, "sk = ")) { fprintf(stderr, "ERROR: unable to read 'sk' from <%s>\n", katfile); goto err; } @@ -191,7 +197,7 @@ OQS_STATUS sig_stfl_kat(const char *method_name, const char *katfile) { fprintf(fh, "# %s\n\n", sig->method_name); fprintBstr(fh, "pk = ", public_key, sig->length_public_key); - fprintBstr(fh, "sk = ", secret_key, sig->length_secret_key); + fprintBstr(fh, "sk = ", secret_key->secret_key_data, sig->length_secret_key); fprintf(fh, "\n\n"); fprintf(fh, "count = 0\n"); @@ -280,10 +286,11 @@ OQS_STATUS sig_stfl_kat(const char *method_name, const char *katfile) { cleanup: if (sig != NULL) { - OQS_MEM_secure_free(secret_key, sig->length_secret_key); + OQS_MEM_secure_free(secret_key->secret_key_data, sig->length_secret_key); OQS_MEM_secure_free(signed_msg, signed_msg_len); } OQS_MEM_insecure_free(public_key); + OQS_MEM_insecure_free(secret_key); OQS_MEM_insecure_free(signature); OQS_MEM_insecure_free(signature_kat); OQS_MEM_insecure_free(msg); diff --git a/tests/test_sig_stfl.c b/tests/test_sig_stfl.c index a393dc6cf4..5f31a3e617 100644 --- a/tests/test_sig_stfl.c +++ b/tests/test_sig_stfl.c @@ -123,7 +123,7 @@ int ReadHex(FILE *infile, unsigned char *a, unsigned long Length, char *str) { return 1; } -OQS_STATUS sig_stfl_keypair_from_keygen(OQS_SIG_STFL *sig, uint8_t *public_key, uint8_t *secret_key) { +OQS_STATUS sig_stfl_keypair_from_keygen(OQS_SIG_STFL *sig, uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key) { OQS_STATUS rc; rc = OQS_SIG_STFL_keypair(sig, public_key, secret_key); OQS_TEST_CT_DECLASSIFY(&rc, sizeof rc); @@ -133,7 +133,7 @@ OQS_STATUS sig_stfl_keypair_from_keygen(OQS_SIG_STFL *sig, uint8_t *public_key, return OQS_SUCCESS; } -OQS_STATUS sig_stfl_keypair_from_KATs(OQS_SIG_STFL *sig, uint8_t *public_key, uint8_t *secret_key, const char *katfile) { +OQS_STATUS sig_stfl_keypair_from_KATs(OQS_SIG_STFL *sig, uint8_t *public_key, uint8_t *secret_key_data, const char *katfile) { OQS_STATUS ret = OQS_ERROR; FILE *fp_rsp = NULL; @@ -148,7 +148,7 @@ OQS_STATUS sig_stfl_keypair_from_KATs(OQS_SIG_STFL *sig, uint8_t *public_key, ui goto err; } - if (!ReadHex(fp_rsp, secret_key, sig->length_secret_key, "sk = ")) { + if (!ReadHex(fp_rsp, secret_key_data, sig->length_secret_key, "sk = ")) { fprintf(stderr, "ERROR: unable to read 'sk' from <%s>\n", katfile); goto err; } @@ -176,7 +176,7 @@ OQS_STATUS sig_stfl_keypair_from_KATs(OQS_SIG_STFL *sig, uint8_t *public_key, ui * XMSSMT-SHAKE_40/2_256 * XMSSMT-SHAKE_60/3_256 */ -OQS_STATUS sig_stfl_KATs_keygen(OQS_SIG_STFL *sig, uint8_t *public_key, uint8_t *secret_key, const char *katfile) { +OQS_STATUS sig_stfl_KATs_keygen(OQS_SIG_STFL *sig, uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key, const char *katfile) { printf("%s", sig->method_name); if (0) { @@ -239,7 +239,7 @@ OQS_STATUS sig_stfl_KATs_keygen(OQS_SIG_STFL *sig, uint8_t *public_key, uint8_t } from_kats: - return sig_stfl_keypair_from_KATs(sig, public_key, secret_key, katfile); + return sig_stfl_keypair_from_KATs(sig, public_key, secret_key->secret_key_data, katfile); from_keygen: return sig_stfl_keypair_from_keygen(sig, public_key, secret_key); @@ -253,7 +253,7 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char OQS_SIG_STFL *sig = NULL; uint8_t *public_key = NULL; - uint8_t *secret_key = NULL; + OQS_SIG_STFL_SECRET_KEY *secret_key = NULL; uint8_t *message = NULL; size_t message_len = 100; uint8_t *signature = NULL; @@ -276,7 +276,7 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char printf("================================================================================\n"); public_key = malloc(sig->length_public_key + 2 * sizeof(magic_t)); - secret_key = malloc(sig->length_secret_key + 2 * sizeof(magic_t)); + secret_key = malloc(sizeof(OQS_SIG_STFL_SECRET_KEY)); message = malloc(message_len + 2 * sizeof(magic_t)); signature = malloc(sig->length_signature + 2 * sizeof(magic_t)); @@ -284,21 +284,27 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char fprintf(stderr, "ERROR: malloc failed\n"); goto err; } + secret_key->secret_key_data = malloc(sig->length_secret_key + 2 * sizeof(magic_t)); + if (secret_key->secret_key_data == NULL) + { + fprintf(stderr, "ERROR: malloc failed\n"); + goto err; + } //Set the magic numbers before memcpy(public_key, magic.val, sizeof(magic_t)); - memcpy(secret_key, magic.val, sizeof(magic_t)); + memcpy(secret_key->secret_key_data, magic.val, sizeof(magic_t)); memcpy(message, magic.val, sizeof(magic_t)); memcpy(signature, magic.val, sizeof(magic_t)); public_key += sizeof(magic_t); - secret_key += sizeof(magic_t); + secret_key->secret_key_data += sizeof(magic_t); message += sizeof(magic_t); signature += sizeof(magic_t); // and after memcpy(public_key + sig->length_public_key, magic.val, sizeof(magic_t)); - memcpy(secret_key + sig->length_secret_key, magic.val, sizeof(magic_t)); + memcpy(secret_key->secret_key_data + sig->length_secret_key, magic.val, sizeof(magic_t)); memcpy(message + message_len, magic.val, sizeof(magic_t)); memcpy(signature + sig->length_signature, magic.val, sizeof(magic_t)); @@ -344,11 +350,11 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char #ifndef OQS_ENABLE_TEST_CONSTANT_TIME /* check magic values */ int rv = memcmp(public_key + sig->length_public_key, magic.val, sizeof(magic_t)); - rv |= memcmp(secret_key + sig->length_secret_key, magic.val, sizeof(magic_t)); + rv |= memcmp(secret_key->secret_key_data + sig->length_secret_key, magic.val, sizeof(magic_t)); rv |= memcmp(message + message_len, magic.val, sizeof(magic_t)); rv |= memcmp(signature + sig->length_signature, magic.val, sizeof(magic_t)); rv |= memcmp(public_key - sizeof(magic_t), magic.val, sizeof(magic_t)); - rv |= memcmp(secret_key - sizeof(magic_t), magic.val, sizeof(magic_t)); + rv |= memcmp(secret_key->secret_key_data - sizeof(magic_t), magic.val, sizeof(magic_t)); rv |= memcmp(message - sizeof(magic_t), magic.val, sizeof(magic_t)); rv |= memcmp(signature - sizeof(magic_t), magic.val, sizeof(magic_t)); if (rv) { @@ -365,8 +371,12 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char ret = OQS_ERROR; cleanup: - if (secret_key) { - OQS_MEM_secure_free(secret_key - sizeof(magic_t), sig->length_secret_key + 2 * sizeof(magic_t)); + if (secret_key->secret_key_data) { + OQS_MEM_secure_free(secret_key->secret_key_data - sizeof(magic_t), sig->length_secret_key + 2 * sizeof(magic_t)); + } + if (secret_key) + { + OQS_MEM_insecure_free(secret_key - sizeof(magic_t)); } if (public_key) { OQS_MEM_insecure_free(public_key - sizeof(magic_t)); From 255fb1f831423b70b6c2cfc32e963a79f383a67f Mon Sep 17 00:00:00 2001 From: Duc Nguyen Date: Thu, 17 Aug 2023 17:17:01 -0400 Subject: [PATCH 3/8] allocate and free using wrapper function instead of malloc/free --- tests/kat_sig_stfl.c | 11 ++--------- tests/test_sig_stfl.c | 21 ++------------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/tests/kat_sig_stfl.c b/tests/kat_sig_stfl.c index 19553e5d45..ebb89c14e8 100644 --- a/tests/kat_sig_stfl.c +++ b/tests/kat_sig_stfl.c @@ -168,7 +168,7 @@ OQS_STATUS sig_stfl_kat(const char *method_name, const char *katfile) { // Grab the pk and sk from KAT file public_key = malloc(sig->length_public_key); - secret_key = malloc(sizeof(OQS_SIG_STFL_SECRET_KEY)); + secret_key = OQS_SIG_STFL_SECRET_KEY_new(sig->method_name); signature = calloc(sig->length_signature, sizeof(uint8_t)); signature_kat = calloc(sig->length_signature, sizeof(uint8_t)); @@ -176,12 +176,6 @@ OQS_STATUS sig_stfl_kat(const char *method_name, const char *katfile) { fprintf(stderr, "[kat_stfl_sig] %s ERROR: malloc failed!\n", method_name); goto err; } - secret_key->secret_key_data = calloc(sig->length_secret_key, sizeof(uint8_t)); - if (secret_key->secret_key_data == NULL) - { - fprintf(stderr, "[kat_stfl_sig] %s ERROR: malloc failed!\n", method_name); - goto err; - } if (!ReadHex(fp_rsp, public_key, sig->length_public_key, "pk = ")) { fprintf(stderr, "ERROR: unable to read 'pk' from <%s>\n", katfile); @@ -286,11 +280,10 @@ OQS_STATUS sig_stfl_kat(const char *method_name, const char *katfile) { cleanup: if (sig != NULL) { - OQS_MEM_secure_free(secret_key->secret_key_data, sig->length_secret_key); OQS_MEM_secure_free(signed_msg, signed_msg_len); } OQS_MEM_insecure_free(public_key); - OQS_MEM_insecure_free(secret_key); + OQS_SIG_STFL_SECRET_KEY_free(secret_key); OQS_MEM_insecure_free(signature); OQS_MEM_insecure_free(signature_kat); OQS_MEM_insecure_free(msg); diff --git a/tests/test_sig_stfl.c b/tests/test_sig_stfl.c index 5f31a3e617..1383b54894 100644 --- a/tests/test_sig_stfl.c +++ b/tests/test_sig_stfl.c @@ -275,8 +275,8 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char printf("Sample computation for stateful signature %s\n", sig->method_name); printf("================================================================================\n"); + secret_key = OQS_SIG_STFL_SECRET_KEY_new(sig->method_name); public_key = malloc(sig->length_public_key + 2 * sizeof(magic_t)); - secret_key = malloc(sizeof(OQS_SIG_STFL_SECRET_KEY)); message = malloc(message_len + 2 * sizeof(magic_t)); signature = malloc(sig->length_signature + 2 * sizeof(magic_t)); @@ -284,27 +284,18 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char fprintf(stderr, "ERROR: malloc failed\n"); goto err; } - secret_key->secret_key_data = malloc(sig->length_secret_key + 2 * sizeof(magic_t)); - if (secret_key->secret_key_data == NULL) - { - fprintf(stderr, "ERROR: malloc failed\n"); - goto err; - } //Set the magic numbers before memcpy(public_key, magic.val, sizeof(magic_t)); - memcpy(secret_key->secret_key_data, magic.val, sizeof(magic_t)); memcpy(message, magic.val, sizeof(magic_t)); memcpy(signature, magic.val, sizeof(magic_t)); public_key += sizeof(magic_t); - secret_key->secret_key_data += sizeof(magic_t); message += sizeof(magic_t); signature += sizeof(magic_t); // and after memcpy(public_key + sig->length_public_key, magic.val, sizeof(magic_t)); - memcpy(secret_key->secret_key_data + sig->length_secret_key, magic.val, sizeof(magic_t)); memcpy(message + message_len, magic.val, sizeof(magic_t)); memcpy(signature + sig->length_signature, magic.val, sizeof(magic_t)); @@ -350,11 +341,9 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char #ifndef OQS_ENABLE_TEST_CONSTANT_TIME /* check magic values */ int rv = memcmp(public_key + sig->length_public_key, magic.val, sizeof(magic_t)); - rv |= memcmp(secret_key->secret_key_data + sig->length_secret_key, magic.val, sizeof(magic_t)); rv |= memcmp(message + message_len, magic.val, sizeof(magic_t)); rv |= memcmp(signature + sig->length_signature, magic.val, sizeof(magic_t)); rv |= memcmp(public_key - sizeof(magic_t), magic.val, sizeof(magic_t)); - rv |= memcmp(secret_key->secret_key_data - sizeof(magic_t), magic.val, sizeof(magic_t)); rv |= memcmp(message - sizeof(magic_t), magic.val, sizeof(magic_t)); rv |= memcmp(signature - sizeof(magic_t), magic.val, sizeof(magic_t)); if (rv) { @@ -371,13 +360,6 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char ret = OQS_ERROR; cleanup: - if (secret_key->secret_key_data) { - OQS_MEM_secure_free(secret_key->secret_key_data - sizeof(magic_t), sig->length_secret_key + 2 * sizeof(magic_t)); - } - if (secret_key) - { - OQS_MEM_insecure_free(secret_key - sizeof(magic_t)); - } if (public_key) { OQS_MEM_insecure_free(public_key - sizeof(magic_t)); } @@ -387,6 +369,7 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char if (signature) { OQS_MEM_insecure_free(signature - sizeof(magic_t)); } + OQS_SIG_STFL_SECRET_KEY_free(secret_key); OQS_SIG_STFL_free(sig); return ret; From ec19e17ef14832eabb5988c6eefe18f86c410371 Mon Sep 17 00:00:00 2001 From: Duc Nguyen Date: Thu, 17 Aug 2023 17:19:32 -0400 Subject: [PATCH 4/8] cleaner function signature --- tests/test_sig_stfl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_sig_stfl.c b/tests/test_sig_stfl.c index 1383b54894..770eb58f82 100644 --- a/tests/test_sig_stfl.c +++ b/tests/test_sig_stfl.c @@ -133,7 +133,7 @@ OQS_STATUS sig_stfl_keypair_from_keygen(OQS_SIG_STFL *sig, uint8_t *public_key, return OQS_SUCCESS; } -OQS_STATUS sig_stfl_keypair_from_KATs(OQS_SIG_STFL *sig, uint8_t *public_key, uint8_t *secret_key_data, const char *katfile) { +OQS_STATUS sig_stfl_keypair_from_KATs(OQS_SIG_STFL *sig, uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key, const char *katfile) { OQS_STATUS ret = OQS_ERROR; FILE *fp_rsp = NULL; @@ -148,7 +148,7 @@ OQS_STATUS sig_stfl_keypair_from_KATs(OQS_SIG_STFL *sig, uint8_t *public_key, ui goto err; } - if (!ReadHex(fp_rsp, secret_key_data, sig->length_secret_key, "sk = ")) { + if (!ReadHex(fp_rsp, secret_key->secret_key_data, sig->length_secret_key, "sk = ")) { fprintf(stderr, "ERROR: unable to read 'sk' from <%s>\n", katfile); goto err; } @@ -239,7 +239,7 @@ OQS_STATUS sig_stfl_KATs_keygen(OQS_SIG_STFL *sig, uint8_t *public_key, OQS_SIG_ } from_kats: - return sig_stfl_keypair_from_KATs(sig, public_key, secret_key->secret_key_data, katfile); + return sig_stfl_keypair_from_KATs(sig, public_key, secret_key, katfile); from_keygen: return sig_stfl_keypair_from_keygen(sig, public_key, secret_key); @@ -360,6 +360,7 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char ret = OQS_ERROR; cleanup: + OQS_SIG_STFL_SECRET_KEY_free(secret_key); if (public_key) { OQS_MEM_insecure_free(public_key - sizeof(magic_t)); } @@ -369,7 +370,6 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char if (signature) { OQS_MEM_insecure_free(signature - sizeof(magic_t)); } - OQS_SIG_STFL_SECRET_KEY_free(secret_key); OQS_SIG_STFL_free(sig); return ret; From c8ee82ac761f736654a0b55302dc6b521ba9f22f Mon Sep 17 00:00:00 2001 From: Douglas Stebila Date: Fri, 18 Aug 2023 10:39:42 -0400 Subject: [PATCH 5/8] Fix comment --- src/sig_stfl/sig_stfl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sig_stfl/sig_stfl.h b/src/sig_stfl/sig_stfl.h index fe27b37e09..b795853c5c 100644 --- a/src/sig_stfl/sig_stfl.h +++ b/src/sig_stfl/sig_stfl.h @@ -333,6 +333,7 @@ OQS_API OQS_STATUS OQS_SIG_STFL_sigs_total(const OQS_SIG_STFL *sig, unsigned lon /** * Frees an OQS_SIG_STFL object that was constructed by OQS_SIG_STFL_new. * + */ OQS_API void OQS_SIG_STFL_free(OQS_SIG_STFL *sig); /** From af611209305a4c9556a2050bdfa160384e41ab0e Mon Sep 17 00:00:00 2001 From: Douglas Stebila Date: Fri, 18 Aug 2023 11:59:40 -0400 Subject: [PATCH 6/8] Delete old file --- src/sig_stfl/xmss/sig_stfl_xmss_sha256.c | 43 ------------------------ 1 file changed, 43 deletions(-) delete mode 100644 src/sig_stfl/xmss/sig_stfl_xmss_sha256.c diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha256.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha256.c deleted file mode 100644 index b2a84fb75c..0000000000 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha256.c +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT - -#include -#include - -#include -#include "sig_stfl_xmss.h" - -// ======================== XMSS10-SHA256 ======================== // - -OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_sha256_h10_new(void) { - - OQS_SIG_STFL *sig = (OQS_SIG_STFL *)malloc(sizeof(OQS_SIG_STFL)); - if (sig == NULL) { - return NULL; - } - memset(sig, 0, sizeof(OQS_SIG_STFL)); - - sig->method_name = "XMSS-SHA2_10_256"; - sig->alg_version = "https://datatracker.ietf.org/doc/html/rfc8391"; - sig->euf_cma = true; - - sig->length_public_key = OQS_SIG_STFL_alg_xmss_sha256_h10_length_pk; - sig->length_signature = OQS_SIG_STFL_alg_xmss_sha256_h10_length_signature; - - sig->keypair = OQS_SIG_STFL_alg_xmss_sha256_h10_keypair; - sig->sign = OQS_SIG_STFL_alg_xmss_sha256_h10_sign; - sig->verify = OQS_SIG_STFL_alg_xmss_sha256_h10_verify; - - return sig; -} - -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_keypair(uint8_t *public_key, uint8_t *secret_key) { - return OQS_ERROR; -} - -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, uint8_t *secret_key) { - return OQS_ERROR; -} - -OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h10_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key) { - return OQS_ERROR; -} From c5bb92305892461460d8882bc73e47e5dc0c4b96 Mon Sep 17 00:00:00 2001 From: Douglas Stebila Date: Fri, 18 Aug 2023 12:31:34 -0400 Subject: [PATCH 7/8] Missing newline --- src/sig_stfl/xmss/external/core_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sig_stfl/xmss/external/core_hash.c b/src/sig_stfl/xmss/external/core_hash.c index 565e571e36..b27ad2ca9b 100644 --- a/src/sig_stfl/xmss/external/core_hash.c +++ b/src/sig_stfl/xmss/external/core_hash.c @@ -35,4 +35,4 @@ int core_hash(const xmss_params *params, #endif return 0; -} \ No newline at end of file +} From 38972615ddd889ab17ae095e49194f9e677f9855 Mon Sep 17 00:00:00 2001 From: Douglas Stebila Date: Fri, 18 Aug 2023 13:07:20 -0400 Subject: [PATCH 8/8] Missing newlines --- src/sig_stfl/xmss/sig_stfl_xmss_sha256_h16.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmss_sha256_h20.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmss_sha512_h10.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmss_sha512_h16.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmss_sha512_h20.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmss_shake128_h10.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmss_shake128_h16.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmss_shake128_h20.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmss_shake256_h10.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmss_shake256_h16.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmss_shake256_h20.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_2.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_4.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_2.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_4.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_8.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_12.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_3.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_6.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_2.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_4.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_2.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_4.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_8.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_12.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_3.c | 2 +- src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_6.c | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h16.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h16.c index 9df67cfe5b..f467b67595 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h16.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h16.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h16_sigs_total(unsigned long lon } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h20.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h20.c index 1fb8054afb..ab7a74410f 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h20.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha256_h20.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_sigs_total(unsigned long lon } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h10.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h10.c index cf067a1d21..b38207c86b 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h10.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h10.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h10_sigs_total(unsigned long lon } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h16.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h16.c index 9ed41dbced..050026311a 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h16.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h16.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h16_sigs_total(unsigned long lon } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h20.c b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h20.c index c9b115053a..b5084201fd 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h20.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_sha512_h20.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha512_h20_sigs_total(unsigned long lon } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h10.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h10.c index 2d7e201bbb..ac43b57b3c 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h10.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h10.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h10_sigs_total(unsigned long l } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h16.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h16.c index 893d42e790..596939f155 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h16.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h16.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h16_sigs_total(unsigned long l } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h20.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h20.c index c926950a17..37da02a13b 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h20.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake128_h20.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake128_h20_sigs_total(unsigned long l } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h10.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h10.c index 70ea7d7182..f0d27e2033 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h10.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h10.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_sigs_total(unsigned long l } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h16.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h16.c index bf40c5721b..38cd5603a9 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h16.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h16.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_sigs_total(unsigned long l } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h20.c b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h20.c index e37b793622..ed1989876e 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h20.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_shake256_h20.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_sigs_total(unsigned long l } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_2.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_2.c index 7833fabcfc..792d7a3559 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_2.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_2.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_sigs_total(unsigned long } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_4.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_4.c index 635d5dda3b..4a1d1cad52 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_4.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h20_4.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h20_4_sigs_total(unsigned long } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_2.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_2.c index 8290e5611e..9bb9c61445 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_2.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_2.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_2_sigs_total(unsigned long } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_4.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_4.c index 73c1145a0d..64a2da1331 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_4.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_4.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_4_sigs_total(unsigned long } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_8.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_8.c index 1e1ecf5e1d..13843351ee 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_8.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h40_8.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h40_8_sigs_total(unsigned long } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_12.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_12.c index b3632382ae..06873a58db 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_12.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_12.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_12_sigs_total(unsigned lon } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_3.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_3.c index 4f78c4b9a0..67183fee79 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_3.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_3.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_3_sigs_total(unsigned long } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_6.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_6.c index 31ec8b88fd..8ab9134684 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_6.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_sha256_h60_6.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_sha256_h60_6_sigs_total(unsigned long } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_2.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_2.c index bba88ff1d2..279146a010 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_2.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_2.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_2_sigs_total(unsigned lo } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_4.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_4.c index 839cf47a3a..961fd8c0a7 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_4.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h20_4.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h20_4_sigs_total(unsigned lo } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_2.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_2.c index 65c3b24718..a72d9b7e67 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_2.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_2.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_2_sigs_total(unsigned lo } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_4.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_4.c index f496b344f9..64c2f8cea3 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_4.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_4.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_4_sigs_total(unsigned lo } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_8.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_8.c index 1451aa51d7..7b1c137e8a 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_8.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h40_8.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h40_8_sigs_total(unsigned lo } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_12.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_12.c index 5863f7094f..41c4317ad9 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_12.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_12.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sigs_total(unsigned l } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_3.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_3.c index 13c3ff0b1c..5a38219f83 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_3.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_3.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_3_sigs_total(unsigned lo } return OQS_SUCCESS; -} \ No newline at end of file +} diff --git a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_6.c b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_6.c index 2b6e7e464f..9c860051d7 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_6.c +++ b/src/sig_stfl/xmss/sig_stfl_xmssmt_shake128_h60_6.c @@ -129,4 +129,4 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_6_sigs_total(unsigned lo } return OQS_SUCCESS; -} \ No newline at end of file +}