Skip to content

Commit

Permalink
Block XMSS from secret key tests until after support code has been ad…
Browse files Browse the repository at this point in the history
…ded.
  • Loading branch information
ashman-p committed Sep 13, 2023
1 parent 0552e6e commit d60a429
Showing 1 changed file with 61 additions and 54 deletions.
115 changes: 61 additions & 54 deletions tests/test_sig_stfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,64 +455,71 @@ static OQS_STATUS sig_stfl_test_secret_key(const char *method_name) {
* Temporarily skip algs with long key generation times.
*/

if (0) {

#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h16
} else if (strcmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h16) == 0) {
goto skip_test;
#endif
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h20
} else if (strcmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h20) == 0) {
goto skip_test;
#endif

#ifdef OQS_ENABLE_SIG_STFL_xmss_shake128_h16
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake128_h16)) {
goto skip_test;
#endif
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake128_h20
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake128_h20)) {
goto skip_test;
#endif

#ifdef OQS_ENABLE_SIG_STFL_xmss_sha512_h16
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha512_h16)) {
goto skip_test;
#endif
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha512_h20
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha512_h20)) {
goto skip_test;
#endif

#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h16
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h16)) {
goto skip_test;
#endif
#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h20
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h20)) {
goto skip_test;
#endif

#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h40_2
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_sha256_h40_2)) {
goto skip_test;
#endif
#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h60_3
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_sha256_h60_3)) {
goto skip_test;
#endif

#ifdef OQS_ENABLE_SIG_STFL_xmssmt_shake128_h40_2
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_shake128_h40_2)) {
if (strcmp(method_name, OQS_SIG_STFL_alg_lms_sha256_n32_h5_w1) != 0) {
goto skip_test;
#endif
#ifdef OQS_ENABLE_SIG_STFL_xmssmt_shake128_h60_3
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_shake128_h60_3)) {
goto skip_test;
#endif
} else {
goto keep_going;
}

// if (0) {
//
//#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h16
// } else if (strcmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h16) == 0) {
// goto skip_test;
//#endif
//#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h20
// } else if (strcmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h20) == 0) {
// goto skip_test;
//#endif
//
//#ifdef OQS_ENABLE_SIG_STFL_xmss_shake128_h16
// } else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake128_h16)) {
// goto skip_test;
//#endif
//#ifdef OQS_ENABLE_SIG_STFL_xmss_shake128_h20
// } else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake128_h20)) {
// goto skip_test;
//#endif
//
//#ifdef OQS_ENABLE_SIG_STFL_xmss_sha512_h16
// } else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha512_h16)) {
// goto skip_test;
//#endif
//#ifdef OQS_ENABLE_SIG_STFL_xmss_sha512_h20
// } else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha512_h20)) {
// goto skip_test;
//#endif
//
//#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h16
// } else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h16)) {
// goto skip_test;
//#endif
//#ifdef OQS_ENABLE_SIG_STFL_xmss_shake256_h20
// } else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_shake256_h20)) {
// goto skip_test;
//#endif
//
//#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h40_2
// } else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_sha256_h40_2)) {
// goto skip_test;
//#endif
//#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h60_3
// } else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_sha256_h60_3)) {
// goto skip_test;
//#endif
//
//#ifdef OQS_ENABLE_SIG_STFL_xmssmt_shake128_h40_2
// } else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_shake128_h40_2)) {
// goto skip_test;
//#endif
//#ifdef OQS_ENABLE_SIG_STFL_xmssmt_shake128_h60_3
// } else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_shake128_h60_3)) {
// goto skip_test;
//#endif
// } else {
// goto keep_going;
// }

skip_test:
printf("Skip slow test %s.\n", method_name);
return rc;
Expand Down

0 comments on commit d60a429

Please sign in to comment.