Class 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 value
      byte[] getEncryptedKyberValue()
      Returns the encrypted Kyber value
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 token
        kyberPublicKey - a Kyber public key
        iv - 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 token
        kyberPublicKey - a Kyber public key
        ivParameterSpec - 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