Bouncy Castle Cryptography Library 1.87

org.bouncycastle.jcajce.spec
Class OneStepKDFParameterSpec

java.lang.Object
  extended byorg.bouncycastle.jcajce.spec.OneStepKDFParameterSpec
All Implemented Interfaces:
java.security.spec.AlgorithmParameterSpec

public class OneStepKDFParameterSpec
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec

Derivation parameters for the NIST SP 800-56C Rev. 2 Section 4.1 one-step key derivation function (, "ONESTEP-HMACSHA256", "ONESTEP-KMAC128", []): the shared secret Z, the FixedInfo, the output length, and for the HMAC and KMAC options an optional salt.


Constructor Summary
OneStepKDFParameterSpec(byte[] z, byte[] salt, byte[] fixedInfo, int outputLength)
           
OneStepKDFParameterSpec(byte[] z, byte[] fixedInfo, int outputLength)
          Hash option, or HMAC/KMAC with the standard's default salt.
 
Method Summary
 byte[] getFixedInfo()
           
 int getOutputLength()
           
 byte[] getSalt()
           
 byte[] getZ()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneStepKDFParameterSpec

public OneStepKDFParameterSpec(byte[] z,
                               byte[] fixedInfo,
                               int outputLength)
Hash option, or HMAC/KMAC with the standard's default salt.

Parameters:
z - the shared secret.
fixedInfo - the FixedInfo, may be null.
outputLength - the number of bytes to derive.

OneStepKDFParameterSpec

public OneStepKDFParameterSpec(byte[] z,
                               byte[] salt,
                               byte[] fixedInfo,
                               int outputLength)
Parameters:
z - the shared secret.
salt - the salt keying HMAC or KMAC, or null for the standard's default salt; ignored by the hash option.
fixedInfo - the FixedInfo, may be null.
outputLength - the number of bytes to derive.
Method Detail

getZ

public byte[] getZ()

getSalt

public byte[] getSalt()
Returns:
the salt, or null for the default salt.

getFixedInfo

public byte[] getFixedInfo()

getOutputLength

public int getOutputLength()

Bouncy Castle Cryptography Library 1.87