#include <cRandomDSA.h>
◆ cRandomDSA()
GrayLib::cRandomDSA::cRandomDSA |
( |
| ) |
|
|
inlinenoexcept |
◆ ~cRandomDSA()
GrayLib::cRandomDSA::~cRandomDSA |
( |
| ) |
|
|
inline |
◆ GetNoise()
HRESULT GrayLib::cRandomDSA::GetNoise |
( |
void * |
pData, |
|
|
size_t |
iSize |
|
) |
| |
|
overridevirtual |
fill array with random bytes. return # bytes filled.
HMAC_DRBG random function with optional additional data: 10.1.2.5 (arabic) + 9.3 (Roman)
Note: Automatically reseeds if reseed_counter is reached or PR is enabled.
- pOut = Buffer to fill
- out_len = Length of the buffer
- Returns
- 0 if successful, or FVE_E_FIPS_RNG_CHECK_FAILED, or DISP_E_OVERFLOW
< Maximum number of requested bytes per call
Implements Gray::IRandomNoise.
◆ InitRandomHmac()
HRESULT GrayLib::cRandomDSA::InitRandomHmac |
( |
const cHashTypeDef * |
pHashType, |
|
|
const BYTE * |
data, |
|
|
size_t |
data_len |
|
) |
| |
Simplified HMAC_DRBG initialization (for use with deterministic ECDSA) Initialization of simplified HMAC_DRBG (never reseeds). (For use with deterministic ECDSA.)
- pHashType = Hash algorithm to use for HMAC_DRBG
- data = Concatenation of entropy string and additional data
- data_len = Length of data in bytes
- Returns
- 0 if successful, or E_POINTER, or E_OUTOFMEMORY.
◆ SetZeroHmac()
void GrayLib::cRandomDSA::SetZeroHmac |
( |
| ) |
|
|
inlinenoexcept |
◆ UNITTEST_FRIEND()
GrayLib::cRandomDSA::UNITTEST_FRIEND |
( |
cRandomDSA |
| ) |
|
◆ UpdateRandomReseed1()
HRESULT GrayLib::cRandomDSA::UpdateRandomReseed1 |
( |
const BYTE * |
pAddData, |
|
|
size_t |
add_len |
|
) |
| |
HMAC_DRBG reseeding (extracts data from entropy source)
- pAddData = Additional data to add to state (Can be NULL)
- add_len = Length of additional data
- Returns
- 0 if successful, or FVE_E_FIPS_RNG_CHECK_FAILED
< Maximum number of additional input bytes
< Maximum size of (re)seed buffer
◆ UpdateRandomReseed2()
void GrayLib::cRandomDSA::UpdateRandomReseed2 |
( |
const BYTE * |
pAddData, |
|
|
size_t |
add_len |
|
) |
| |
HMAC_DRBG update state
- pAddData = Additional data to update state with, or NULL
- add_len = Length of additional data, or 0
- Note
- Additional data is optional, pass NULL and 0 as second third argument if no additional data is being used.
◆ m_HashCtx
◆ m_V
The documentation for this class was generated from the following files: