TrustCore SDK NanoCrypto API reference  version 7.0
nist_kdf.h
Go to the documentation of this file.
1 /*
2  * nist_kdf.h
3  *
4  * Implementation of the KDFs described in NIST 800-108
5  *
6  * Copyright 2019-2024 DigiCert, Inc. All Rights Reserved.
7  * Proprietary and Confidential Material.
8  *
9  */
10 
21 /*------------------------------------------------------------------*/
22 
23 #ifndef __NIST_KDF_HEADER__
24 #define __NIST_KDF_HEADER__
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
54 MOC_EXTERN MSTATUS KDF_NIST_CounterMode( MOC_SYM(hwAccelDescr hwAccelCtx)
55  ubyte4 counterSize, void* prfContext,
56  const PRF_NIST_108* prfAlgo,
57  const ubyte* label, ubyte4 labelSize,
58  const ubyte* context, ubyte4 contextSize,
59  ubyte4 keyMaterialEncodingSize, ubyte4 littleEndian,
60  ubyte* keyMaterial, ubyte4 keyMaterialSize);
61 
89 MOC_EXTERN MSTATUS KDF_NIST_FeedbackMode( MOC_SYM(hwAccelDescr hwAccelCtx)
90  ubyte4 counterSize, void* prfContext,
91  const PRF_NIST_108* prfAlgo,
92  const ubyte* iv, ubyte4 ivSize,
93  const ubyte* label, ubyte4 labelSize,
94  const ubyte* context, ubyte4 contextSize,
95  ubyte4 keyMaterialEncodingSize, ubyte4 littleEndian,
96  ubyte* keyMaterial, ubyte4 keyMaterialSize);
97 
123 MOC_EXTERN MSTATUS KDF_NIST_DoublePipelineMode( MOC_SYM(hwAccelDescr hwAccelCtx)
124  ubyte4 counterSize, void* prfContext,
125  const PRF_NIST_108* prfAlgo,
126  const ubyte* label, ubyte4 labelSize,
127  const ubyte* context, ubyte4 contextSize,
128  ubyte4 keyMaterialEncodingSize, ubyte4 littleEndian,
129  ubyte* keyMaterial, ubyte4 keyMaterialSize);
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif /* __NIST_KDF_HEADER__ */
136 
Structure that holds a trio of function pointers to the PRF implementations.
Definition: nist_prf.h:123
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.
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.
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.