Developer Guide and Reference for Intel® Cryptography Primitives Library
ippsHashDRBG_EntropyInputCtxInit
Initializes the Entropy input context.
Syntax
IppStatus ippsHashDRBG_EntropyInputCtxInit(IppsHashDRBG_EntropyInputCtx* pEntrInputCtx,
const int entrInputBufBitsLen,
IppEntropyInputSupplier getEntropyInput);
Include Files
ippcp.h
Parameters
pEntrInputCtx |
Pointer to the Entropy input context. |
entrInputBufBitsLen |
The length of the buffer containing the entropy input and the nonce. |
getEntropyInput |
Callback function for supplying the entropy input, providing both an entropy input and a nonce during instantiation, and an entropy input during reseeding or whenever prediction resistance is requested. The callback function must have the following signature: IppStatus _STDCALL getEntropyInput(Ipp8u* pEntropyInput, int* pEntropyInputBitsLen, const int minEntropyInBits, const int maxBitsLen, const int predictionResistanceRequest).
Refer to the NIST SP 800-90C to figure out more about Sources of Randomness. |
Description
The function initializes the IppsHashDRBG_EntropyInputCtx which encapsulates objects necessary for entropy input and nonce generation during the Hash DRBG operations.
Return Values
ippStsNoErr |
Indicates no error. All single operations executed without errors. Any other value indicates an error. |
ippStsNullPtrErr |
pEntrInputCtx is a NULL pointer. |
ippStsOutOfRangeErr |
entrInputBufBitsLen < 1. |