Skip to content

Commit b0d61c5

Browse files
Merge pull request #10545 from douzzer/20260527-fixes
20260527-fixes
2 parents 815d48c + f6d6ae6 commit b0d61c5

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

tests/api/test_mldsa_legacy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ wc_static_assert(sizeof(wc_dilithium_params) == sizeof(wc_MlDsaParams));
8989
* DILITHIUM_LEVEL{2,3,5}_*, DILITHIUM_ML_DSA_{44,65,87}_*) lives in its own
9090
* `#define` line in <dilithium.h>, so each is checked separately. */
9191
#define MLDSA_LEGACY_SIZE_ASSERT(LEGACY, CANONICAL) \
92-
wc_static_assert(LEGACY == CANONICAL)
92+
wc_static_assert((LEGACY) == (CANONICAL))
9393

9494
/* LEVEL2 = ML-DSA-44 */
9595
MLDSA_LEGACY_SIZE_ASSERT(ML_DSA_LEVEL2_KEY_SIZE, WC_MLDSA_44_KEY_SIZE);

wolfssl/wolfcrypt/wc_mldsa.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@
5454
#include <wolfssl/wolfcrypt/cryptocb.h>
5555
#endif
5656

57+
/* When WOLFSSL_MLDSA_FIPS204_DRAFT is enabled the legacy (pre-FIPS 204)
58+
* no-context sign/verify API is required to handle draft-format signatures. */
59+
#if defined(WOLFSSL_MLDSA_FIPS204_DRAFT) && \
60+
!defined(WOLFSSL_MLDSA_NO_CTX)
61+
#define WOLFSSL_MLDSA_NO_CTX
62+
#endif
63+
5764
/* TEMPORARY: pull in the legacy compatibility shim so its forward-arm
5865
* sub-config gate translation (legacy WOLFSSL_DILITHIUM_* /
5966
* WC_DILITHIUM_* -> canonical WOLFSSL_MLDSA_* / WC_MLDSA_*) and the
@@ -684,13 +691,6 @@ struct wc_MlDsaKey {
684691
#endif
685692
#endif
686693

687-
/* When WOLFSSL_MLDSA_FIPS204_DRAFT is enabled the legacy (pre-FIPS 204)
688-
* no-context sign/verify API is required to handle draft-format signatures. */
689-
#if defined(WOLFSSL_MLDSA_FIPS204_DRAFT) && \
690-
!defined(WOLFSSL_MLDSA_NO_CTX)
691-
#define WOLFSSL_MLDSA_NO_CTX
692-
#endif
693-
694694
/* Functions */
695695

696696
#ifndef WOLFSSL_MLDSA_VERIFY_ONLY

0 commit comments

Comments
 (0)