- java.lang.Object
-
- com.ibm.crypto.hdwrCCA.provider.KyberKeyAgreement
-
public class KyberKeyAgreement extends java.lang.ObjectThis class is a concrete implementation of the Service Provider Interface (SPI) for key agreement using the CRYSTALS-Kyber key agreement algorithm.
-
-
Constructor Summary
Constructors Constructor Description KyberKeyAgreement()Constructor for the Kyber key agreement functionality.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.crypto.SecretKeygenerateSecret(java.lang.String algorithm)- Creates the shared secret and returns it as a SecretKey object of the specified algorithm.voidinit(java.security.Key hybridKey, ECPrivateHWKey ecPrivKey, ECPublicKey ecPubKey, byte[] encryptedValue, byte[] iv)Initializes the KyberKeyAgreement object.voidinit(java.security.Key hybridKey, ECPrivateHWKey ecPrivKey, ECPublicKey ecPubKey, byte[] encryptedValue, byte[] iv, java.security.spec.AlgorithmParameterSpec params)Initializes the KyberKeyAgreement object.
-
-
-
Method Detail
-
init
public void init(java.security.Key hybridKey, ECPrivateHWKey ecPrivKey, ECPublicKey ecPubKey, byte[] encryptedValue, byte[] iv, java.security.spec.AlgorithmParameterSpec params) throws java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterExceptionInitializes the KyberKeyAgreement object.- Parameters:
hybridKey- A CCA AES CIPHER key or a Kyber private keyecPrivKey- An ECPrivateKey created by Bob.ecPubKey- An ECPublicKey created by Alice.aesEncryptedValue- The encrypted AES value generated by a KyberDerivationInput.encrypt() call.iv- The AES encryption initialization vectorparams- The algorithm parameters for the key agreement operation- Throws:
java.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterException
-
init
public void init(java.security.Key hybridKey, ECPrivateHWKey ecPrivKey, ECPublicKey ecPubKey, byte[] encryptedValue, byte[] iv) throws java.security.InvalidKeyExceptionInitializes the KyberKeyAgreement object.- Parameters:
hybridKey- A CCA AES CIPHER key or a Kyber private keyecPrivKey- An ECPrivateKey created by Bob.ecPubKey- An ECPublicKey created by Alice.aesEncryptedValue- The encrypted AES value generated by a KyberDerivationInput.encrypt() call.iv- The AES encryption initialization vector- Throws:
java.security.InvalidKeyException
-
generateSecret
public javax.crypto.SecretKey generateSecret(java.lang.String algorithm) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException- Creates the shared secret and returns it as a SecretKey object of the specified algorithm.- Parameters:
algorithm-keyBitLength-- Returns:
- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyException
-
-