Skip to content

Commit

Permalink
add XMSS-SHAKE256_*_192 parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Duc Tri Nguyen <[email protected]>

make server astyle happy

update xmss.yml

update algorithm list and README

Signed-off-by: Duc Tri Nguyen <[email protected]>

clean up

Signed-off-by: Duc Tri Nguyen <[email protected]>

[trigger downstream]

Signed-off-by: Duc Tri Nguyen <[email protected]>
  • Loading branch information
cothan committed Jun 18, 2024
1 parent 5e31116 commit 64fc2cd
Show file tree
Hide file tree
Showing 17 changed files with 232 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .CMake/alg_support.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,10 @@ cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_shake256_h20 "" ON "OQS_ENABLE_S
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_sha256_h10_192 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_sha256_h16_192 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_sha256_h20_192 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_shake256_h10_192 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_shake256_h16_192 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_shake256_h20_192 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)

cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_4 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmssmt_sha256_h40_2 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ All names other than `ML-KEM` and `ML-DSA` are subject to change. `liboqs` makes
- **SPHINCS+-SHA2**: SPHINCS+-SHA2-128f-simple, SPHINCS+-SHA2-128s-simple, SPHINCS+-SHA2-192f-simple, SPHINCS+-SHA2-192s-simple, SPHINCS+-SHA2-256f-simple, SPHINCS+-SHA2-256s-simple
- **SPHINCS+-SHAKE**: SPHINCS+-SHAKE-128f-simple, SPHINCS+-SHAKE-128s-simple, SPHINCS+-SHAKE-192f-simple, SPHINCS+-SHAKE-192s-simple, SPHINCS+-SHAKE-256f-simple, SPHINCS+-SHAKE-256s-simple
<!--- OQS_TEMPLATE_FRAGMENT_LIST_SIGS_END -->
- **XMSS**: XMSS-SHA2_10_256, XMSS-SHA2_16_256, XMSS-SHA2_20_256, XMSS-SHAKE_10_256, XMSS-SHAKE_16_256, XMSS-SHAKE_20_256, XMSS-SHA2_10_512, XMSS-SHA2_16_512, XMSS-SHA2_20_512, XMSS-SHAKE_10_512, XMSS-SHAKE_16_512, XMSS-SHAKE_20_512, XMSS-SHA2_10_192, XMSS-SHA2_16_192, XMSS-SHA2_20_192, XMSSMT-SHA2_20/2_256, XMSSMT-SHA2_20/4_256, XMSSMT-SHA2_40/2_256, XMSSMT-SHA2_40/4_256, XMSSMT-SHA2_40/8_256, XMSSMT-SHA2_60/3_256, XMSSMT-SHA2_60/6_256, XMSSMT-SHA2_60/12_256, XMSSMT-SHAKE_20/2_256, XMSSMT-SHAKE_20/4_256, XMSSMT-SHAKE_40/2_256, XMSSMT-SHAKE_40/4_256, XMSSMT-SHAKE_40/8_256, XMSSMT-SHAKE_60/3_256, XMSSMT-SHAKE_60/6_256, XMSSMT-SHAKE_60/12_256
- **XMSS**: XMSS-SHA2_10_256, XMSS-SHA2_16_256, XMSS-SHA2_20_256, XMSS-SHAKE_10_256, XMSS-SHAKE_16_256, XMSS-SHAKE_20_256, XMSS-SHA2_10_512, XMSS-SHA2_16_512, XMSS-SHA2_20_512, XMSS-SHAKE_10_512, XMSS-SHAKE_16_512, XMSS-SHAKE_20_512, XMSS-SHA2_10_192, XMSS-SHA2_16_192, XMSS-SHA2_20_192, XMSS-SHAKE256_10_192, XMSS-SHAKE256_16_192, XMSS-SHAKE256_20_192, XMSSMT-SHA2_20/2_256, XMSSMT-SHA2_20/4_256, XMSSMT-SHA2_40/2_256, XMSSMT-SHA2_40/4_256, XMSSMT-SHA2_40/8_256, XMSSMT-SHA2_60/3_256, XMSSMT-SHA2_60/6_256, XMSSMT-SHA2_60/12_256, XMSSMT-SHAKE_20/2_256, XMSSMT-SHAKE_20/4_256, XMSSMT-SHAKE_40/2_256, XMSSMT-SHAKE_40/4_256, XMSSMT-SHAKE_40/8_256, XMSSMT-SHAKE_60/3_256, XMSSMT-SHAKE_60/6_256, XMSSMT-SHAKE_60/12_256
- **LMS**: LMS_SHA256_H5_W1, LMS_SHA256_H5_W2, LMS_SHA256_H5_W4, LMS_SHA256_H5_W8, LMS_SHA256_H10_W1, LMS_SHA256_H10_W2, LMS_SHA256_H10_W4, LMS_SHA256_H10_W8, LMS_SHA256_H15_W1, LMS_SHA256_H15_W2, LMS_SHA256_H15_W4, LMS_SHA256_H15_W8, LMS_SHA256_H20_W1, LMS_SHA256_H20_W2, LMS_SHA256_H20_W4, LMS_SHA256_H20_W8, LMS_SHA256_H25_W1, LMS_SHA256_H25_W2, LMS_SHA256_H25_W4, LMS_SHA256_H25_W8, LMS_SHA256_H5_W8_H5_W8, LMS_SHA256_H10_W4_H5_W8, LMS_SHA256_H10_W8_H5_W8, LMS_SHA256_H10_W2_H10_W2, LMS_SHA256_H10_W4_H10_W4, LMS_SHA256_H10_W8_H10_W8, LMS_SHA256_H15_W8_H5_W8, LMS_SHA256_H15_W8_H10_W8, LMS_SHA256_H15_W8_H15_W8, LMS_SHA256_H20_W8_H5_W8, LMS_SHA256_H20_W8_H10_W8, LMS_SHA256_H20_W8_H15_W8, LMS_SHA256_H20_W8_H20_W8

Note that for algorithms marked with a dagger (†), liboqs contains at least one implementation that uses a large amount of stack space; this may cause failures when run in threads or in constrained environments. For more information, consult the algorithm information sheets in the [docs/algorithms](https://github.com/open-quantum-safe/liboqs/tree/main/docs/algorithms) folder.
Expand Down
3 changes: 3 additions & 0 deletions docs/algorithms/sig_stfl/xmss.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
| XMSS-SHA2_10_192 | | | 48 | 1053 | 1492 |
| XMSS-SHA2_16_192 | | | 48 | 1605 | 1636 |
| XMSS-SHA2_20_192 | | | 48 | 1973 | 1732 |
| XMSS-SHAKE256_10_192 | | | 48 | 1053 | 1492 |
| XMSS-SHAKE256_16_192 | | | 48 | 1605 | 1636 |
| XMSS-SHAKE256_20_192 | | | 48 | 1973 | 1732 |
| XMSSMT-SHA2_20/2_256 | | | 64 | 5998 | 4963 |
| XMSSMT-SHA2_20/4_256 | | | 64 | 10938 | 9251 |
| XMSSMT-SHA2_40/2_256 | | | 64 | 9600 | 5605 |
Expand Down
18 changes: 18 additions & 0 deletions docs/algorithms/sig_stfl/xmss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,24 @@ parameter-sets:
length-public-key: 48
length-secret-key: 1973
length-signature: 1732
- name: XMSS-SHAKE256_10_192
claimed-nist-level:
claimed-security:
length-public-key: 48
length-secret-key: 1053
length-signature: 1492
- name: XMSS-SHAKE256_16_192
claimed-nist-level:
claimed-security:
length-public-key: 48
length-secret-key: 1605
length-signature: 1636
- name: XMSS-SHAKE256_20_192
claimed-nist-level:
claimed-security:
length-public-key: 48
length-secret-key: 1973
length-signature: 1732
- name: XMSSMT-SHA2_20/2_256
claimed-nist-level:
claimed-security:
Expand Down
3 changes: 3 additions & 0 deletions src/oqsconfig.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_sha256_h10_192 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_sha256_h16_192 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_sha256_h20_192 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_shake256_h10_192 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_shake256_h16_192 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_shake256_h20_192 1

#cmakedefine OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_4 1
Expand Down
57 changes: 57 additions & 0 deletions src/sig_stfl/sig_stfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ OQS_API const char *OQS_SIG_STFL_alg_identifier(size_t i) {
OQS_SIG_STFL_alg_xmss_sha256_h10_192,
OQS_SIG_STFL_alg_xmss_sha256_h16_192,
OQS_SIG_STFL_alg_xmss_sha256_h20_192,
OQS_SIG_STFL_alg_xmss_shake256_h10_192,
OQS_SIG_STFL_alg_xmss_shake256_h16_192,
OQS_SIG_STFL_alg_xmss_shake256_h20_192,
OQS_SIG_STFL_alg_xmssmt_sha256_h20_2,
OQS_SIG_STFL_alg_xmssmt_sha256_h20_4,
OQS_SIG_STFL_alg_xmssmt_sha256_h40_2,
Expand Down Expand Up @@ -204,6 +207,24 @@ OQS_API int OQS_SIG_STFL_alg_is_enabled(const char *method_name) {
return 1;
#else
return 0;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h10_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h10_192
return 1;
#else
return 0;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h16_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h16_192
return 1;
#else
return 0;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h20_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h20_192
return 1;
#else
return 0;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_sha256_h20_2)) {
#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2
Expand Down Expand Up @@ -610,6 +631,24 @@ OQS_API OQS_SIG_STFL *OQS_SIG_STFL_new(const char *method_name) {
return OQS_SIG_STFL_alg_xmss_sha256_h20_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h10_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h10_192
return OQS_SIG_STFL_alg_xmss_shake256_h10_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h16_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h16_192
return OQS_SIG_STFL_alg_xmss_shake256_h16_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h20_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h20_192
return OQS_SIG_STFL_alg_xmss_shake256_h20_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_sha256_h20_2)) {
#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2
Expand Down Expand Up @@ -1089,6 +1128,24 @@ OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SIG_STFL_SECRET_KEY_new(const char *method_
return OQS_SECRET_KEY_XMSS_SHA256_H20_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h10_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h10_192
return OQS_SECRET_KEY_XMSS_SHAKE256_H10_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h16_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h16_192
return OQS_SECRET_KEY_XMSS_SHAKE256_H16_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h20_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h20_192
return OQS_SECRET_KEY_XMSS_SHAKE256_H20_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_sha256_h20_2)) {
#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2
Expand Down
5 changes: 4 additions & 1 deletion src/sig_stfl/sig_stfl.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ extern "C"
#define OQS_SIG_STFL_alg_xmss_sha256_h10_192 "XMSS-SHA2_10_192"
#define OQS_SIG_STFL_alg_xmss_sha256_h16_192 "XMSS-SHA2_16_192"
#define OQS_SIG_STFL_alg_xmss_sha256_h20_192 "XMSS-SHA2_20_192"
#define OQS_SIG_STFL_alg_xmss_shake256_h10_192 "XMSS-SHAKE256_10_192"
#define OQS_SIG_STFL_alg_xmss_shake256_h16_192 "XMSS-SHAKE256_16_192"
#define OQS_SIG_STFL_alg_xmss_shake256_h20_192 "XMSS-SHAKE256_20_192"

#define OQS_SIG_STFL_alg_xmssmt_sha256_h20_2 "XMSSMT-SHA2_20/2_256"
#define OQS_SIG_STFL_alg_xmssmt_sha256_h20_4 "XMSSMT-SHA2_20/4_256"
Expand Down Expand Up @@ -126,7 +129,7 @@ extern "C"
/*
* Total number of stateful variants defined above, used to create the tracking array
*/
#define OQS_SIG_STFL_algs_length 64
#define OQS_SIG_STFL_algs_length 67

typedef struct OQS_SIG_STFL_SECRET_KEY OQS_SIG_STFL_SECRET_KEY;

Expand Down
18 changes: 18 additions & 0 deletions src/sig_stfl/xmss/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@ if (OQS_ENABLE_SIG_STFL_xmss_sha256_h20_192)
set(_XMSS_OBJS ${_XMSS_OBJS} $<TARGET_OBJECTS:xmss_sha256_h20_192>)
endif()

if (OQS_ENABLE_SIG_STFL_xmss_shake256_h10_192)
add_library(xmss_shake256_h10_192 OBJECT sig_stfl_xmss_shake256_h10_192.c sig_stfl_xmss_functions.c ${SRCS})
target_compile_options(xmss_shake256_h10_192 PRIVATE -DXMSS_PARAMS_NAMESPACE=xmss_shake256_h10_192 -DHASH=2)
set(_XMSS_OBJS ${_XMSS_OBJS} $<TARGET_OBJECTS:xmss_shake256_h10_192>)
endif()

if (OQS_ENABLE_SIG_STFL_xmss_shake256_h16_192)
add_library(xmss_shake256_h16_192 OBJECT sig_stfl_xmss_shake256_h16_192.c sig_stfl_xmss_functions.c ${SRCS})
target_compile_options(xmss_shake256_h16_192 PRIVATE -DXMSS_PARAMS_NAMESPACE=xmss_shake256_h16_192 -DHASH=2)
set(_XMSS_OBJS ${_XMSS_OBJS} $<TARGET_OBJECTS:xmss_shake256_h16_192>)
endif()

if (OQS_ENABLE_SIG_STFL_xmss_shake256_h20_192)
add_library(xmss_shake256_h20_192 OBJECT sig_stfl_xmss_shake256_h20_192.c sig_stfl_xmss_functions.c ${SRCS})
target_compile_options(xmss_shake256_h20_192 PRIVATE -DXMSS_PARAMS_NAMESPACE=xmss_shake256_h20_192 -DHASH=2)
set(_XMSS_OBJS ${_XMSS_OBJS} $<TARGET_OBJECTS:xmss_shake256_h20_192>)
endif()

if (OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2)
add_library(xmssmt_sha256_h20_2 OBJECT sig_stfl_xmssmt_sha256_h20_2.c sig_stfl_xmssmt_functions.c ${SRCS})
target_compile_options(xmssmt_sha256_h20_2 PRIVATE -DXMSS_PARAMS_NAMESPACE=xmssmt_sha256_h20_2 -DHASH=3)
Expand Down
55 changes: 55 additions & 0 deletions src/sig_stfl/xmss/sig_stfl_xmss.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
* | XMSS-SHA2_16_192 | 0x0e | 1605 | 48 | 1636 | 24 | ❌ | ✅ | ✅ |
* | XMSS-SHA2_20_192 | 0x0f | 1973 | 48 | 1732 | 24 | ❌ | ✅ | ✅ |
*
* | XMSS-SHAKE256_10_192 | 0x13 | 1053 | 48 | 1492 | 24 | ❌ | ✅ | ✅ |
* | XMSS-SHAKE256_16_192 | 0x14 | 1605 | 48 | 1636 | 24 | ❌ | ✅ | ✅ |
* | XMSS-SHAKE256_20_192 | 0x15 | 1973 | 48 | 1732 | 24 | ❌ | ✅ | ✅ |
*
* | XMSSMT-SHA2_20/2_256 | 0x01 | 5998 | 64 | 4963 | 32 | ✅ | ✅ | ❌ |
* | XMSSMT-SHA2_20/4_256 | 0x02 | 10938 | 64 | 9251 | 32 | ✅ | ✅ | ❌ |
* | XMSSMT-SHA2_40/2_256 | 0x03 | 9600 | 64 | 5605 | 32 | ✅ | ✅ | ❌ |
Expand Down Expand Up @@ -309,6 +313,57 @@ OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_sha256_h20_192_sigs_total(unsigned long

#endif

#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h10_192

#define OQS_SIG_STFL_alg_xmss_shake256_h10_192_oid 0x13
#define OQS_SIG_STFL_alg_xmss_shake256_h10_192_length_sk (1053 + XMSS_OID_LEN)
#define OQS_SIG_STFL_alg_xmss_shake256_h10_192_length_pk (48 + XMSS_OID_LEN)
#define OQS_SIG_STFL_alg_xmss_shake256_h10_192_length_signature 1492

OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_shake256_h10_192_new(void);
OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE256_H10_192_new(void);
OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_192_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key);
OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h10_192_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_192_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_192_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_192_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key);

#endif

#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h16_192

#define OQS_SIG_STFL_alg_xmss_shake256_h16_192_oid 0x14
#define OQS_SIG_STFL_alg_xmss_shake256_h16_192_length_sk (1605 + XMSS_OID_LEN)
#define OQS_SIG_STFL_alg_xmss_shake256_h16_192_length_pk (48 + XMSS_OID_LEN)
#define OQS_SIG_STFL_alg_xmss_shake256_h16_192_length_signature 1636

OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_shake256_h16_192_new(void);
OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE256_H16_192_new(void);
OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_192_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key);
OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h16_192_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_192_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_192_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_192_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key);

#endif

#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h20_192

#define OQS_SIG_STFL_alg_xmss_shake256_h20_192_oid 0x15
#define OQS_SIG_STFL_alg_xmss_shake256_h20_192_length_sk (1973 + XMSS_OID_LEN)
#define OQS_SIG_STFL_alg_xmss_shake256_h20_192_length_pk (48 + XMSS_OID_LEN)
#define OQS_SIG_STFL_alg_xmss_shake256_h20_192_length_signature 1732

OQS_API OQS_SIG_STFL *OQS_SIG_STFL_alg_xmss_shake256_h20_192_new(void);
OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SECRET_KEY_XMSS_SHAKE256_H20_192_new(void);
OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_192_keypair(uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key);
OQS_API OQS_STATUS OQS_SIG_STFL_alg_xmss_shake256_h20_192_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_192_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_192_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_192_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key);

#endif

#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2

#define OQS_SIG_STFL_alg_xmssmt_sha256_h20_2_oid 0x01
Expand Down
7 changes: 7 additions & 0 deletions src/sig_stfl/xmss/sig_stfl_xmss_shake256_h10_192.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: (Apache-2.0 OR MIT) AND CC0-1.0

#include "sig_stfl_xmss_xmssmt.c"

// ======================== XMSS-SHAKE256_10_192 ======================== //

XMSS_ALG(, _shake256_h10_192, _SHAKE256_H10_192)
7 changes: 7 additions & 0 deletions src/sig_stfl/xmss/sig_stfl_xmss_shake256_h16_192.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: (Apache-2.0 OR MIT) AND CC0-1.0

#include "sig_stfl_xmss_xmssmt.c"

// ======================== XMSS-SHAKE256_16_192 ======================== //

XMSS_ALG(, _shake256_h16_192, _SHAKE256_H16_192)
7 changes: 7 additions & 0 deletions src/sig_stfl/xmss/sig_stfl_xmss_shake256_h20_192.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: (Apache-2.0 OR MIT) AND CC0-1.0

#include "sig_stfl_xmss_xmssmt.c"

// ======================== XMSS-SHAKE256_20_192 ======================== //

XMSS_ALG(, _shake256_h20_192, _SHAKE256_H20_192)
3 changes: 3 additions & 0 deletions tests/KATs/sig_stfl/kats.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"XMSS-SHA2_10_192": "6efee401869dafee754165a22a6f2f3b467fbaaa4f054bad5b70c7f4c5857133",
"XMSS-SHA2_16_192": "33225885b04da07a95ea63f993d05ee50223d3484f537f324b290d8a317d7bd7",
"XMSS-SHA2_20_192": "cf30df53ca187aabe92d5915e4fd26a118cca1f20af1002f96b63614d04e973b",
"XMSS-SHAKE256_10_192": "b62a1dbc2f8920df2f5a164ed175829ed95d5b3301269b0ab2452cd46b4261d6",
"XMSS-SHAKE256_16_192": "935570c4bc7c61e4cdc0517182766dcee53ceec71f91b8dd969568a7f8b76db1",
"XMSS-SHAKE256_20_192": "18067167a1eeee294bf1f0e3087e468b512f7c0c4cfad9c449dc425aab45336b",
"XMSSMT-SHA2_20/2_256": "9f117294999c886ac6b69d6f32c3fc152599343add210f4464aee5d1ca0ec34d",
"XMSSMT-SHA2_20/4_256": "0c990e8ff8189140e8539b11ae3f85040544fc7d549f8db17d83392569647de9",
"XMSSMT-SHA2_40/2_256": "91605c4b67afb4e17d57ed076e10d3c4287264deea4a46092e374199c041d489",
Expand Down
Loading

0 comments on commit 64fc2cd

Please sign in to comment.