xref: /rk3399_rockchip-uboot/lib/rsa/Kconfig (revision 781ee9b3938c7c397359dc632e032ce413091c6f)
1d9f23c7fSRuchika Guptaconfig RSA
2d9f23c7fSRuchika Gupta	bool "Use RSA Library"
3f4e9ff71SGeorge McCollister	select RSA_FREESCALE_EXP if FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
4d9f23c7fSRuchika Gupta	select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP
5d9f23c7fSRuchika Gupta	help
6d9f23c7fSRuchika Gupta	  RSA support. This enables the RSA algorithm used for FIT image
7d9f23c7fSRuchika Gupta	  verification in U-Boot.
8d9f23c7fSRuchika Gupta	  See doc/uImage.FIT/signature.txt for more details.
973223f0eSSimon Glass	  The Modular Exponentiation algorithm in RSA is implemented using
1073223f0eSSimon Glass	  driver model. So CONFIG_DM needs to be enabled by default for this
1173223f0eSSimon Glass	  library to function.
1273223f0eSSimon Glass	  The signing part is build into mkimage regardless of this
1373223f0eSSimon Glass	  option. The software based modular exponentiation is built into
1473223f0eSSimon Glass	  mkimage irrespective of this option.
15d9f23c7fSRuchika Gupta
1651c14cd1STeddy Reedconfig SPL_RSA
1751c14cd1STeddy Reed	bool "Use RSA Library within SPL"
1851c14cd1STeddy Reed	depends on RSA
1951c14cd1STeddy Reed
20d9f23c7fSRuchika Guptaif RSA
21d9f23c7fSRuchika Guptaconfig RSA_SOFTWARE_EXP
22d9f23c7fSRuchika Gupta	bool "Enable driver for RSA Modular Exponentiation in software"
23d9f23c7fSRuchika Gupta	depends on DM && RSA
24d9f23c7fSRuchika Gupta	help
25d9f23c7fSRuchika Gupta	  Enables driver for modular exponentiation in software. This is a RSA
26d9f23c7fSRuchika Gupta	  algorithm used in FIT image verification. It required RSA Key as
27d9f23c7fSRuchika Gupta	  input.
28d9f23c7fSRuchika Gupta	  See doc/uImage.FIT/signature.txt for more details.
29d9f23c7fSRuchika Gupta
30d9f23c7fSRuchika Guptaconfig RSA_FREESCALE_EXP
31d9f23c7fSRuchika Gupta	bool "Enable RSA Modular Exponentiation with FSL crypto accelerator"
32f4e9ff71SGeorge McCollister	depends on DM && RSA && FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
33d9f23c7fSRuchika Gupta	help
34d9f23c7fSRuchika Gupta	Enables driver for RSA modular exponentiation using Freescale cryptographic
35d9f23c7fSRuchika Gupta	accelerator - CAAM.
36d9f23c7fSRuchika Gupta
37*781ee9b3SJason Zhuconfig RSA_N_SIZE
38*781ee9b3SJason Zhu	hex "Define the RSA N size"
39*781ee9b3SJason Zhu	default 0x100
40*781ee9b3SJason Zhu
41*781ee9b3SJason Zhuconfig RSA_E_SIZE
42*781ee9b3SJason Zhu	hex "Define the RSA E size"
43*781ee9b3SJason Zhu	default 0x100
44*781ee9b3SJason Zhu
45*781ee9b3SJason Zhuconfig RSA_C_SIZE
46*781ee9b3SJason Zhu	hex "Define the RSA C size"
47*781ee9b3SJason Zhu	default 0x100
48*781ee9b3SJason Zhu
49d9f23c7fSRuchika Guptaendif
50