diff mbox

[U-Boot,7/9,v4] lib/rsa: Add Kconfig for devices supporting RSA Modular Exponentiation

Message ID 1419931816-19485-7-git-send-email-ruchika.gupta@freescale.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Ruchika Gupta Dec. 30, 2014, 9:30 a.m. UTC
Kconfig option added for devices which support RSA Verification.
1. RSA_SOFTWARE_EXP
Enables driver for supporting RSA Modular Exponentiation in Software
2. RSA_FREESCALE_EXP
Enables driver for supporting RSA Modular Exponentiation using Freescale specific
driver

The above drivers use RSA uclass

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
CC: Simon Glass <sjg@chromium.org>
---
Changes in v4:
Introduced 2 options when CONFIG_RSA is selected:
RSA_SOFTWARE_EXP
RSA_FREESCALE_EXP

Removed RSA_HW. Changes the name pf RSA_SW to RSA_SOFTWARE_EXP

Changes in v3:
New patch

 lib/Kconfig     | 10 +---------
 lib/rsa/Kconfig | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 9 deletions(-)
 create mode 100644 lib/rsa/Kconfig

Comments

Simon Glass Jan. 2, 2015, 10:24 p.m. UTC | #1
Hi Ruchika,

On 30 December 2014 at 02:30, Ruchika Gupta <ruchika.gupta@freescale.com> wrote:
> Kconfig option added for devices which support RSA Verification.
> 1. RSA_SOFTWARE_EXP
> Enables driver for supporting RSA Modular Exponentiation in Software
> 2. RSA_FREESCALE_EXP
> Enables driver for supporting RSA Modular Exponentiation using Freescale specific
> driver
>
> The above drivers use RSA uclass
>
> Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
> CC: Simon Glass <sjg@chromium.org>
> ---
> Changes in v4:
> Introduced 2 options when CONFIG_RSA is selected:
> RSA_SOFTWARE_EXP
> RSA_FREESCALE_EXP
>
> Removed RSA_HW. Changes the name pf RSA_SW to RSA_SOFTWARE_EXP
>
> Changes in v3:
> New patch
>
>  lib/Kconfig     | 10 +---------
>  lib/rsa/Kconfig | 30 ++++++++++++++++++++++++++++++
>  2 files changed, 31 insertions(+), 9 deletions(-)
>  create mode 100644 lib/rsa/Kconfig
>
> diff --git a/lib/Kconfig b/lib/Kconfig
> index f317f81..a1f30a2 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -27,14 +27,6 @@ config SYS_HZ
>           get_timer() must operate in milliseconds and this option must be
>           set to 1000.
>
> -config RSA
> -       bool "Use RSA Library"
> -       depends on DM
> -       help
> -         RSA support.This enables the RSA algorithm used for FIT image
> -         verification in U-Boot. RSA support for Modular exponentiation
> -         is implemented as a driver model. Driver Model should be enabled
> -         to select this option.
> -         See doc/uImage.FIT/signature.txt for more details.
> +source lib/rsa/Kconfig
>
>  endmenu
> diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig
> new file mode 100644
> index 0000000..14155b9
> --- /dev/null
> +++ b/lib/rsa/Kconfig
> @@ -0,0 +1,30 @@
> +config RSA
> +       bool "Use RSA Library"
> +       depends on DM
> +       select RSA_FREESCALE_EXP if FSL_CAAM
> +       select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP
> +       help
> +         RSA support.This enables the RSA algorithm used for FIT image
> +         verification in U-Boot. RSA support for Modular exponentiation
> +         is implemented as a driver model. Driver Model should be enabled
> +         to select this option.
> +         See doc/uImage.FIT/signature.txt for more details.
> +
> +if RSA
> +config RSA_SOFTWARE_EXP
> +       bool "Enable driver for RSA Modular Exponentiation in software"
> +       depends on DM && RSA
> +       help
> +         Enables driver for modular exponentiation in software. This is a RSA
> +         algorithm used in FIT image verification. It required RSA Key as
> +         input.
> +         See doc/uImage.FIT/signature.txt for more details.
> +
> +config RSA_FREESCALE_EXP

Just for clarify, I think these names are fine, it's the naming of the
uclass that I think should change. Perhaps UCLASS_MOD_EXP or
UCLASS_RSA_MOD_EXP?


> +       bool "Enable RSA Modular Exponentiation with FSL crypto accelerator"
> +       depends on DM && RSA && FSL_CAAM
> +       help
> +       Enables driver for RSA modular exponentiation using Freescale cryptographic
> +       accelerator - CAAM.
> +
> +endif
> --
> 1.8.1.4
>

Regards,
Simon
Ruchika Gupta Jan. 6, 2015, 9:38 a.m. UTC | #2
Hi Simon,

> -----Original Message-----
> From: sjg@google.com [mailto:sjg@google.com] On Behalf Of Simon Glass
> Sent: Saturday, January 03, 2015 3:54 AM
> To: Gupta Ruchika-R66431
> Cc: U-Boot Mailing List; Sun York-R58495
> Subject: Re: [PATCH 7/9] [v4] lib/rsa: Add Kconfig for devices supporting RSA
> Modular Exponentiation
> 
> Hi Ruchika,
> 
> On 30 December 2014 at 02:30, Ruchika Gupta <ruchika.gupta@freescale.com>
> wrote:
> > Kconfig option added for devices which support RSA Verification.
> > 1. RSA_SOFTWARE_EXP
> > Enables driver for supporting RSA Modular Exponentiation in Software
> > 2. RSA_FREESCALE_EXP Enables driver for supporting RSA Modular
> > Exponentiation using Freescale specific driver
> >
> > The above drivers use RSA uclass
> >
> > Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
> > CC: Simon Glass <sjg@chromium.org>
> > ---
> > Changes in v4:
> > Introduced 2 options when CONFIG_RSA is selected:
> > RSA_SOFTWARE_EXP
> > RSA_FREESCALE_EXP
> >
> > Removed RSA_HW. Changes the name pf RSA_SW to RSA_SOFTWARE_EXP
> >
> > Changes in v3:
> > New patch
> >
> >  lib/Kconfig     | 10 +---------
> >  lib/rsa/Kconfig | 30 ++++++++++++++++++++++++++++++
> >  2 files changed, 31 insertions(+), 9 deletions(-)  create mode 100644
> > lib/rsa/Kconfig
> >
> > diff --git a/lib/Kconfig b/lib/Kconfig index f317f81..a1f30a2 100644
> > --- a/lib/Kconfig
> > +++ b/lib/Kconfig
> > @@ -27,14 +27,6 @@ config SYS_HZ
> >           get_timer() must operate in milliseconds and this option must be
> >           set to 1000.
> >
> > -config RSA
> > -       bool "Use RSA Library"
> > -       depends on DM
> > -       help
> > -         RSA support.This enables the RSA algorithm used for FIT image
> > -         verification in U-Boot. RSA support for Modular exponentiation
> > -         is implemented as a driver model. Driver Model should be enabled
> > -         to select this option.
> > -         See doc/uImage.FIT/signature.txt for more details.
> > +source lib/rsa/Kconfig
> >
> >  endmenu
> > diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig new file mode 100644
> > index 0000000..14155b9
> > --- /dev/null
> > +++ b/lib/rsa/Kconfig
> > @@ -0,0 +1,30 @@
> > +config RSA
> > +       bool "Use RSA Library"
> > +       depends on DM
> > +       select RSA_FREESCALE_EXP if FSL_CAAM
> > +       select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP
> > +       help
> > +         RSA support.This enables the RSA algorithm used for FIT image
> > +         verification in U-Boot. RSA support for Modular exponentiation
> > +         is implemented as a driver model. Driver Model should be enabled
> > +         to select this option.
> > +         See doc/uImage.FIT/signature.txt for more details.
> > +
> > +if RSA
> > +config RSA_SOFTWARE_EXP
> > +       bool "Enable driver for RSA Modular Exponentiation in software"
> > +       depends on DM && RSA
> > +       help
> > +         Enables driver for modular exponentiation in software. This is a
> RSA
> > +         algorithm used in FIT image verification. It required RSA Key as
> > +         input.
> > +         See doc/uImage.FIT/signature.txt for more details.
> > +
> > +config RSA_FREESCALE_EXP
> 
> Just for clarify, I think these names are fine, it's the naming of the uclass
> that I think should change. Perhaps UCLASS_MOD_EXP or UCLASS_RSA_MOD_EXP?
I will change it in next version of patches.
> 
> 
> > +       bool "Enable RSA Modular Exponentiation with FSL crypto
> accelerator"
> > +       depends on DM && RSA && FSL_CAAM
> > +       help
> > +       Enables driver for RSA modular exponentiation using Freescale
> cryptographic
> > +       accelerator - CAAM.
> > +
> > +endif
> > --
> > 1.8.1.4
> >
> 
> Regards,
> Simon
Regards,
Ruchika
diff mbox

Patch

diff --git a/lib/Kconfig b/lib/Kconfig
index f317f81..a1f30a2 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -27,14 +27,6 @@  config SYS_HZ
 	  get_timer() must operate in milliseconds and this option must be
 	  set to 1000.
 
-config RSA
-	bool "Use RSA Library"
-	depends on DM
-	help
-	  RSA support.This enables the RSA algorithm used for FIT image
-	  verification in U-Boot. RSA support for Modular exponentiation
-	  is implemented as a driver model. Driver Model should be enabled
-	  to select this option.
-	  See doc/uImage.FIT/signature.txt for more details.
+source lib/rsa/Kconfig
 
 endmenu
diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig
new file mode 100644
index 0000000..14155b9
--- /dev/null
+++ b/lib/rsa/Kconfig
@@ -0,0 +1,30 @@ 
+config RSA
+	bool "Use RSA Library"
+	depends on DM
+	select RSA_FREESCALE_EXP if FSL_CAAM
+	select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP
+	help
+	  RSA support.This enables the RSA algorithm used for FIT image
+	  verification in U-Boot. RSA support for Modular exponentiation
+	  is implemented as a driver model. Driver Model should be enabled
+	  to select this option.
+	  See doc/uImage.FIT/signature.txt for more details.
+
+if RSA
+config RSA_SOFTWARE_EXP
+	bool "Enable driver for RSA Modular Exponentiation in software"
+	depends on DM && RSA
+	help
+	  Enables driver for modular exponentiation in software. This is a RSA
+	  algorithm used in FIT image verification. It required RSA Key as
+	  input.
+	  See doc/uImage.FIT/signature.txt for more details.
+
+config RSA_FREESCALE_EXP
+	bool "Enable RSA Modular Exponentiation with FSL crypto accelerator"
+	depends on DM && RSA && FSL_CAAM
+	help
+	Enables driver for RSA modular exponentiation using Freescale cryptographic
+	accelerator - CAAM.
+
+endif