Package org.bouncycastle.crypto.fips
Class FipsKDF.FeedbackModeParametersBuilder
- java.lang.Object
-
- org.bouncycastle.crypto.fips.FipsParameters
-
- org.bouncycastle.crypto.fips.FipsKDF.FeedbackModeParametersBuilder
-
- All Implemented Interfaces:
Parameters
- Enclosing class:
- FipsKDF
public static final class FipsKDF.FeedbackModeParametersBuilder extends FipsParameters
Parameters for the Feedback Mode parameters builder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FipsKDF.FeedbackModeParametersusing(byte[] ki, byte[] iv, byte[] fixedInputData)Return a new parameter set for ki and a prefix.FipsKDF.FeedbackModeParametersusing(byte[] ki, byte[] iv, byte[] label, byte[] context, int L)Build method for parameters which builds fixed input as outlined in SP 800-108 with the fixed input as a prefix, or suffix, to the counter.FipsKDF.FeedbackModeParametersBuilderwithPRF(FipsKDF.PRF prf)Return a new parameters builder based around the passed in PRF.FipsKDF.FeedbackModeParametersBuilderwithR(int r)Return a new parameters builder based around the passed in counter size.FipsKDF.FeedbackModeParametersBuilderwithRAndLocation(int r, FipsKDF.CounterLocation counterLocation)Return a new parameters builder based around the passed in counter size and counter position.-
Methods inherited from class org.bouncycastle.crypto.fips.FipsParameters
getAlgorithm
-
-
-
-
Method Detail
-
withPRF
public FipsKDF.FeedbackModeParametersBuilder withPRF(FipsKDF.PRF prf)
Return a new parameters builder based around the passed in PRF.- Parameters:
prf- the PRF to be used in the final KDF.- Returns:
- a new parameters builder.
-
withR
public FipsKDF.FeedbackModeParametersBuilder withR(int r)
Return a new parameters builder based around the passed in counter size. The counter will be after the iteration data.- Parameters:
r- the length in bits of the counter to be used.- Returns:
- a new parameters builder.
-
withRAndLocation
public FipsKDF.FeedbackModeParametersBuilder withRAndLocation(int r, FipsKDF.CounterLocation counterLocation)
Return a new parameters builder based around the passed in counter size and counter position.- Parameters:
r- the length in bits of the counter to be used.counterLocation- the location of the counter in data passed to the PRF during calculation.- Returns:
- a new parameters builder.
-
using
public FipsKDF.FeedbackModeParameters using(byte[] ki, byte[] iv, byte[] fixedInputData)
Return a new parameter set for ki and a prefix.- Parameters:
ki- derivation key for the KDF.iv- the IV to use at the start of the calculation.fixedInputData- fixed input data to use in calculation.- Returns:
- a FeedbackModeParameters object.
-
using
public FipsKDF.FeedbackModeParameters using(byte[] ki, byte[] iv, byte[] label, byte[] context, int L)
Build method for parameters which builds fixed input as outlined in SP 800-108 with the fixed input as a prefix, or suffix, to the counter.- Parameters:
ki- input key.iv- initialization vector.label- label - fixed input component.context- context - fixed input component.L- number of bits per request for the KDF these parameters will initialise - fixed input component.- Returns:
- a FeedbackModeParameters object.
-
-