[U-Boot] [PATCH 7/9] [v3] lib/rsa: Add Kconfig option for HW accelerated RSA
Simon Glass
sjg at chromium.org
Wed Dec 24 01:49:30 CET 2014
Hi Ruchika,
On 23 December 2014 at 04:32, Ruchika Gupta <ruchika.gupta at freescale.com> wrote:
> Kconfig option added for devices which support RSA Verification
> (Modular Exponentiation) operation in hardware
>
> Signed-off-by: Ruchika Gupta <ruchika.gupta at freescale.com>
> CC: Simon Glass <sjg at chromium.org>
> ---
> Changes in v3:
> New patch
>
> lib/rsa/Kconfig | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
I think this needs tweaking such that RSA_SW is a driver (use
RSA_SOFTWARE might be better).
For your freescale one, it should be RSA_FREESCALE_EXP or similar. We
might want to support multiple such devices. Don't use RSA_HW - that's
not a descriptive name.
>
> diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig
> index 8f9aa44..fc8a1e7 100644
> --- a/lib/rsa/Kconfig
> +++ b/lib/rsa/Kconfig
> @@ -11,7 +11,7 @@ if RSA && DM_RSA
>
> config RSA_SW
> bool "User driver Model for RSA Modular Exponentiation in software"
> - depends on DM && DM_RSA && RSA
> + depends on DM && DM_RSA && RSA && !RSA_HW
You should drop the last term since it should be possible to have both
software and hardware.
> select RSA_MOD_EXP_SW
> default y
> help
> @@ -20,6 +20,27 @@ config RSA_SW
> input.
> See doc/uImage.FIT/signature.txt for more details.
>
> +menuconfig RSA_HW
> + bool "Use crypto devices to implement RSA Modular Exponentiation"
> + default y
> + help
> + Say Y here to get to see options for hardware crypto devices and
> + processors. This option alone does not enable the crypto device.
> +
> + If you say N,all options in this submenu will be skipped and disabled.
Space after N
> +
> +if RSA_HW
> +
> +config FSL_RSA
> + bool "Implement RSA Modular Exponentiation with FSL crypto accelerator"
> + depends on DM && DM_RSA && RSA && FSL_CAAM
> + default y
> + help
> + Enables driver for RSA modular exponentiation using Freescale's
> + cryptographic accelerator - CAAM.
> +
> +endif
> +
> endif
>
> config RSA_MOD_EXP_SW
> --
> 1.8.1.4
>
Regards,
Simon
More information about the U-Boot
mailing list