Bouncy Castle Cryptography Library 1.87

org.bouncycastle.crypto.params
Class KDFParameters

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

public class KDFParameters
extends java.lang.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 Summary
KDFParameters(byte[] shared, byte[] iv)
          Base constructor.
 
Method Summary
 byte[] getIV()
          Return the additional input to the key derivation function.
 byte[] getSharedSecret()
          Return the shared secret the keying material is derived from.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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:
java.lang.NullPointerException - if shared is null.
Method Detail

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.

Bouncy Castle Cryptography Library 1.87