Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/api/test_mldsa_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ wc_static_assert(sizeof(wc_dilithium_params) == sizeof(wc_MlDsaParams));
* DILITHIUM_LEVEL{2,3,5}_*, DILITHIUM_ML_DSA_{44,65,87}_*) lives in its own
* `#define` line in <dilithium.h>, so each is checked separately. */
#define MLDSA_LEGACY_SIZE_ASSERT(LEGACY, CANONICAL) \
wc_static_assert(LEGACY == CANONICAL)
wc_static_assert((LEGACY) == (CANONICAL))

/* LEVEL2 = ML-DSA-44 */
MLDSA_LEGACY_SIZE_ASSERT(ML_DSA_LEVEL2_KEY_SIZE, WC_MLDSA_44_KEY_SIZE);
Expand Down
14 changes: 7 additions & 7 deletions wolfssl/wolfcrypt/wc_mldsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
#include <wolfssl/wolfcrypt/cryptocb.h>
#endif

/* When WOLFSSL_MLDSA_FIPS204_DRAFT is enabled the legacy (pre-FIPS 204)
* no-context sign/verify API is required to handle draft-format signatures. */
#if defined(WOLFSSL_MLDSA_FIPS204_DRAFT) && \
!defined(WOLFSSL_MLDSA_NO_CTX)
#define WOLFSSL_MLDSA_NO_CTX
#endif

/* TEMPORARY: pull in the legacy compatibility shim so its forward-arm
* sub-config gate translation (legacy WOLFSSL_DILITHIUM_* /
* WC_DILITHIUM_* -> canonical WOLFSSL_MLDSA_* / WC_MLDSA_*) and the
Expand Down Expand Up @@ -684,13 +691,6 @@ struct wc_MlDsaKey {
#endif
#endif

/* When WOLFSSL_MLDSA_FIPS204_DRAFT is enabled the legacy (pre-FIPS 204)
* no-context sign/verify API is required to handle draft-format signatures. */
#if defined(WOLFSSL_MLDSA_FIPS204_DRAFT) && \
!defined(WOLFSSL_MLDSA_NO_CTX)
#define WOLFSSL_MLDSA_NO_CTX
#endif

/* Functions */

#ifndef WOLFSSL_MLDSA_VERIFY_ONLY
Expand Down
Loading