public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ruchika Gupta <ruchika.gupta@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 7/9] [v3] lib/rsa: Add Kconfig option for HW accelerated RSA
Date: Mon, 29 Dec 2014 07:05:33 +0000	[thread overview]
Message-ID: <1419836732318.63378@freescale.com> (raw)
In-Reply-To: <CAPnjgZ2q+WsWtYpxprg2RM8Rp5eJwTpysgO5qhwwHPGbhpk19g@mail.gmail.com>

Hi Simon,

> -----Original Message-----
> From: sjg at google.com [mailto:sjg at google.com] On Behalf Of Simon Glass
> Sent: Wednesday, December 24, 2014 6:20 AM
> To: Gupta Ruchika-R66431
> Cc: U-Boot Mailing List; Sun York-R58495
> Subject: Re: [PATCH 7/9] [v3] lib/rsa: Add Kconfig option for HW accelerated
> RSA
> 
> Hi Ruchika,
> 
> On 23 December 2014 at 04:32, Ruchika Gupta <ruchika.gupta@freescale.com>
> wrote:
> > Kconfig option added for devices which support RSA Verification
> > (Modular Exponentiation) operation in hardware
> >
> > Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
> > CC: Simon Glass <sjg@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.
If we are using driver Model, can multiple devices be selected at the same time for the RSA_UCLASS ? I am little confused.

> 
> >
> > 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.
This option selects the driver model for RSA software implementation suing RSA uclass. If I define both I get this error :

drivers/crypto/fsl/built-in.o:(.u_boot_list_2_driver_2_fsl_rsa+0x0): multiple definition of `_u_boot_list_2_driver_2_fsl_rsa'
drivers/crypto/rsa/built-in.o:(.u_boot_list_2_driver_2_fsl_rsa+0x0): first defined here

> 
> >         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

Regards,
Ruchika

  reply	other threads:[~2014-12-29  7:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23 11:32 [U-Boot] [PATCH 0/9] [v3] rsa: Modify rsa lib to use hw acceleration Ruchika Gupta
2014-12-23 11:32 ` [U-Boot] [PATCH 1/9] [v3] rsa: Split the rsa-verify to separate the modular exponentiation Ruchika Gupta
2014-12-24  0:47   ` Simon Glass
2014-12-23 11:32 ` [U-Boot] [PATCH 2/9] [v3] FIT: Modify option FIT_SIGNATURE in Kconfig Ruchika Gupta
2014-12-24  0:47   ` Simon Glass
2014-12-23 11:32 ` [U-Boot] [PATCH 3/9] [v3] DM: crypto/rsa: Add rsa Modular Exponentiation DM driver Ruchika Gupta
2014-12-24  0:48   ` Simon Glass
2014-12-23 11:32 ` [U-Boot] [PATCH 4/9] [v3] configs: Move CONFIG_FIT_SIGNATURE to defconfig Ruchika Gupta
2014-12-24  0:48   ` Simon Glass
2014-12-23 11:32 ` [U-Boot] [PATCH 5/9] [v3] lib/rsa: Modify rsa to use DM driver if available Ruchika Gupta
2014-12-24  0:49   ` Simon Glass
     [not found]     ` <BY1PR0301MB1288C126892D064BE49D4E6FEF540@BY1PR0301MB1288.namprd03.prod.outlook.com>
2014-12-29 21:10       ` Simon Glass
2014-12-23 11:32 ` [U-Boot] [PATCH 6/9] [v3] DM: crypto/fsl - Add Freescale rsa DM driver Ruchika Gupta
2014-12-24  0:49   ` Simon Glass
2014-12-23 11:32 ` [U-Boot] [PATCH 7/9] [v3] lib/rsa: Add Kconfig option for HW accelerated RSA Ruchika Gupta
2014-12-24  0:49   ` Simon Glass
2014-12-29  7:05     ` Ruchika Gupta [this message]
2014-12-29 20:28       ` Simon Glass
2014-12-23 11:32 ` [U-Boot] [PATCH 8/9] [v3] hash: Add function to find hash_algo struct with progressive hash Ruchika Gupta
2014-12-24  0:50   ` Simon Glass
2014-12-29  7:07     ` Ruchika Gupta
2014-12-29 21:13       ` Simon Glass
2014-12-30  9:04         ` Ruchika Gupta
2014-12-23 11:32 ` [U-Boot] [PATCH 9/9] [v3] rsa: Use checksum algorithms from struct hash_algo Ruchika Gupta
2014-12-24  0:50   ` Simon Glass
     [not found]     ` <BY1PR0301MB1288E92E4FEF74B81F040302EF510@BY1PR0301MB1288.namprd03.prod.outlook.com>
2014-12-29  8:00       ` Ruchika Gupta
2014-12-29 21:12       ` Simon Glass
2014-12-30  8:58         ` Ruchika Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1419836732318.63378@freescale.com \
    --to=ruchika.gupta@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox