|
ReactOS 0.4.17-dev-1005-g171e1de
|
#include "precomp.h"
Go to the source code of this file.
Macros | |
| #define | SYMCRYPT_RNG_AES_KEY_SIZE (32) |
| #define | SYMCRYPT_RNG_AES_KEY_AND_V_SIZE (32 + 16) |
| #define | SYMCRYPT_RNG_AES_MAX_REQUEST_SIZE (1<<16) |
| #define | SYMCRYPT_RNG_AES_MAX_REQUESTS_PER_RESEED ((UINT64)1<<48) |
| #define | TEST_AGAINST_OLD_CODE 0 |
| #define | MAX_CTRMSB64_BLOCKS (1 << 10) |
Variables | |
| static const BYTE | g_abInstantiateEntropyInputPlusNonce [] |
| static const BYTE | g_abReseedEntropy [] |
| static const BYTE | g_abOutput1 [32] |
| static const BYTE | g_expectedStateAfterInstantiate [SYMCRYPT_RNG_AES_KEY_AND_V_SIZE] |
| static const BYTE | g_expectedStateAfterReseed [SYMCRYPT_RNG_AES_KEY_AND_V_SIZE] |
| static const BYTE | g_expectedStateAfterGenerate [SYMCRYPT_RNG_AES_KEY_AND_V_SIZE] |
| #define MAX_CTRMSB64_BLOCKS (1 << 10) |
| #define SYMCRYPT_RNG_AES_KEY_AND_V_SIZE (32 + 16) |
Definition at line 14 of file aesCtrDrbg.c.
| #define SYMCRYPT_RNG_AES_KEY_SIZE (32) |
Definition at line 13 of file aesCtrDrbg.c.
| #define SYMCRYPT_RNG_AES_MAX_REQUEST_SIZE (1<<16) |
Definition at line 15 of file aesCtrDrbg.c.
Definition at line 16 of file aesCtrDrbg.c.
| #define TEST_AGAINST_OLD_CODE 0 |
| FORCEINLINE int SymCryptRngAesAreBlocksIdentical | ( | _In_reads_(SYMCRYPT_AES_BLOCK_SIZE) PCBYTE | pSrc1, |
| _In_reads_(SYMCRYPT_AES_BLOCK_SIZE) PCBYTE | pSrc2 | ||
| ) |
Definition at line 299 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesCheckBlocksNotIdentical().
| VOID SYMCRYPT_CALL SymCryptRngAesBcc | ( | _In_ PSYMCRYPT_AES_EXPANDED_KEY | pKey, |
| _In_reads_(cbData) PCBYTE | pcbData, | ||
| _In_ SIZE_T | cbData, | ||
| _Out_writes_(SYMCRYPT_AES_BLOCK_SIZE) PBYTE | pbResult | ||
| ) |
Definition at line 20 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesDf().
| VOID SYMCRYPT_CALL SymCryptRngAesCheckBlocksNotIdentical | ( | _Inout_updates_(SYMCRYPT_AES_BLOCK_SIZE) PBYTE | pbPreviousBlock, |
| _In_reads_(cbData) PCBYTE | pcbData, | ||
| SIZE_T | cbData | ||
| ) |
Definition at line 341 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesGenerateSmall().
| VOID SYMCRYPT_CALL SymCryptRngAesDf | ( | _In_reads_(cbData) PCBYTE | pcbData, |
| _In_ SIZE_T | cbData, | ||
| _Out_writes_(SYMCRYPT_RNG_AES_INTERNAL_SEED_SIZE) PBYTE | pbSeed | ||
| ) |
Definition at line 39 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesGenerateSmall(), and SymCryptRngAesReseed().
| _Use_decl_annotations_ VOID SYMCRYPT_CALL SymCryptRngAesFips140_2Generate | ( | PSYMCRYPT_RNG_AES_FIPS140_2_STATE | pRngState, |
| PBYTE | pbRandom, | ||
| SIZE_T | cbRandom | ||
| ) |
Definition at line 962 of file aesCtrDrbg.c.
| _Use_decl_annotations_ SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRngAesFips140_2Instantiate | ( | PSYMCRYPT_RNG_AES_FIPS140_2_STATE | pRngState, |
| PCBYTE | pcbSeedMaterial, | ||
| SIZE_T | cbSeedMaterial | ||
| ) |
Definition at line 939 of file aesCtrDrbg.c.
| _Use_decl_annotations_ SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRngAesFips140_2Reseed | ( | PSYMCRYPT_RNG_AES_FIPS140_2_STATE | pRngState, |
| PCBYTE | pcbSeedMaterial, | ||
| SIZE_T | cbSeedMaterial | ||
| ) |
Definition at line 972 of file aesCtrDrbg.c.
| _Use_decl_annotations_ VOID SYMCRYPT_CALL SymCryptRngAesFips140_2Uninstantiate | ( | PSYMCRYPT_RNG_AES_FIPS140_2_STATE | pRngState | ) |
Definition at line 983 of file aesCtrDrbg.c.
| _Use_decl_annotations_ SYMCRYPT_NOINLINE VOID SYMCRYPT_CALL SymCryptRngAesGenerate | ( | PSYMCRYPT_RNG_AES_STATE | pRngState, |
| PBYTE | pbRandom, | ||
| SIZE_T | cbRandom | ||
| ) |
Definition at line 563 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesFips140_2Generate(), and SymCryptRngAesFips140_2Instantiate().
| VOID SYMCRYPT_CALL SymCryptRngAesGenerateBlocks | ( | _In_ PSYMCRYPT_AES_EXPANDED_KEY | pAesKey, |
| _Inout_updates_(SYMCRYPT_AES_BLOCK_SIZE) PBYTE | pV, | ||
| _Out_writes_(cbRandom) PBYTE | pbRandom, | ||
| _In_ SIZE_T | cbRandom | ||
| ) |
Definition at line 163 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesGenerateSmall(), and SymCryptRngAesUpdate().
| VOID SYMCRYPT_CALL SymCryptRngAesGenerateSelftest | ( | void | ) |
Definition at line 918 of file aesCtrDrbg.c.
| SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRngAesGenerateSmall | ( | _Inout_ PSYMCRYPT_RNG_AES_STATE | pRngState, |
| _Out_writes_(cbRandom) PBYTE | pbRandom, | ||
| SIZE_T | cbRandom, | ||
| _In_reads_opt_(cbAdditionalInput) PCBYTE | pbAdditionalInput, | ||
| SIZE_T | cbAdditionalInput | ||
| ) |
Definition at line 436 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesGenerate(), and SymCryptRngAesTestGenerate().
| _Use_decl_annotations_ SYMCRYPT_NOINLINE SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRngAesInstantiate | ( | PSYMCRYPT_RNG_AES_STATE | pRngState, |
| PCBYTE | pcbSeedMaterial, | ||
| SIZE_T | cbSeedMaterial | ||
| ) |
Definition at line 527 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesFips140_2Instantiate(), and SymCryptRngAesTestInstantiate().
| VOID SYMCRYPT_CALL SymCryptRngAesInstantiateSelftest | ( | void | ) |
Definition at line 890 of file aesCtrDrbg.c.
| _Use_decl_annotations_ SYMCRYPT_NOINLINE SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRngAesReseed | ( | PSYMCRYPT_RNG_AES_STATE | pRngState, |
| PCBYTE | pcbSeedMaterial, | ||
| SIZE_T | cbSeedMaterial | ||
| ) |
Definition at line 603 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesFips140_2Reseed(), SymCryptRngAesInstantiate(), and SymCryptRngAesTestReseed().
| VOID SYMCRYPT_CALL SymCryptRngAesReseedSelftest | ( | void | ) |
Definition at line 904 of file aesCtrDrbg.c.
| VOID SYMCRYPT_CALL SymCryptRngAesTestGenerate | ( | PSYMCRYPT_RNG_AES_STATE | pRngState | ) |
Definition at line 800 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesGenerateSelftest().
| VOID SYMCRYPT_CALL SymCryptRngAesTestInstantiate | ( | PSYMCRYPT_RNG_AES_STATE | pRngState | ) |
Definition at line 727 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesInstantiateSelftest().
| VOID SYMCRYPT_CALL SymCryptRngAesTestReseed | ( | PSYMCRYPT_RNG_AES_STATE | pRngState | ) |
Definition at line 763 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesReseedSelftest().
| VOID SYMCRYPT_CALL SymCryptRngAesTestUninstantiate | ( | PSYMCRYPT_RNG_AES_STATE | pRngState | ) |
Definition at line 864 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesGenerateSelftest(), SymCryptRngAesInstantiateSelftest(), and SymCryptRngAesReseedSelftest().
| _Use_decl_annotations_ SYMCRYPT_NOINLINE VOID SYMCRYPT_CALL SymCryptRngAesUninstantiate | ( | PSYMCRYPT_RNG_AES_STATE | pRngState | ) |
Definition at line 643 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesFips140_2Uninstantiate(), and SymCryptRngAesTestUninstantiate().
| VOID SYMCRYPT_CALL SymCryptRngAesUpdate | ( | _Inout_ PSYMCRYPT_RNG_AES_STATE | pState, |
| _In_reads_opt_(SYMCRYPT_RNG_AES_INTERNAL_SEED_SIZE) PCBYTE | pbProvidedData, | ||
| _In_opt_ PSYMCRYPT_AES_EXPANDED_KEY | pAesKey | ||
| ) |
Definition at line 380 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesGenerateSmall(), and SymCryptRngAesReseed().
Definition at line 654 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesTestInstantiate().
Definition at line 683 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesTestGenerate().
Definition at line 672 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesTestReseed().
|
static |
Definition at line 715 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesTestGenerate().
|
static |
Definition at line 691 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesTestInstantiate(), and SymCryptRngAesTestReseed().
|
static |
Definition at line 703 of file aesCtrDrbg.c.
Referenced by SymCryptRngAesTestGenerate(), and SymCryptRngAesTestReseed().