diff --git a/prov/src/test/java/org/bouncycastle/jce/provider/test/PKCS12StoreTest.java b/prov/src/test/java/org/bouncycastle/jce/provider/test/PKCS12StoreTest.java index 05d2ff588e..3a1dcc3f43 100644 --- a/prov/src/test/java/org/bouncycastle/jce/provider/test/PKCS12StoreTest.java +++ b/prov/src/test/java/org/bouncycastle/jce/provider/test/PKCS12StoreTest.java @@ -21,8 +21,6 @@ import java.security.spec.RSAPublicKeySpec; import java.util.Enumeration; -import javax.swing.KeyStroke; - import org.bouncycastle.asn1.ASN1BMPString; import org.bouncycastle.asn1.ASN1Encodable; import org.bouncycastle.asn1.ASN1InputStream; @@ -48,12 +46,12 @@ import org.bouncycastle.asn1.x509.KeyPurposeId; import org.bouncycastle.internal.asn1.misc.MiscObjectIdentifiers; import org.bouncycastle.jcajce.PKCS12StoreParameter; +import org.bouncycastle.jcajce.spec.MLDSAParameterSpec; import org.bouncycastle.jce.PKCS12Util; import org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.jce.provider.JDKPKCS12StoreParameter; import org.bouncycastle.jce.provider.X509CertificateObject; -import org.bouncycastle.pqc.jcajce.spec.DilithiumParameterSpec; import org.bouncycastle.pqc.jcajce.spec.FalconParameterSpec; import org.bouncycastle.pqc.jcajce.spec.NTRUParameterSpec; import org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec; @@ -1097,13 +1095,13 @@ private void testGOSTStore() private void testDilithiumStore() throws Exception { - KeyPairGenerator kpg = KeyPairGenerator.getInstance("Dilithium", "BC"); + KeyPairGenerator kpg = KeyPairGenerator.getInstance("ML-DSA", "BC"); - kpg.initialize(DilithiumParameterSpec.dilithium3); + kpg.initialize(MLDSAParameterSpec.ml_dsa_65); KeyPair kp = kpg.generateKeyPair(); - Certificate cert = TestUtils.createSelfSignedCert("CN=Dilithium Test", "Dilithium3", kp); + Certificate cert = TestUtils.createSelfSignedCert("CN=Dilithium Test", "ML-DSA-65", kp); KeyStore pkcs12 = KeyStore.getInstance("PKCS12", BC); diff --git a/prov/src/test/java/org/bouncycastle/jce/provider/test/TestUtils.java b/prov/src/test/java/org/bouncycastle/jce/provider/test/TestUtils.java index 12a2756d30..33d999849b 100644 --- a/prov/src/test/java/org/bouncycastle/jce/provider/test/TestUtils.java +++ b/prov/src/test/java/org/bouncycastle/jce/provider/test/TestUtils.java @@ -74,7 +74,7 @@ class TestUtils algIds.put("SHA1withECDSA", new AlgorithmIdentifier(X9ObjectIdentifiers.ecdsa_with_SHA1)); algIds.put("SHA256withECDSA", new AlgorithmIdentifier(X9ObjectIdentifiers.ecdsa_with_SHA256)); algIds.put("Ed448", new AlgorithmIdentifier(EdECObjectIdentifiers.id_Ed448)); - algIds.put("Dilithium3", new AlgorithmIdentifier(NISTObjectIdentifiers.id_ml_dsa_65)); + algIds.put("ML-DSA-65", new AlgorithmIdentifier(NISTObjectIdentifiers.id_ml_dsa_65)); algIds.put("Falcon-512", new AlgorithmIdentifier(BCObjectIdentifiers.falcon_512)); algIds.put("SPHINCS+", new AlgorithmIdentifier(BCObjectIdentifiers.sphincsPlus_sha2_128f_r3)); } diff --git a/prov/src/test/java/org/bouncycastle/pqc/jcajce/provider/test/DilithiumKeyPairGeneratorTest.java b/prov/src/test/java/org/bouncycastle/pqc/jcajce/provider/test/DilithiumKeyPairGeneratorTest.java index 4126843976..e31e614a9a 100644 --- a/prov/src/test/java/org/bouncycastle/pqc/jcajce/provider/test/DilithiumKeyPairGeneratorTest.java +++ b/prov/src/test/java/org/bouncycastle/pqc/jcajce/provider/test/DilithiumKeyPairGeneratorTest.java @@ -7,7 +7,6 @@ import java.security.Security; import org.bouncycastle.asn1.ASN1ObjectIdentifier; -import org.bouncycastle.asn1.bc.BCObjectIdentifiers; import org.bouncycastle.asn1.nist.NISTObjectIdentifiers; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.pqc.jcajce.spec.DilithiumParameterSpec; @@ -43,9 +42,9 @@ public void testKeyPairGeneratorNames() }; String[] algs = new String[]{ - "DILITHIUM2", - "DILITHIUM3", - "DILITHIUM5" + "ML-DSA-44", + "ML-DSA-65", + "ML-DSA-87" }; for (int i = 0; i != oids.length; i++)