1# NPCX DRBG driver configuration options
2
3# Copyright (c) 2024 Nuvoton Technology Corporation.
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig ENTROPY_NPCX_DRBG
7	bool "NPCX DRBG driver"
8	default y
9	depends on DT_HAS_NUVOTON_NPCX_DRBG_ENABLED && SOC_NPCX9MFP
10	select ENTROPY_HAS_DRIVER
11	help
12	  This option enables the deterministic random bit generator (DRBG)
13	  driver for NPCX family of processors.
14
15if ENTROPY_NPCX_DRBG
16
17choice
18	prompt "DRBG Security Strength Selection"
19	default ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_128B
20	help
21	  The chosen security strength defines the amount of entropy bits
22	  generated internally and passed to the conditioning component.
23
24config ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_112B
25	bool "DRBG security strength 112 bits"
26
27config ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_128B
28	bool "DRBG security strength 128 bits"
29
30config ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_192B
31	bool "DRBG security strength 192 bits"
32
33config ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_256B
34	bool "DRBG security strength 256 bits"
35
36config ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_128B_TEST
37	bool "DRBG security strength 12b bits test"
38
39config ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_256B_TEST
40	bool "DRBG security strength 256 bits test"
41
42endchoice
43
44config ENTROPY_NPCX_DRBG_SECURITY_STRENGTH
45	int
46	default 0 if ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_112B
47	default 1 if ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_128B
48	default 2 if ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_192B
49	default 3 if ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_256B
50	default 4 if ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_128B_TEST
51	default 5 if ENTROPY_NPCX_DRBG_SECURITY_STRENGTH_256B_TEST
52
53config ENTROPY_NPCX_DRBG_RESEED_INTERVAL
54	int "DRBG Reseed Interval"
55	default 100
56	help
57	   Number of gererations allowed until next reseeding.
58
59endif
60