xref: /OK3568_Linux_fs/u-boot/lib/rsa/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunconfig RSA
2*4882a593Smuzhiyun	bool "Use RSA Library"
3*4882a593Smuzhiyun	select RSA_FREESCALE_EXP if FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
4*4882a593Smuzhiyun	select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP
5*4882a593Smuzhiyun	help
6*4882a593Smuzhiyun	  RSA support. This enables the RSA algorithm used for FIT image
7*4882a593Smuzhiyun	  verification in U-Boot.
8*4882a593Smuzhiyun	  See doc/uImage.FIT/signature.txt for more details.
9*4882a593Smuzhiyun	  The Modular Exponentiation algorithm in RSA is implemented using
10*4882a593Smuzhiyun	  driver model. So CONFIG_DM needs to be enabled by default for this
11*4882a593Smuzhiyun	  library to function.
12*4882a593Smuzhiyun	  The signing part is build into mkimage regardless of this
13*4882a593Smuzhiyun	  option. The software based modular exponentiation is built into
14*4882a593Smuzhiyun	  mkimage irrespective of this option.
15*4882a593Smuzhiyun
16*4882a593Smuzhiyunconfig SPL_RSA
17*4882a593Smuzhiyun	bool "Use RSA Library within SPL"
18*4882a593Smuzhiyun	depends on RSA
19*4882a593Smuzhiyun
20*4882a593Smuzhiyunif RSA
21*4882a593Smuzhiyunconfig RSA_SOFTWARE_EXP
22*4882a593Smuzhiyun	bool "Enable driver for RSA Modular Exponentiation in software"
23*4882a593Smuzhiyun	depends on DM && RSA
24*4882a593Smuzhiyun	help
25*4882a593Smuzhiyun	  Enables driver for modular exponentiation in software. This is a RSA
26*4882a593Smuzhiyun	  algorithm used in FIT image verification. It required RSA Key as
27*4882a593Smuzhiyun	  input.
28*4882a593Smuzhiyun	  See doc/uImage.FIT/signature.txt for more details.
29*4882a593Smuzhiyun
30*4882a593Smuzhiyunconfig RSA_FREESCALE_EXP
31*4882a593Smuzhiyun	bool "Enable RSA Modular Exponentiation with FSL crypto accelerator"
32*4882a593Smuzhiyun	depends on DM && RSA && FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
33*4882a593Smuzhiyun	help
34*4882a593Smuzhiyun	Enables driver for RSA modular exponentiation using Freescale cryptographic
35*4882a593Smuzhiyun	accelerator - CAAM.
36*4882a593Smuzhiyun
37*4882a593Smuzhiyunconfig RSA_N_SIZE
38*4882a593Smuzhiyun	hex "Define the RSA N size"
39*4882a593Smuzhiyun	help
40*4882a593Smuzhiyun	  The value is depended on different platforms. The RV1126/RV1109 is set to 0x100.
41*4882a593Smuzhiyun	  The RK3568/RK3566 is set to 0x200.
42*4882a593Smuzhiyun
43*4882a593Smuzhiyunconfig RSA_E_SIZE
44*4882a593Smuzhiyun	hex "Define the RSA E size"
45*4882a593Smuzhiyun	help
46*4882a593Smuzhiyun	  The value is depended on different platforms. The RV1126/RV1109 is set to 0x100.
47*4882a593Smuzhiyun	  The RK3568/RK3566 is set to 0x10.
48*4882a593Smuzhiyun
49*4882a593Smuzhiyunconfig RSA_C_SIZE
50*4882a593Smuzhiyun	hex "Define the RSA C size"
51*4882a593Smuzhiyun	help
52*4882a593Smuzhiyun	  The value is depended on different platforms.The RV1126/RV1109 is set to 0x14.
53*4882a593Smuzhiyun	  The RK3568/RK3566 is set to 0x20.
54*4882a593Smuzhiyun
55*4882a593Smuzhiyunendif
56