|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.jcajce.spec.KBKDFParameterSpec
Derivation parameters for the NIST SP 800-108 Rev. 1 key-based key derivation functions (, "KBKDF-FEEDBACK-HMACSHA256", "KBKDF-PIPELINE-HMACSHA256", []): the input key K_IN, the fixed input data, the output length, the counter length and, for feedback mode, the IV.
The KBKDFParameterSpec(byte[], byte[], byte[], int) constructor builds the fixed input data in
the layout the standard's Section 4 suggests, Label || 0x00 || Context || [L]_32 with L the output length
in bits, and uses a 32-bit counter. The counter precedes the fixed input data in counter mode, and
follows the chaining value in feedback and double-pipeline mode; a counter length of 0 omits the
counter in those two modes, as the standard allows.
| Constructor Summary | |
KBKDFParameterSpec(byte[] keyIn,
byte[] label,
byte[] context,
int outputLength)
The standard layout: Label || 0x00 || Context || [L]_32, with a 32-bit counter. |
|
KBKDFParameterSpec(byte[] keyIn,
byte[] fixedInputData,
int outputLength,
int counterBits)
Caller-supplied fixed input data. |
|
| Method Summary | |
int |
getCounterBits()
|
byte[] |
getFixedInputData()
|
byte[] |
getIV()
|
byte[] |
getKeyIn()
|
int |
getOutputLength()
|
KBKDFParameterSpec |
withIV(byte[] iv)
Return a copy of this spec with the IV feedback mode chains from. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public KBKDFParameterSpec(byte[] keyIn,
byte[] label,
byte[] context,
int outputLength)
keyIn - the input key K_IN.label - the label, may be null.context - the context, may be null.outputLength - the number of bytes to derive.
public KBKDFParameterSpec(byte[] keyIn,
byte[] fixedInputData,
int outputLength,
int counterBits)
keyIn - the input key K_IN.fixedInputData - the fixed input data, may be null.outputLength - the number of bytes to derive.counterBits - the counter length in bits: 8, 16, 24 or 32, or 0 for no counter (feedback and
double-pipeline mode only).| Method Detail |
public KBKDFParameterSpec withIV(byte[] iv)
iv - the IV, may be null for an empty IV.
public byte[] getKeyIn()
public byte[] getFixedInputData()
public int getOutputLength()
public int getCounterBits()
public byte[] getIV()
|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||