1# mcux entropy generator driver configuration
2
3# Copyright (c) 2016 ARM Ltd.
4# SPDX-License-Identifier: Apache-2.0
5
6config ENTROPY_MCUX_RNGA
7	bool "MCUX RNGA driver"
8	default y
9	depends on DT_HAS_NXP_KINETIS_RNGA_ENABLED
10	select ENTROPY_HAS_DRIVER
11	help
12	  This option enables the random number generator accelerator (RNGA)
13	  driver based on the MCUX RNGA driver.
14
15config ENTROPY_MCUX_TRNG
16	bool "MCUX TRNG driver"
17	default y
18	depends on DT_HAS_NXP_KINETIS_TRNG_ENABLED
19	select ENTROPY_HAS_DRIVER
20	help
21	  This option enables the true random number generator (TRNG)
22	  driver based on the MCUX TRNG driver.
23
24config ENTROPY_MCUX_RNG
25	bool "MCUX RNG driver"
26	default y
27	depends on DT_HAS_NXP_LPC_RNG_ENABLED
28	select ENTROPY_HAS_DRIVER
29	help
30	  This option enables the true random number generator (TRNG)
31	  driver based on the MCUX RNG driver on LPC Family.
32
33config ENTROPY_MCUX_CAAM
34	bool "MCUX CAAM driver"
35	default y
36	depends on DT_HAS_NXP_IMX_CAAM_ENABLED
37	select ENTROPY_HAS_DRIVER
38	select NOCACHE_MEMORY if ARCH_HAS_NOCACHE_MEMORY_SUPPORT
39	help
40	  This option enables the CAAM driver based on the MCUX
41	  CAAM driver.
42
43#
44# Don't use use the MCUX TRNG as a random source as it is not designed
45# to supply a continuous random stream. Instead, it is used to provide
46# a seed to RNG generator.
47#
48# Use the software implemented xoroshiro RNG.
49# Use CSPRNG for cryptographically secure RNG source.
50#
51choice RNG_GENERATOR_CHOICE
52	default XOSHIRO_RANDOM_GENERATOR if ENTROPY_MCUX_TRNG
53endchoice
54
55choice CSPRNG_GENERATOR_CHOICE
56	default CTR_DRBG_CSPRNG_GENERATOR if ENTROPY_MCUX_TRNG
57endchoice
58
59if ENTROPY_MCUX_CAAM
60
61config ENTRY_MCUX_CAAM_POOL_SIZE
62	int "CAAM random number pool size"
63	range 4 1024
64	default 256
65	help
66	  Buffer length in bytes used to store random bytes generated by
67	  CAAM hardware. Please note, that size of the pool must be a
68	  power of 2.
69
70endif # ENTROPY_MCUX_CAAM
71