40 #define RDRAND_RETRY_COUNT 16 43 #define colour &rdrand_entropy 90 DBGC (
colour,
"RDRAND failed to become ready\n" );
#define EBUSY
Device or resource busy.
#define RDRAND_RETRY_COUNT
Number of times to retry RDRAND instruction.
#define colour
Colour for debug messages.
void x86_features(struct x86_features *features)
Get x86 CPU features.
#define ENOTSUP
Operation not supported.
x86 CPU feature detection
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint32_t features
Supported features.
#define MIN_ENTROPY(bits)
Construct a min-entropy fixed-point value.
static int rdrand_entropy_enable(void)
Enable entropy gathering.
struct entropy_source rdrand_entropy __entropy_source(ENTROPY_PREFERRED)
Hardware random number generator entropy source.
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")
uint8_t noise_sample_t
A noise sample.
static int rdrand_get_noise(noise_sample_t *noise)
Get noise sample.
#define DRBG_SECURITY_STRENGTH
Security strength.
#define ENTROPY_PREFERRED
Preferred entropy source.
static void entropy_init(struct entropy_source *source, min_entropy_t min_entropy_per_sample)
Initialise entropy source.
#define CPUID_FEATURES_INTEL_ECX_RDRAND
RDRAND instruction is supported.