Top Description Fields Constructors Methods
org.bouncycastle.crypto.internal.params

public final Class KDFCounterParameters

extends Object
implements DerivationParameters
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.internal.DerivationParameters
Imports
org.bouncycastle.crypto.internal.DerivationParameters, org.bouncycastle.util.Arrays

This KDF has been defined by the publicly available NIST SP 800-108 specification. NIST SP800-108 allows for alternative orderings of the input fields, meaning that the input can be formated in multiple ways. There are 3 supported formats: - Below [i]_2 is a counter of r-bits length concatenated to the fixedInputData.

This function must be called with the following KDFCounterParameters(): - KI
- The part of the fixedInputData that comes BEFORE the counter OR null
- the part of the fixedInputData that comes AFTER the counter OR null
- the length of the counter in bits (not bytes)

Resulting function calls assuming an 8 bit counter.

Field Summary

Modifier and TypeField and Description
private byte[]
private byte[]
private byte[]
private int
r

Constructor Summary

AccessConstructor and Description
public
KDFCounterParameters(byte[]
the KDF seed
ki
,
byte[]
fixed input data to follow counter.
fixedInputDataCounterSuffix
,
int
length of the counter in bits.
r
)

Base constructor - suffix fixed input data only.

public
KDFCounterParameters(byte[]
the KDF seed
ki
,
byte[]
fixed input data to precede counter
fixedInputDataCounterPrefix
,
byte[]
fixed input data to follow counter.
fixedInputDataCounterSuffix
,
int
length of the counter in bits.
r
)

Base constructor - prefix and suffix fixed input data.

Method Summary

Modifier and TypeMethod and Description
public byte[]
public byte[]
public byte[]
public int
getR()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fixedInputDataCounterPrefixback to summary
private byte[] fixedInputDataCounterPrefix
fixedInputDataCounterSuffixback to summary
private byte[] fixedInputDataCounterSuffix
kiback to summary
private byte[] ki
rback to summary
private int r

Constructor Detail

KDFCounterParametersback to summary
public KDFCounterParameters(byte[] ki, byte[] fixedInputDataCounterSuffix, int r)

Base constructor - suffix fixed input data only.

Parameters
ki:byte[]

the KDF seed

fixedInputDataCounterSuffix:byte[]

fixed input data to follow counter.

r:int

length of the counter in bits.

KDFCounterParametersback to summary
public KDFCounterParameters(byte[] ki, byte[] fixedInputDataCounterPrefix, byte[] fixedInputDataCounterSuffix, int r)

Base constructor - prefix and suffix fixed input data.

Parameters
ki:byte[]

the KDF seed

fixedInputDataCounterPrefix:byte[]

fixed input data to precede counter

fixedInputDataCounterSuffix:byte[]

fixed input data to follow counter.

r:int

length of the counter in bits.

Method Detail

getFixedInputDataCounterPrefixback to summary
public byte[] getFixedInputDataCounterPrefix()
getFixedInputDataCounterSuffixback to summary
public byte[] getFixedInputDataCounterSuffix()
getKIback to summary
public byte[] getKI()
getRback to summary
public int getR()