Skip to content

Commit e23ce04

Browse files
committed
Filled in hardcoded oids with new ones - upgrading to draft-13.
1 parent 3d9111d commit e23ce04

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/compositesignatures/SignatureSpi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ public class SignatureSpi
7777
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA65_RSA3072_PKCS15_SHA512, Strings.toByteArray("COMPSIG-MLDSA65-RSA3072-PKCS15-SHA512"));
7878
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA65_RSA4096_PSS_SHA512, Strings.toByteArray("COMPSIG-MLDSA65-RSA4096-PSS-SHA512"));
7979
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA65_RSA4096_PKCS15_SHA512, Strings.toByteArray("COMPSIG-MLDSA65-RSA4096-PKCS15-SHA512"));
80-
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA65_ECDSA_P256_SHA512, Strings.toByteArray("COMPSIG-MLDSA65-ECDSA-P256-SHA512"));
81-
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA65_ECDSA_P384_SHA512, Strings.toByteArray("COMPSIG-MLDSA65-ECDSA-P384-SHA512"));
82-
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA65_ECDSA_brainpoolP256r1_SHA512, Strings.toByteArray("COMPSIG-MLDSA65-ECDSA-brainpoolP256r1-SHA512"));
80+
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA65_ECDSA_P256_SHA512, Strings.toByteArray("COMPSIG-MLDSA65-P256-SHA512"));
81+
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA65_ECDSA_P384_SHA512, Strings.toByteArray("COMPSIG-MLDSA65-P384-SHA512"));
82+
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA65_ECDSA_brainpoolP256r1_SHA512, Strings.toByteArray("COMPSIG-MLDSA65-BP256-SHA512"));
8383
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA65_Ed25519_SHA512, Strings.toByteArray("COMPSIG-MLDSA65-Ed25519-SHA512"));
8484
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA87_ECDSA_P384_SHA512, Strings.toByteArray("COMPSIG-MLDSA87-P384-SHA512"));
8585
domainSeparators.put(IANAObjectIdentifiers.id_MLDSA87_ECDSA_brainpoolP384r1_SHA512, Strings.toByteArray("COMPSIG-MLDSA87-BP384-SHA512"));

prov/src/test/java/org/bouncycastle/jcajce/provider/test/CompositeSignaturesTest.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ public static void main(String[] args)
100100
oidMap.put("id-MLDSA65-RSA3072-PSS-SHA512", IANAObjectIdentifiers.id_MLDSA65_RSA3072_PSS_SHA512.getId());
101101
oidMap.put("id-MLDSA65-RSA3072-PKCS15-SHA512", IANAObjectIdentifiers.id_MLDSA65_RSA3072_PKCS15_SHA512.getId());
102102
oidMap.put("id-MLDSA65-RSA4096-PSS-SHA512", IANAObjectIdentifiers.id_MLDSA65_RSA3072_PSS_SHA512.getId());
103-
oidMap.put("id-MLDSA65-RSA4096-PKCS15-SHA512", "2.16.840.1.114027.80.9.1.7");
104-
oidMap.put("id-MLDSA65-ECDSA-P256-SHA512", "2.16.840.1.114027.80.9.1.8");
105-
oidMap.put("id-MLDSA65-ECDSA-P384-SHA512", "2.16.840.1.114027.80.9.1.9");
106-
oidMap.put("id-MLDSA65-ECDSA-brainpoolP256r1-SHA512", "2.16.840.1.114027.80.9.1.10");
103+
oidMap.put("id-MLDSA65-RSA4096-PKCS15-SHA512", IANAObjectIdentifiers.id_MLDSA65_RSA4096_PKCS15_SHA512.getId());
104+
oidMap.put("id-MLDSA65-ECDSA-P256-SHA512", IANAObjectIdentifiers.id_MLDSA65_ECDSA_P256_SHA512.getId());
105+
oidMap.put("id-MLDSA65-ECDSA-P384-SHA512", IANAObjectIdentifiers.id_MLDSA65_ECDSA_P384_SHA512.getId());
106+
oidMap.put("id-MLDSA65-ECDSA-brainpoolP256r1-SHA512", IANAObjectIdentifiers.id_MLDSA65_ECDSA_brainpoolP256r1_SHA512.getId());
107107
oidMap.put("id-MLDSA65-Ed25519-SHA512", IANAObjectIdentifiers.id_MLDSA65_Ed25519_SHA512.getId());
108108
oidMap.put("id-MLDSA87-ECDSA-P384-SHA512", IANAObjectIdentifiers.id_MLDSA87_ECDSA_P384_SHA512.getId());
109109
oidMap.put("id-MLDSA87-ECDSA-brainpoolP384r1-SHA512", IANAObjectIdentifiers.id_MLDSA87_ECDSA_brainpoolP384r1_SHA512.getId());
@@ -723,14 +723,10 @@ public void compositeSignaturesTest(List<Map<String, Object>> testVectors)
723723
//Ignore IOException
724724
}
725725
System.err.println(tcId);
726-
if (tcId.equals("id-MLDSA65-RSA4096-PSS-SHA512")
727-
|| tcId.equals("id-MLDSA65-RSA4096-PKCS15-SHA512")
728-
|| tcId.equals("id-MLDSA65-ECDSA-P256-SHA512")
729-
|| tcId.equals("id-MLDSA65-ECDSA-P384-SHA512")
730-
|| tcId.equals("id-MLDSA65-ECDSA-brainpoolP256r1-SHA512"))
731-
{
732-
continue;
733-
}
726+
// if (tcId.equals("id-MLDSA65-RSA4096-PSS-SHA512"))
727+
// {
728+
// continue;
729+
// }
734730
if (tcId.contains("id-ML-DSA"))
735731
{
736732
KeyFactory kFact = KeyFactory.getInstance("ML-DSA", "BC");

0 commit comments

Comments
 (0)