2. CMOX_DRBG ¶
2.1. DRBG public method prototypes ¶
- group CMOX_DRBG_PUBLIC_METHODS
-
Functions
-
cmox_drbg_retval_t
cmox_drbg_cleanup
(
cmox_drbg_handle_t
*
P_pThis
)
-
Cleanup the DRBG handle.
- Parameters :
-
P_pThis – DRBG handle to cleanup
- Returns :
-
cmox_drbg_retval_t DRBG return value
-
cmox_drbg_retval_t
cmox_drbg_init
(
cmox_drbg_handle_t
*
P_pThis
,
const
uint8_t
*
P_pEntropy
,
size_t
P_entropyLen
,
const
uint8_t
*
P_pPersonalString
,
size_t
P_personalStringLen
,
const
uint8_t
*
P_pNonce
,
size_t
P_nonceLen
)
-
Initialize the DRBG engine.
- Parameters :
-
P_pThis – DRBG handler to initialize
P_pEntropy – Buffer of bytes containing the entropy bytes
P_entropyLen – Number of entropy bytes that will be used to seed the DRBG
P_pPersonalString – Buffer of bytes containing the personalization string
P_personalStringLen – Size in bytes of the personalization string
P_pNonce – Buffer of bytes containing nonce data
P_nonceLen – Size in bytes of the nonce
- Returns :
-
cmox_drbg_retval_t DRBG return value
-
cmox_drbg_retval_t
cmox_drbg_reseed
(
cmox_drbg_handle_t
*
P_pThis
,
const
uint8_t
*
P_pEntropy
,
size_t
P_entropyLen
,
const
uint8_t
*
P_pAdditionalInput
,
size_t
P_additionalInputLen
)
-
Reseed the DRBG.
- Parameters :
-
P_pThis – DRBG handler to initialize
P_pEntropy – Buffer of bytes containing the entropy bytes
P_entropyLen – Number of entropy bytes that will be used to seed the DRBG
P_pAdditionalInput – Buffer of bytes containing additional input
P_additionalInputLen – Size in bytes of the additional input
- Returns :
-
cmox_drbg_retval_t DRBG return value
-
cmox_drbg_retval_t
cmox_drbg_generate
(
cmox_drbg_handle_t
*
P_pThis
,
const
uint8_t
*
P_pAdditionalInput
,
size_t
P_additionalInputLen
,
uint8_t
*
P_pOutput
,
size_t
P_desiredOutputLen
)
-
Generation of pseudorandom octets to a buffer.
- Parameters :
-
P_pThis – DRBG handler to initialize
P_pAdditionalInput – Buffer of bytes containing additional input
P_additionalInputLen – Size in bytes of the additional input
P_pOutput – Buffer of bytes where the generated bytes will be stored
P_desiredOutputLen – Desired number of random bytes to produce
- Returns :
-
cmox_drbg_retval_t DRBG return value
-
cmox_drbg_retval_t
cmox_drbg_cleanup
(
cmox_drbg_handle_t
*
P_pThis
)
2.2. DRBG module public types ¶
- group CMOX_DRBG_PUBLIC_TYPES
-
Typedefs
-
typedef
const
struct
cmox_drbg_vtableStruct_st
*
cmox_drbg_vtable_t
-
DRBG Virtual Table.
This type specifies a pointer to the virtual table containing the methods for a particular algorithm (currently the only supported is CTR-DRBG)
-
struct
cmox_drbg_handle_t
-
#include <cmox_drbg.h>
DRBG handle structure definition.
Public Members
-
cmox_drbg_vtable_t
table
-
DRBG virtual table
-
cmox_drbg_vtable_t
table
-
typedef
const
struct
cmox_drbg_vtableStruct_st
*
cmox_drbg_vtable_t