@@ -3039,9 +3039,9 @@ public void checkCrlECDSAwithDilithiumCreation()
3039
3039
PrivateKey ecPriv = ecKp .getPrivate ();
3040
3040
PublicKey ecPub = ecKp .getPublic ();
3041
3041
3042
- KeyPairGenerator dlKpg = KeyPairGenerator .getInstance ("Dilithium2 " , "BCPQC " );
3042
+ KeyPairGenerator dlKpg = KeyPairGenerator .getInstance ("ML-DSA " , "BC " );
3043
3043
3044
- dlKpg .initialize (DilithiumParameterSpec . dilithium2 );
3044
+ dlKpg .initialize (MLDSAParameterSpec . ml_dsa_44 );
3045
3045
3046
3046
KeyPair dlKp = dlKpg .generateKeyPair ();
3047
3047
@@ -3057,7 +3057,7 @@ public void checkCrlECDSAwithDilithiumCreation()
3057
3057
// create the CRL - version 2
3058
3058
//
3059
3059
ContentSigner sigGen = new JcaContentSignerBuilder ("SHA256withECDSA" ).setProvider (BC ).build (ecPriv );
3060
- ContentSigner altSigGen = new JcaContentSignerBuilder ("Dilithium2 " ).setProvider ("BCPQC " ).build (dlPriv );
3060
+ ContentSigner altSigGen = new JcaContentSignerBuilder ("ML-DSA-44 " ).setProvider ("BC " ).build (dlPriv );
3061
3061
3062
3062
Date now = new Date ();
3063
3063
@@ -3098,7 +3098,7 @@ public void checkCrlECDSAwithDilithiumCreation()
3098
3098
crl .verify (ecPub , BC );
3099
3099
3100
3100
isTrue ("crl primary failed" , crlHolder .isSignatureValid (new JcaContentVerifierProviderBuilder ().setProvider (BC ).build (ecPub )));
3101
- isTrue ("crl secondary failed" , crlHolder .isAlternativeSignatureValid (new JcaContentVerifierProviderBuilder ().setProvider ("BCPQC " ).build (dlPub )));
3101
+ isTrue ("crl secondary failed" , crlHolder .isAlternativeSignatureValid (new JcaContentVerifierProviderBuilder ().setProvider ("BC " ).build (dlPub )));
3102
3102
3103
3103
if (!crl .getIssuerX500Principal ().equals (new X500Principal ("CN=Test CA" )))
3104
3104
{
@@ -4434,9 +4434,9 @@ public void checkCreationDilithiumSigWithECDSASig()
4434
4434
Security .addProvider (new BouncyCastlePQCProvider ());
4435
4435
}
4436
4436
4437
- KeyPairGenerator kpGen = KeyPairGenerator .getInstance ("Dilithium " , "BCPQC " );
4437
+ KeyPairGenerator kpGen = KeyPairGenerator .getInstance ("ML-DSA " , "BC " );
4438
4438
4439
- kpGen .initialize (DilithiumParameterSpec . dilithium2 , new SecureRandom ());
4439
+ kpGen .initialize (MLDSAParameterSpec . ml_dsa_44 , new SecureRandom ());
4440
4440
4441
4441
KeyPair kp = kpGen .generateKeyPair ();
4442
4442
@@ -4462,7 +4462,7 @@ public void checkCreationDilithiumSigWithECDSASig()
4462
4462
//
4463
4463
ContentSigner sigGen = new JcaContentSignerBuilder ("SHA256withECDSA" ).setProvider (BC ).build (ecPrivKey );
4464
4464
4465
- ContentSigner altSigGen = new JcaContentSignerBuilder ("Dilithium2 " ).setProvider ("BCPQC " ).build (privKey );
4465
+ ContentSigner altSigGen = new JcaContentSignerBuilder ("ML-DSA-44 " ).setProvider ("BC " ).build (privKey );
4466
4466
4467
4467
X509v3CertificateBuilder certGen = new JcaX509v3CertificateBuilder (
4468
4468
builder .build (), BigInteger .valueOf (1 ),
@@ -4500,7 +4500,7 @@ public void checkCreationDilithiumSigWithECDSASig()
4500
4500
isTrue ("alt sig alg wrong" , AltSignatureAlgorithm .fromExtensions (certHolder .getExtensions ()).equals (altSigGen .getAlgorithmIdentifier ()));
4501
4501
isTrue ("alt key wrong" , SubjectAltPublicKeyInfo .fromExtensions (certHolder .getExtensions ()).equals (ASN1Primitive .fromByteArray (pubKey .getEncoded ())));
4502
4502
4503
- isTrue ("alt sig value wrong" , certHolder .isAlternativeSignatureValid (new JcaContentVerifierProviderBuilder ().setProvider ("BCPQC " ).build (pubKey )));
4503
+ isTrue ("alt sig value wrong" , certHolder .isAlternativeSignatureValid (new JcaContentVerifierProviderBuilder ().setProvider ("BC " ).build (pubKey )));
4504
4504
}
4505
4505
4506
4506
public void checkCreationComposite ()
@@ -5504,7 +5504,7 @@ private void checkParseCompositePublicKey()
5504
5504
5505
5505
CompositePublicKey compositePublicKey = new CompositePublicKey (subjectPublicKeyInfo );
5506
5506
5507
- isEquals (compositePublicKey .getPublicKeys ().get (0 ).getAlgorithm (), "DILITHIUM2 " );
5507
+ isEquals (compositePublicKey .getPublicKeys ().get (0 ).getAlgorithm (), "ML-DSA-44 " );
5508
5508
isEquals (compositePublicKey .getPublicKeys ().get (1 ).getAlgorithm (), "ECDSA" );
5509
5509
}
5510
5510
catch (Exception e )
@@ -5551,7 +5551,7 @@ private void checkParseAndVerifyCompositeCertificate()
5551
5551
5552
5552
CompositePublicKey compositePublicKey = (CompositePublicKey )certificate .getPublicKey ();
5553
5553
5554
- isEquals (compositePublicKey .getPublicKeys ().get (0 ).getAlgorithm (), "DILITHIUM2 " );
5554
+ isEquals (compositePublicKey .getPublicKeys ().get (0 ).getAlgorithm (), "ML-DSA-44 " );
5555
5555
isEquals (compositePublicKey .getPublicKeys ().get (1 ).getAlgorithm (), "ECDSA" );
5556
5556
5557
5557
certificate .verify (compositePublicKey );
0 commit comments