TrustCore SDK Crypto Interface API reference  version 2.0
crypto_interface_random.h
Go to the documentation of this file.
1 /*
2  * crypto_interface_random.h
3  *
4  * Cryptographic Interface header file for declaring RANDOM functions
5  * for the Crypto Interface.
6  *
7  * Copyright 2019-2024 DigiCert, Inc. All Rights Reserved.
8  * Proprietary and Confidential Material.
9  *
10  */
11 
19 #ifndef __CRYPTO_INTERFACE_RANDOM_HEADER__
20 #define __CRYPTO_INTERFACE_RANDOM_HEADER__
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
45 MOC_EXTERN MSTATUS CRYPTO_INTERFACE_registerEntropyFunc (
46  MGetEntropyFunc EntropyFunc,
47  ubyte4 entropyLen
48  );
49 
66  MGetPersoStrCallback GetPersoStr
67  );
68 
83  randomContext **ppRandomContext,
84  ubyte algoId
85  );
86 
96  randomContext **pp_randomContext
97  );
98 
112 MOC_EXTERN MSTATUS CRYPTO_INTERFACE_RANDOM_addEntropyBitEx (
113  randomContext *pRandomContext,
114  ubyte entropyBit
115  );
116 
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 #endif /* __CRYPTO_INTERFACE_RANDOM_HEADER__ */
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_regsterGetPersoStrCallback(MGetPersoStrCallback GetPersoStr)
This function is used to register a function pointer for retrieving the personalization string...
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_registerEntropyFunc(MGetEntropyFunc EntropyFunc, ubyte4 entropyLen)
This function is used to register a function pointer for entropy collection.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_RANDOM_acquireContextEx(randomContext **ppRandomContext, ubyte algoId)
This function is used to acquire an AES based CTR-DRBG random context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_RANDOM_addEntropyBitEx(randomContext *pRandomContext, ubyte entropyBit)
This function is used to add individual bits of entropy into the entropy pool.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_RANDOM_releaseContextEx(randomContext **pp_randomContext)
This function is used to release and free a random context previously created using CRYPTO_INTERFACE_...