Header file for the NanoCrypto NIST-KDF APIs.
More...
Go to the source code of this file.
|
MOC_EXTERN MSTATUS | KDF_NIST_CounterMode (MOC_SYM(hwAccelDescr hwAccelCtx) ubyte4 counterSize, void *prfContext, const PRF_NIST_108 *prfAlgo, const ubyte *label, ubyte4 labelSize, const ubyte *context, ubyte4 contextSize, ubyte4 keyMaterialEncodingSize, ubyte4 littleEndian, ubyte *keyMaterial, ubyte4 keyMaterialSize) |
| Performs the NIST key derivation function in Counter Mode. More...
|
|
MOC_EXTERN MSTATUS | KDF_NIST_DoublePipelineMode (MOC_SYM(hwAccelDescr hwAccelCtx) ubyte4 counterSize, void *prfContext, const PRF_NIST_108 *prfAlgo, const ubyte *label, ubyte4 labelSize, const ubyte *context, ubyte4 contextSize, ubyte4 keyMaterialEncodingSize, ubyte4 littleEndian, ubyte *keyMaterial, ubyte4 keyMaterialSize) |
| Performs the NIST key derivation function in Double Pipeline Mode. More...
|
|
MOC_EXTERN MSTATUS | KDF_NIST_FeedbackMode (MOC_SYM(hwAccelDescr hwAccelCtx) ubyte4 counterSize, void *prfContext, const PRF_NIST_108 *prfAlgo, const ubyte *iv, ubyte4 ivSize, const ubyte *label, ubyte4 labelSize, const ubyte *context, ubyte4 contextSize, ubyte4 keyMaterialEncodingSize, ubyte4 littleEndian, ubyte *keyMaterial, ubyte4 keyMaterialSize) |
| Performs the NIST key derivation function in Feedback Mode. More...
|
|
This file contains the NanoCrypto NIST-KDF API methods.
nist_kdf.h
◆ KDF_NIST_CounterMode()
MOC_EXTERN MSTATUS KDF_NIST_CounterMode |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) ubyte4 |
counterSize, |
|
|
void * |
prfContext, |
|
|
const PRF_NIST_108 * |
prfAlgo, |
|
|
const ubyte * |
label, |
|
|
ubyte4 |
labelSize, |
|
|
const ubyte * |
context, |
|
|
ubyte4 |
contextSize, |
|
|
ubyte4 |
keyMaterialEncodingSize, |
|
|
ubyte4 |
littleEndian, |
|
|
ubyte * |
keyMaterial, |
|
|
ubyte4 |
keyMaterialSize |
|
) |
| |
Performs the NIST key derivation function in Counter Mode.
- Parameters
-
counterSize | The number of bytes used to encode the counter. This must be 1 to 4. |
prfContext | Pointer to the pseudo random function (PRF) context used by your prfAlgo . |
prfAlgo | The PRF algorithm suite you wish to use. Please see the structure definition and function pointer types in nist_prf.h. |
label | Optional. Buffer holding the label as a byte array. |
labelSize | The length of the label in bytes. |
context | Optional. Buffer holding the context as a byte array. |
contextSize | The length of the context in bytes. |
keyMaterialEncodingSize | The number of bytes used to encode the requested key material size. |
littleEndian | TRUE (1) if the counter and key material size parameters are to be encoded Little Endian. FALSE (0) if otherwise. |
keyMaterial | Buffer that will hold the resulting key material. |
keyMaterialSize | The length of the key material requested in bytes. |
- Returns
OK
(0) if successful; otherwise a negative number error code definition from merrors.h.
nist_kdf.h
◆ KDF_NIST_DoublePipelineMode()
MOC_EXTERN MSTATUS KDF_NIST_DoublePipelineMode |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) ubyte4 |
counterSize, |
|
|
void * |
prfContext, |
|
|
const PRF_NIST_108 * |
prfAlgo, |
|
|
const ubyte * |
label, |
|
|
ubyte4 |
labelSize, |
|
|
const ubyte * |
context, |
|
|
ubyte4 |
contextSize, |
|
|
ubyte4 |
keyMaterialEncodingSize, |
|
|
ubyte4 |
littleEndian, |
|
|
ubyte * |
keyMaterial, |
|
|
ubyte4 |
keyMaterialSize |
|
) |
| |
Performs the NIST key derivation function in Double Pipeline Mode.
- Parameters
-
counterSize | The number of bytes used to encode the optional counter. Enter 0 for no counter and 1 to 4 otherwise. |
prfContext | Pointer to the pseudo random function (PRF) context used by your prfAlgo . |
prfAlgo | The PRF algorithm suite you wish to use. Please see the structure definition and function pointer types in nist_prf.h. |
label | Optional. Buffer holding the label as a byte array. |
labelSize | The length of the label in bytes. |
context | Optional. Buffer holding the context as a byte array. |
contextSize | The length of the context in bytes. |
keyMaterialEncodingSize | The number of bytes used to encode the requested key material size. |
littleEndian | TRUE (1) if the counter and key material size parameters are to be encoded Little Endian. FALSE (0) if otherwise. |
keyMaterial | Buffer that will hold the resulting key material. |
keyMaterialSize | The length of the key material requested in bytes. |
- Returns
OK
(0) if successful; otherwise a negative number error code definition from merrors.h.
nist_kdf.h
◆ KDF_NIST_FeedbackMode()
MOC_EXTERN MSTATUS KDF_NIST_FeedbackMode |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) ubyte4 |
counterSize, |
|
|
void * |
prfContext, |
|
|
const PRF_NIST_108 * |
prfAlgo, |
|
|
const ubyte * |
iv, |
|
|
ubyte4 |
ivSize, |
|
|
const ubyte * |
label, |
|
|
ubyte4 |
labelSize, |
|
|
const ubyte * |
context, |
|
|
ubyte4 |
contextSize, |
|
|
ubyte4 |
keyMaterialEncodingSize, |
|
|
ubyte4 |
littleEndian, |
|
|
ubyte * |
keyMaterial, |
|
|
ubyte4 |
keyMaterialSize |
|
) |
| |
Performs the NIST key derivation function in Feedback Mode.
- Parameters
-
counterSize | The number of bytes used to encode the optional counter. Enter 0 for no counter and 1 to 4 otherwise. |
prfContext | Pointer to the pseudo random function (PRF) context used by your prfAlgo . |
prfAlgo | The PRF algorithm suite you wish to use. Please see the structure definition and function pointer types in nist_prf.h. |
iv | Optional. Buffer holding the initialization vector as a byte array. |
ivSize | The length of the iv in bytes. |
label | BOptional. uffer holding the label as a byte array. |
labelSize | The length of the label in bytes. |
context | Optional. Buffer holding the context as a byte array. |
contextSize | The length of the context in bytes. |
keyMaterialEncodingSize | The number of bytes used to encode the requested key material size. |
littleEndian | TRUE (1) if the counter and key material size parameters are to be encoded Little Endian. FALSE (0) if otherwise. |
keyMaterial | Buffer that will hold the resulting key material. |
keyMaterialSize | The length of the key material requested in bytes. |
- Returns
OK
(0) if successful; otherwise a negative number error code definition from merrors.h.
nist_kdf.h