![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cRandomTest.h>
Public Member Functions | |
cRandomTest () noexcept | |
~cRandomTest () noexcept | |
virtual HRESULT | GetNoise (void *pData, size_t nSize) override |
HRESULT | InitRandomTest (IRandomNoise *pRand, const BYTE *pUserData, size_t len) |
HRESULT | ctr_drbg_reseed (const BYTE *pAddData, size_t len) |
void | ctr_drbg_update (const BYTE *pAddData, size_t add_len) |
CTR_DRBG update state. More... | |
UNITTEST_FRIEND (cRandomTest) | |
![]() | |
cRandomMixerBase () noexcept | |
virtual | ~cRandomMixerBase () |
void | put_PredictionResistance (bool bPredictionResistance) noexcept |
Public Attributes | |
cCipherAES | m_aes_ctx |
AES context. More... | |
BYTE | counter [16] |
counter (V) More... | |
![]() | |
int | m_nReSeedCounter |
reseed counter More... | |
bool | m_bPredictionResistance |
enable prediction resistance (Automatic reseed before every random generation) More... | |
size_t | m_nEntropyLen |
entropy bytes grabbed on each (re)seed More... | |
int | m_nReSeedInterval |
reseed interval More... | |
IRandomNoise * | m_pRandom |
context for the entropy function More... | |
Static Public Attributes | |
static const int | k_CTR_DRBG_MAX_SEED_INPUT = 384 |
Maximum size of (re)seed buffer. More... | |
static const int | k_CTR_DRBG_BLOCKSIZE = 16 |
Block size used by the cipher. More... | |
static const int | k_CTR_DRBG_KEYSIZE = 32 |
Key size used by the cipher. More... | |
static const int | k_CTR_DRBG_SEEDLEN = (k_CTR_DRBG_KEYSIZE + k_CTR_DRBG_BLOCKSIZE) |
The seed length (counter + AES key) More... | |
pseudo random data for tests. DRBG = Deterministic Random Bit Generator. used only for testing.
|
inlinenoexcept |
|
inlinenoexcept |
HRESULT GraySSL::cRandomTest::ctr_drbg_reseed | ( | const BYTE * | pAddData, |
size_t | len | ||
) |
CTR_DRBG reseeding (extracts data from entropy source)
void GraySSL::cRandomTest::ctr_drbg_update | ( | const BYTE * | pAddData, |
size_t | add_len | ||
) |
CTR_DRBG update state.
|
overridevirtual |
generate random with additional update input
< Maximum number of requested bytes per call
< Maximum number of additional input bytes
Implements Gray::IRandomNoise.
HRESULT GraySSL::cRandomTest::InitRandomTest | ( | IRandomNoise * | pRand, |
const BYTE * | pUserData, | ||
size_t | len | ||
) |
CTR_DRBG initialization
< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256)
GraySSL::cRandomTest::UNITTEST_FRIEND | ( | cRandomTest | ) |
BYTE GraySSL::cRandomTest::counter[16] |
counter (V)
|
static |
Block size used by the cipher.
|
static |
Key size used by the cipher.
|
static |
Maximum size of (re)seed buffer.
|
static |
The seed length (counter + AES key)
cCipherAES GraySSL::cRandomTest::m_aes_ctx |
AES context.