RDRAND Entropy Provider (RDP). More...
#include "common.h"
Go to the source code of this file.
Macros | |
#define | QSC_RDP_SEED_MAX 1024000ULL |
The maximum seed size that can be extracted from a single generate call. | |
Functions | |
QSC_EXPORT_API bool | qsc_rdp_generate (uint8_t *output, size_t length) |
Generate an array of random bytes using the RDRAND entropy provider. | |
QSC_EXPORT_API uint16_t | qsc_rdp_uint16 (void) |
Generate a random 16-bit unsigned integer using the RDRAND entropy provider. | |
QSC_EXPORT_API uint32_t | qsc_rdp_uint32 (void) |
Generate a random 32-bit unsigned integer using the RDRAND entropy provider. | |
QSC_EXPORT_API uint64_t | qsc_rdp_uint64 (void) |
Generate a random 64-bit unsigned integer using the RDRAND entropy provider. | |
RDRAND Entropy Provider (RDP).
This module provides access to the Intel RDRAND entropy provider, which extracts hardware-generated random numbers from a CPU with RDRAND support. While RDP is suitable as an entropy source, it is recommended to be combined with other entropy providers to seed a MAC or DRBG function for higher quality random output.
The ACP entropy provider is the recommended alternative in this library for ensuring strong cryptographic randomness.
QSC_EXPORT_API bool qsc_rdp_generate | ( | uint8_t * | output, |
size_t | length ) |
Generate an array of random bytes using the RDRAND entropy provider.
output | [uint8_t*] Pointer to the output byte array. |
length | [size_t] The number of bytes to generate. |
QSC_EXPORT_API uint16_t qsc_rdp_uint16 | ( | void | ) |
Generate a random 16-bit unsigned integer using the RDRAND entropy provider.
QSC_EXPORT_API uint32_t qsc_rdp_uint32 | ( | void | ) |
Generate a random 32-bit unsigned integer using the RDRAND entropy provider.
QSC_EXPORT_API uint64_t qsc_rdp_uint64 | ( | void | ) |
Generate a random 64-bit unsigned integer using the RDRAND entropy provider.