Skip to content

Commit

Permalink
build secret_key function separately
Browse files Browse the repository at this point in the history
  • Loading branch information
ducnguyen-sb committed Sep 7, 2023
1 parent 673e4f6 commit 3cdc4a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/sig_stfl/xmss/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} $<TARGET_OBJECTS:sig_stfl_xmss_secret_key_functions>)

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)
Expand Down
3 changes: 0 additions & 3 deletions src/sig_stfl/xmss/sig_stfl_xmss.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#define OQS_SIG_STFL_XMSS_H

#include <oqs/oqs.h>
#include "external/namespace.h"

#define XMSS_OID_LEN 4
void OQS_SECRET_KEY_XMSS_free(OQS_SIG_STFL_SECRET_KEY *sk);
Expand Down Expand Up @@ -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 */

0 comments on commit 3cdc4a2

Please sign in to comment.