- java.lang.Object
-
- com.ibm.crypto.hdwrCCA.provider.KyberDerivationInput
-
public class KyberDerivationInput extends java.lang.Object
This class represents the KyberDerivationInput defined for CRYSTALS-Kyber keys to perform a CRYSTALS-Kyber key agreement .
-
-
Constructor Summary
Constructors Constructor Description KyberDerivationInput(javax.crypto.SecretKey aesKey, KyberPublicKey kyberPublicKey, byte[] iv)
Creates a KyberDerivationInput object and accepts the AES key, Kyber key, and initialization vector needed to perform a CSNDPKE service.KyberDerivationInput(javax.crypto.SecretKey aesKey, KyberPublicKey kyberPublicKey, javax.crypto.spec.IvParameterSpec ivParameterSpec)
Creates a KyberDerivationInput object and accepts the AES key, Kyber key, and initialization vector needed to perform a CSNDPKE service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encrypt()
Calls the CSNDPKE callable service to create the shared key derivation input provided by ICSF.byte[]
getEncryptedAesValue()
Returns the encrypted AES valuebyte[]
getEncryptedKyberValue()
Returns the encrypted Kyber value
-
-
-
Constructor Detail
-
KyberDerivationInput
public KyberDerivationInput(javax.crypto.SecretKey aesKey, KyberPublicKey kyberPublicKey, byte[] iv)
Creates a KyberDerivationInput object and accepts the AES key, Kyber key, and initialization vector needed to perform a CSNDPKE service.- Parameters:
aesKey
- an AES CIPHER key in a CCA key tokenkyberPublicKey
- a Kyber public keyiv
- an initialiation vector
-
KyberDerivationInput
public KyberDerivationInput(javax.crypto.SecretKey aesKey, KyberPublicKey kyberPublicKey, javax.crypto.spec.IvParameterSpec ivParameterSpec)
Creates a KyberDerivationInput object and accepts the AES key, Kyber key, and initialization vector needed to perform a CSNDPKE service.- Parameters:
aesKey
- an AES CIPHER key in a CCA key tokenkyberPublicKey
- a Kyber public keyivParameterSpec
- an initialiation vector
-
-
Method Detail
-
encrypt
public void encrypt() throws java.lang.RuntimeException
Calls the CSNDPKE callable service to create the shared key derivation input provided by ICSF.- Throws:
java.lang.RuntimeException
-
getEncryptedAesValue
public byte[] getEncryptedAesValue()
Returns the encrypted AES value- Returns:
- the encrypted AES value
-
getEncryptedKyberValue
public byte[] getEncryptedKyberValue()
Returns the encrypted Kyber value- Returns:
- the encrypted Kyber value
-
-