Top Description Fields Constructors Methods
org.bouncycastle.crypto.generators

public Class KDFDoublePipelineIterationBytesGenerator

extends Object
implements MacDerivationFunction
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.MacDerivationFunction, org.bouncycastle.crypto.DerivationFunction
Imports
java.math.BigInteger, org.bouncycastle.crypto.DataLengthException, .DerivationParameters, .Mac, .MacDerivationFunction, org.bouncycastle.crypto.params.KDFDoublePipelineIterationParameters, .KeyParameter

This KDF has been defined by the publicly available NIST SP 800-108 specification.

Field Summary

Modifier and TypeField and Description
private byte[]
a

private byte[]
private int
private final int
h

private static final BigInteger
private byte[]
private byte[]
k

private int
private final Mac
private static final BigInteger
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
generateBytes(byte[] out, int outOff, int len)

Implements org.bouncycastle.crypto.DerivationFunction.generateBytes.

private void
public Mac
getMac()

Implements org.bouncycastle.crypto.MacDerivationFunction.getMac.

return the MAC used as the basis for the function

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aback to summary
private byte[] a
fixedInputDataback to summary
private byte[] fixedInputData
generatedBytesback to summary
private int generatedBytes
hback to summary
private final int h
INTEGER_MAXback to summary
private static final BigInteger INTEGER_MAX
iosback to summary
private byte[] ios
kback to summary
private byte[] k
maxSizeExclback to summary
private int maxSizeExcl
prfback to summary
private final Mac prf
TWOback to summary
private static final BigInteger TWO
useCounterback to summary
private boolean useCounter

Constructor Detail

KDFDoublePipelineIterationBytesGeneratorback to summary
public KDFDoublePipelineIterationBytesGenerator(Mac prf)

Method Detail

generateBytesback to summary
public int generateBytes(byte[] out, int outOff, int len) throws DataLengthException, IllegalArgumentException

Implements org.bouncycastle.crypto.DerivationFunction.generateBytes.

generateNextback to summary
private void generateNext()
getMacback to summary
public Mac getMac()

Implements org.bouncycastle.crypto.MacDerivationFunction.getMac.

Doc from org.bouncycastle.crypto.MacDerivationFunction.getMac.

return the MAC used as the basis for the function

Returns:Mac

the Mac.

initback to summary
public void init(DerivationParameters params)

Implements org.bouncycastle.crypto.DerivationFunction.init.