Interface KeyEncapsulationMethod.Client

    • Method Detail

      • init

        void init()
        Initializes the KEM and generates a new key pair.
      • getPublicKey

        byte[] getPublicKey()
        Gets the KEM public key.
        Returns:
        the KEM public key.
      • extractSecret

        byte[] extractSecret​(byte[] encapsulated)
        Extracts the secret from an encapsulation ciphertext.
        Parameters:
        encapsulated - ciphertext to process.
        Returns:
        the secret from an encapsulation ciphertext.
        Throws:
        java.lang.IllegalArgumentException - if encapsulated doesn't have the expected length
        java.lang.NullPointerException - if encapsulated == null
      • getEncapsulationLength

        int getEncapsulationLength()
        Gets the required encapsulation length in bytes.
        Returns:
        the length required for a valid encapsulation ciphertext.