Class FipsDH.AgreementParameters

All Implemented Interfaces:
Parameters
Enclosing class:
FipsDH

public static final class FipsDH.AgreementParameters extends FipsAgreementParameters
Parameters for Diffie-Hellman based key agreement.
  • Method Details

    • withDigest

      public FipsDH.AgreementParameters withDigest(FipsAlgorithm digestAlgorithm)
      Add a digest algorithm to process the Z value with.
      Parameters:
      digestAlgorithm - digest algorithm to use.
      Returns:
      a new parameter set, including the digest algorithm
    • withPRF

      public FipsDH.AgreementParameters withPRF(FipsKDF.PRF prfAlgorithm, byte[] salt)
      Add a PRF algorithm and salt to process the Z value with (as in SP 800-56C)
      Parameters:
      prfAlgorithm - PRF represent the MAC/HMAC algorithm to use.
      salt - the salt to use to initialise the PRF
      Returns:
      a new parameter set, including the digest algorithm
    • withKDF

      public FipsDH.AgreementParameters withKDF(FipsKDF.AgreementKDFParametersBuilder kdfType, byte[] iv, int outputSize)
      Add a KDF to process the Z value with. The outputSize parameter determines how many bytes will be generated.
      Parameters:
      kdfType - KDF algorithm type to use for parameter creation.
      iv - the iv parameter for KDF initialization.
      outputSize - the size of the output to be generated from the KDF.
      Returns:
      a new parameter set, the KDF definition.