From 264f812b70c8941e449740dbc1ae528620089f78 Mon Sep 17 00:00:00 2001 From: "Michael G.A. Holland" Date: Fri, 17 Jul 2026 11:00:08 -0700 Subject: [PATCH] CryptoPkg/BaseCryptLib: ML-DSA updates Include validation check for Context and ContextSize in signature function. Updated ReadMe to show ML-DSA support Signed-off-by: Michael G.A. Holland --- CryptoPkg/Library/BaseCryptLib/Pk/CryptMlDsa.c | 4 ++++ CryptoPkg/Readme.md | 1 + 2 files changed, 5 insertions(+) diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptMlDsa.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptMlDsa.c index 45ea241148..d17459daf9 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptMlDsa.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptMlDsa.c @@ -647,6 +647,10 @@ MlDsaVerify ( return FALSE; } + if ((ContextSize > 0) && (Context == NULL)) { + return FALSE; + } + Ctx = (KEY_CONTEXT *)MlDsaContext; if (Ctx->EvpPkey == NULL) { return FALSE; diff --git a/CryptoPkg/Readme.md b/CryptoPkg/Readme.md index 9518e96821..1e1c911599 100644 --- a/CryptoPkg/Readme.md +++ b/CryptoPkg/Readme.md @@ -235,6 +235,7 @@ also configured. | Ec | N | N | | | C-Full | C-Full | | | Camellia | N | N | | | C-Full | C-Full | | | EdDsa | N | N | | | C-Full | C-Full | | +| MlDsa | N | N | | | C-Full | C-Full | | ## Platform Configuration of Cryptographic Services