Interface KDFDoublePipelineIterationModeSpec

All Superinterfaces:
AlgorithmParameterSpec

public interface KDFDoublePipelineIterationModeSpec extends AlgorithmParameterSpec
This interface specifies the set of parameters used to instantiate a DerivationFunction implementing KDF in Double Pipeline Iteration Mode defined in NIST SP 800-108 (Recommendation for Key Derivation Using Pseudorandom Functions).

This interface is bound to the constant DerivationFunction.ALG_KDF_DPI_MODE.

NIST SP800-108 allows for alternative orderings of the counter location (optional), pipeline iteration and fixed input data. The supported format is as follow: K(i) := PRF (KI, A(i)|| {[i]2} || {inputData}).

Since:
3.1
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    Returns the Pseudo Random Function (PRF) algorithm associated with the derivation function.
    short
    Returns the bytes length of the binary representation of the counter (c.f chapter 5.2 of the NIST specification).
    byte[]
    Gets the fixed input data.
    short
    Returns the KDF output length in bytes.
    Gets the secret value for the key derivation function.
  • Method Details

    • getAlgorithm

      byte getAlgorithm()
      Returns the Pseudo Random Function (PRF) algorithm associated with the derivation function.
      Returns:
      the PRF algorithm associated with the derivation function
      See Also:
    • getSecret

      SecretKey getSecret()
      Gets the secret value for the key derivation function. The key type must match the one involved in the PRF algorithm.
      Returns:
      the secret value
    • getInputData

      byte[] getInputData()
      Gets the fixed input data.

      It may be an array view. It may be null.

      Returns:
      the fixed input data
    • getOutputLength

      short getOutputLength()
      Returns the KDF output length in bytes. It specifies the total length of data that can be generated using subsequent calls to DerivationFunction.nextBytes(byte[], short, short) or DerivationFunction.nextBytes(javacard.security.SecretKey).
      Returns:
      the output length
    • getCounterLength

      short getCounterLength()
      Returns the bytes length of the binary representation of the counter (c.f chapter 5.2 of the NIST specification). Must be 0, 1, 2, 3 or 4. A 0 value means that no counter value is used.
      Returns:
      the length of the binary representation of the counter.