[PATCH 2/2] gpgme: Recognize draft-05 composite signatures
Stavros Kousidis
stavros.kousidis at th-koeln.de
Wed Oct 21 14:44:48 CEST 2026
* src/conversion.c (_gpgme_map_pk_algo): Map composite signature
identifiers 41 through 44 from draft-ietf-openpgp-nist-bp-comp-05
onto the existing ML-DSA family.
* tests/t-pubkey-algo.c (check_mapping): Check these mappings.
--
Keep this draft-specific recognition separate from the RFC 9980
SLH-DSA change. The generic family does not identify the classical
component or parameter set. No cryptographic operation is changed.
Signed-off-by: Stavros Kousidis <stavros.kousidis at th-koeln.de>
---
src/conversion.c | 5 +++++
tests/t-pubkey-algo.c | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/conversion.c b/src/conversion.c
index c6656b70a6c86dcff241e486afc6f593c6b463d3..f6b36bc8d90e561710b98da0a8403a0f23d7025d 100644
--- a/src/conversion.c
+++ b/src/conversion.c
@@ -699,6 +699,11 @@ _gpgme_map_pk_algo (int algo, gpgme_protocol_t protocol)
case 30: /* ML-DSA-65+Ed25519 (RFC9980) */
case 31: /* ML-DSA-87+Ed448 (RFC9980) */
+ /* draft-ietf-openpgp-nist-bp-comp-05 composite signatures. */
+ case 41: /* ML-DSA-65+ECDSA-NIST-P-384 */
+ case 42: /* ML-DSA-87+ECDSA-NIST-P-521 */
+ case 43: /* ML-DSA-65+ECDSA-brainpoolP384r1 */
+ case 44: /* ML-DSA-87+ECDSA-brainpoolP512r1 */
algo = GPGME_PK_MLDSA;
break;
diff --git a/tests/t-pubkey-algo.c b/tests/t-pubkey-algo.c
index eb78b7439ae037f4d2b7965f27d14f8ca3b69a17..07a80f53e6f2665c6db5cf0952ff425da2f231d0 100644
--- a/tests/t-pubkey-algo.c
+++ b/tests/t-pubkey-algo.c
@@ -63,10 +63,10 @@ check_mapping (void)
{ 38, GPGME_PK_MLKEM, "MLKEM" },
{ 39, GPGME_PK_MLKEM, "MLKEM" },
{ 40, GPGME_PK_MLKEM, "MLKEM" },
- { 41, 0, NULL },
- { 42, 0, NULL },
- { 43, 0, NULL },
- { 44, 0, NULL },
+ { 41, GPGME_PK_MLDSA, "MLDSA" },
+ { 42, GPGME_PK_MLDSA, "MLDSA" },
+ { 43, GPGME_PK_MLDSA, "MLDSA" },
+ { 44, GPGME_PK_MLDSA, "MLDSA" },
{ 0, 0, NULL },
{ 26, 0, NULL },
{ 28, 0, NULL },
More information about the Gnupg-devel
mailing list