From 3cdc4a25653a3195271ac28efdebaaddf790cc53 Mon Sep 17 00:00:00 2001 From: Duc Nguyen Date: Thu, 7 Sep 2023 19:05:50 -0400 Subject: [PATCH] build secret_key function separately --- src/sig_stfl/xmss/CMakeLists.txt | 4 +++- src/sig_stfl/xmss/sig_stfl_xmss.h | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sig_stfl/xmss/CMakeLists.txt b/src/sig_stfl/xmss/CMakeLists.txt index 43ac996490..2cf06fc7cb 100644 --- a/src/sig_stfl/xmss/CMakeLists.txt +++ b/src/sig_stfl/xmss/CMakeLists.txt @@ -11,9 +11,11 @@ set(SRCS external/core_hash.c external/xmss.c external/xmss_commons.c external/xmss_core_fast.c - sig_stfl_xmss_secret_key_functions.c ) +add_library(sig_stfl_xmss_secret_key_functions sig_stfl_xmss_secret_key_functions.c) +set(_XMSS_OBJS ${_XMSS_OBJS} $) + if (OQS_ENABLE_SIG_STFL_xmss_sha256_h10) add_library(xmss_sha256_h10 OBJECT sig_stfl_xmss_sha256_h10.c ${SRCS}) target_compile_options(xmss_sha256_h10 PRIVATE -DXMSS_PARAMS_NAMESPACE=xmss_sha256_h10 -DHASH=3) diff --git a/src/sig_stfl/xmss/sig_stfl_xmss.h b/src/sig_stfl/xmss/sig_stfl_xmss.h index 51a2c66ed6..d0f6ae6300 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss.h +++ b/src/sig_stfl/xmss/sig_stfl_xmss.h @@ -4,7 +4,6 @@ #define OQS_SIG_STFL_XMSS_H #include -#include "external/namespace.h" #define XMSS_OID_LEN 4 void OQS_SECRET_KEY_XMSS_free(OQS_SIG_STFL_SECRET_KEY *sk); @@ -499,11 +498,9 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmssmt_shake128_h60_12_sigs_total(unsigned l * Secret key functions */ /* Serialize XMSS secret key data into a byte string */ -#define OQS_SECRET_KEY_XMSS_serialize_key XMSS_NAMESPACE(OQS_SECRET_KEY_XMSS_serialize_key) OQS_STATUS OQS_SECRET_KEY_XMSS_serialize_key(const OQS_SIG_STFL_SECRET_KEY *sk, size_t *sk_len, uint8_t **sk_buf_ptr); /* Deserialize XMSS byte string into an XMSS secret key data */ -#define OQS_SECRET_KEY_XMSS_deserialize_key XMSS_NAMESPACE(OQS_SECRET_KEY_XMSS_deserialize_key) OQS_STATUS OQS_SECRET_KEY_XMSS_deserialize_key(OQS_SIG_STFL_SECRET_KEY *sk, const size_t sk_len, const uint8_t *sk_buf); #endif /* OQS_SIG_STFL_XMSS_H */