2017-10-14 06:45:02 +08:00
|
|
|
# Kconfig - random configuration options
|
|
|
|
#
|
|
|
|
# Copyright (c) 2017 Intel Corporation
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
|
|
|
|
|
|
config TEST_RANDOM_GENERATOR
|
|
|
|
bool
|
|
|
|
prompt "Non-random number generator"
|
2017-10-14 07:30:55 +08:00
|
|
|
depends on !ENTROPY_HAS_DRIVER
|
2017-10-14 06:45:02 +08:00
|
|
|
default n
|
|
|
|
help
|
|
|
|
This option signifies that the kernel's random number APIs are
|
|
|
|
permitted to return values that are not truly random.
|
|
|
|
This capability is provided for testing purposes, when a truly random
|
|
|
|
number generator is not available. The non-random number generator
|
|
|
|
should not be used in a production environment.
|
|
|
|
|
2017-10-14 08:07:53 +08:00
|
|
|
choice
|
|
|
|
prompt "Random generator"
|
|
|
|
default ENTROPY_DEVICE_RANDOM_GENERATOR
|
|
|
|
|
2017-10-14 06:45:02 +08:00
|
|
|
config X86_TSC_RANDOM_GENERATOR
|
|
|
|
bool
|
|
|
|
prompt "x86 timestamp counter based number generator"
|
|
|
|
depends on TEST_RANDOM_GENERATOR && X86
|
|
|
|
help
|
|
|
|
This options enables number generator based on timestamp counter
|
|
|
|
of x86 boards, obtained with rdtsc instruction.
|
|
|
|
|
|
|
|
config TIMER_RANDOM_GENERATOR
|
|
|
|
bool
|
|
|
|
prompt "System timer clock based number generator"
|
|
|
|
depends on TEST_RANDOM_GENERATOR
|
|
|
|
help
|
|
|
|
This options enables number generator based on system timer
|
|
|
|
clock. This number generator is not random and used for
|
|
|
|
testing only.
|
2017-10-14 07:06:16 +08:00
|
|
|
|
|
|
|
config ENTROPY_DEVICE_RANDOM_GENERATOR
|
|
|
|
bool
|
|
|
|
prompt "Use entropy driver to generate random numbers"
|
|
|
|
depends on ENTROPY_HAS_DRIVER
|
|
|
|
help
|
|
|
|
Enables a random number generator that uses the enabled
|
|
|
|
hardware entropy gathering driver to generate random
|
|
|
|
numbers.
|
2017-10-14 08:07:53 +08:00
|
|
|
|
|
|
|
config XOROSHIRO_RANDOM_GENERATOR
|
|
|
|
bool
|
|
|
|
prompt "Use Xoroshiro128+ as PRNG"
|
|
|
|
depends on ENTROPY_HAS_DRIVER
|
|
|
|
help
|
|
|
|
Enables the Xoroshiro128+ pseudo-random number generator, that
|
|
|
|
uses the entropy driver as a seed source. This is not a
|
|
|
|
cryptographically secure random number generator.
|
|
|
|
|
|
|
|
It is so named because it uses 128 bits of state.
|
|
|
|
|
|
|
|
endchoice
|