Class KDFParameters

java.lang.Object
org.bouncycastle.crypto.params.KDFParameters
All Implemented Interfaces:
DerivationParameters

public class KDFParameters extends Object implements DerivationParameters
Parameters for the key derivation functions that derive keying material from a shared secret and an optional block of additional input: KDF1 and KDF2 of IEEE P1363a / ISO 18033-2 (KDF2 being the ANSI X9.63 KDF, where the additional input is the SharedInfo), and the NIST SP 800-56A concatenation KDF (where it is the OtherInfo).

For historical reasons the additional input is referred to as the "IV".

  • Constructor Details

    • KDFParameters

      public KDFParameters(byte[] shared, byte[] iv)
      Base constructor.
      Parameters:
      shared - the shared secret the keying material is derived from.
      iv - the additional input to the key derivation function, or null if there is none.
      Throws:
      NullPointerException - if shared is null.
  • Method Details

    • getSharedSecret

      public byte[] getSharedSecret()
      Return the shared secret the keying material is derived from.
      Returns:
      the shared secret, never null.
    • getIV

      public byte[] getIV()
      Return the additional input to the key derivation function.
      Returns:
      the additional input, or null if there is none.