xref: /rk3399_rockchip-uboot/lib/rsa/Kconfig (revision e409430010cd43fa2b4f64aae67994153fd4d8af)
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
37781ee9b3SJason Zhuconfig RSA_N_SIZE
38781ee9b3SJason Zhu	hex "Define the RSA N size"
39*e4094300SJason Zhu	help
40*e4094300SJason Zhu	  The value is depended on different platforms. The RV1126/RV1109 is set to 0x100.
41*e4094300SJason Zhu	  The RK3568/RK3566 is set to 0x200.
42781ee9b3SJason Zhu
43781ee9b3SJason Zhuconfig RSA_E_SIZE
44781ee9b3SJason Zhu	hex "Define the RSA E size"
45*e4094300SJason Zhu	help
46*e4094300SJason Zhu	  The value is depended on different platforms. The RV1126/RV1109 is set to 0x100.
47*e4094300SJason Zhu	  The RK3568/RK3566 is set to 0x10.
48781ee9b3SJason Zhu
49781ee9b3SJason Zhuconfig RSA_C_SIZE
50781ee9b3SJason Zhu	hex "Define the RSA C size"
51*e4094300SJason Zhu	help
52*e4094300SJason Zhu	  The value is depended on different platforms.The RV1126/RV1109 is set to 0x14.
53*e4094300SJason Zhu	  The RK3568/RK3566 is set to 0x20.
54781ee9b3SJason Zhu
55d9f23c7fSRuchika Guptaendif
56