1
- package org .bouncycastle .pqc . jcajce .provider ;
1
+ package org .bouncycastle .jcajce .provider . asymmetric ;
2
2
3
3
import org .bouncycastle .asn1 .ASN1ObjectIdentifier ;
4
4
import org .bouncycastle .asn1 .nist .NISTObjectIdentifiers ;
9
9
10
10
public class MLKEM
11
11
{
12
- private static final String PREFIX = "org.bouncycastle.pqc. jcajce.provider" + ".mlkem." ;
12
+ private static final String PREFIX = "org.bouncycastle.jcajce.provider.asymmetric " + ".mlkem." ;
13
13
14
14
public static class Mappings
15
15
extends AsymmetricAlgorithmProvider
@@ -26,7 +26,6 @@ public void configure(ConfigurableProvider provider)
26
26
addKeyFactoryAlgorithm (provider , "ML-KEM-768" , PREFIX + "MLKEMKeyFactorySpi$MLKEM768" , NISTObjectIdentifiers .id_alg_ml_kem_768 , new MLKEMKeyFactorySpi .MLKEM768 ());
27
27
addKeyFactoryAlgorithm (provider , "ML-KEM-1024" , PREFIX + "MLKEMKeyFactorySpi$MLKEM1024" , NISTObjectIdentifiers .id_alg_ml_kem_1024 , new MLKEMKeyFactorySpi .MLKEM1024 ());
28
28
29
-
30
29
provider .addAlgorithm ("KeyPairGenerator.ML-KEM" , PREFIX + "MLKEMKeyPairGeneratorSpi" );
31
30
32
31
addKeyPairGeneratorAlgorithm (provider , "ML-KEM-512" , PREFIX + "MLKEMKeyPairGeneratorSpi$MLKEM512" , NISTObjectIdentifiers .id_alg_ml_kem_512 );
@@ -48,10 +47,14 @@ public void configure(ConfigurableProvider provider)
48
47
addCipherAlgorithm (provider , "ML-KEM-768" , PREFIX + "MLKEMCipherSpi$MLKEM768" , NISTObjectIdentifiers .id_alg_ml_kem_768 );
49
48
addCipherAlgorithm (provider , "ML-KEM-1024" , PREFIX + "MLKEMCipherSpi$MLKEM1024" , NISTObjectIdentifiers .id_alg_ml_kem_1024 );
50
49
51
- registerOid (provider , (ASN1ObjectIdentifier ) null , "ML-KEM" , keyFact );
52
-
50
+ provider .addKeyInfoConverter (NISTObjectIdentifiers .id_alg_ml_kem_512 , keyFact );
51
+ provider .addKeyInfoConverter (NISTObjectIdentifiers .id_alg_ml_kem_768 , keyFact );
52
+ provider .addKeyInfoConverter (NISTObjectIdentifiers .id_alg_ml_kem_1024 , keyFact );
53
+
53
54
provider .addAlgorithm ("Kem.ML-KEM" , PREFIX + "MLKEMSpi" );
54
- provider .addAlgorithm ("Alg.Alias.Kem" , "ML-KEM" );
55
+ provider .addAlgorithm ("Alg.Alias.Kem." + NISTObjectIdentifiers .id_alg_ml_kem_512 , "ML-KEM" );
56
+ provider .addAlgorithm ("Alg.Alias.Kem." + NISTObjectIdentifiers .id_alg_ml_kem_768 , "ML-KEM" );
57
+ provider .addAlgorithm ("Alg.Alias.Kem." + NISTObjectIdentifiers .id_alg_ml_kem_1024 , "ML-KEM" );
55
58
}
56
59
}
57
60
}
0 commit comments