java.lang.Object
com.ibm.crypto.hdwrCCA.provider.MLKEMKeyAgreement
Deprecated, for removal: This API element is subject to removal in a future version.
This MLKEMKeyAgreement implementation is deprecated and
will be removed in a future release. This is in alignment with the latest NIST
recommendations for post‑quantum cryptography modernization.
Users should transition to the finalized ML-KEM standards.
This class is a concrete implementation of the Service Provider Interface
(SPI) for key agreement using the ML-KEM key agreement algorithm.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Constructor for the ML-KEM key agreement functionality. -
Method Summary
Modifier and TypeMethodDescriptiongenerateSecret(String algorithm) Deprecated, for removal: This API element is subject to removal in a future version.- Creates the shared secret and returns it as a SecretKey object of the specified algorithm.voidinit(Key hybridKey, ECPrivateHWKey ecPrivKey, ECPublicKey ecPubKey, byte[] encryptedValue, byte[] iv) Deprecated, for removal: This API element is subject to removal in a future version.Initializes the MLKEMKeyAgreement object.voidinit(Key hybridKey, ECPrivateHWKey ecPrivKey, ECPublicKey ecPubKey, byte[] encryptedValue, byte[] iv, AlgorithmParameterSpec params) Deprecated, for removal: This API element is subject to removal in a future version.Initializes the MLKEMKeyAgreement object.
-
Constructor Details
-
MLKEMKeyAgreement
public MLKEMKeyAgreement()Deprecated, for removal: This API element is subject to removal in a future version.Constructor for the ML-KEM key agreement functionality.
-
-
Method Details
-
init
public void init(Key hybridKey, ECPrivateHWKey ecPrivKey, ECPublicKey ecPubKey, byte[] encryptedValue, byte[] iv, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException Deprecated, for removal: This API element is subject to removal in a future version.Initializes the MLKEMKeyAgreement object.- Parameters:
hybridKey- A CCA AES CIPHER key or a ML-KEM private keyecPrivKey- An ECPrivateKey created by Bob.ecPubKey- An ECPublicKey created by Alice.aesEncryptedValue- The encrypted AES value generated by a MLKEMDerivationInput.encrypt() call.iv- The AES encryption initialization vectorparams- The algorithm parameters for the key agreement operation- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
init
public void init(Key hybridKey, ECPrivateHWKey ecPrivKey, ECPublicKey ecPubKey, byte[] encryptedValue, byte[] iv) throws InvalidKeyException Deprecated, for removal: This API element is subject to removal in a future version.Initializes the MLKEMKeyAgreement object.- Parameters:
hybridKey- A CCA AES CIPHER key or a ML-KEM private keyecPrivKey- An ECPrivateKey created by Bob.ecPubKey- An ECPublicKey created by Alice.aesEncryptedValue- The encrypted AES value generated by a MLKEMDerivationInput.encrypt() call.iv- The AES encryption initialization vector- Throws:
InvalidKeyException
-
generateSecret
public SecretKey generateSecret(String algorithm) throws NoSuchAlgorithmException, InvalidKeyException Deprecated, for removal: This API element is subject to removal in a future version.- Creates the shared secret and returns it as a SecretKey object of the specified algorithm.- Parameters:
algorithm-keyBitLength-- Returns:
- Throws:
NoSuchAlgorithmExceptionInvalidKeyException
-