All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ruchika Gupta <ruchika.gupta@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 8/9] [v3] hash: Add function to find hash_algo struct with progressive hash
Date: Tue, 30 Dec 2014 09:04:08 +0000	[thread overview]
Message-ID: <1419930247614.73161@freescale.com> (raw)
In-Reply-To: <CAPnjgZ3VhaQX-4YC0VF9BNvP5U9LEa7jF+=t4VDWRbAVHSUomg@mail.gmail.com>

Hi Simon,

> -----Original Message-----
> From: sjg at google.com [mailto:sjg at google.com] On Behalf Of Simon Glass
> Sent: Tuesday, December 30, 2014 2:44 AM
> To: Gupta Ruchika-R66431
> Cc: U-Boot Mailing List; Sun York-R58495; Wolfgang Denk
> Subject: Re: [PATCH 8/9] [v3] hash: Add function to find hash_algo struct
> with progressive hash
> 
> +Wolfgang
> 
> Hi Ruchika,
> 
> On 29 December 2014 at 00:07, Ruchika Gupta <ruchika.gupta@freescale.com>
> wrote:
> > 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 8/9] [v3] hash: Add function to find hash_algo
> >> struct with progressive hash
> >>
> >> Hi Ruchika,
> >>
> >> On 23 December 2014 at 04:32, Ruchika Gupta
> >> <ruchika.gupta@freescale.com>
> >> wrote:
> >> > The hash_algo structure has some implementations in which
> >> > progressive hash API's are not defined. These are basically the
> >> > hardware based implementations of SHA. An API is added to find the
> >> > algo which has progressive hash API's defined. This can then be
> >> > integrated with RSA checksum library which uses Progressive Hash API's.
> >> >
> >> > Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
> >> > CC: Simon Glass <sjg@chromium.org>
> >> > ---
> >> > Changes in v3 :
> >> > Corrected ifdef for SHA1
> >> >
> >> > Changes in v2 :
> >> > Added commit message
> >> >
> >> >  common/hash.c  | 33 ++++++++++++++++++++++++---------
> >> > include/hash.h
> >> > | 15 +++++++++++++++
> >> >  2 files changed, 39 insertions(+), 9 deletions(-)
> >> >
> >> > diff --git a/common/hash.c b/common/hash.c index 12d6759..ea1ec60
> >> > 100644
> >> > --- a/common/hash.c
> >> > +++ b/common/hash.c
> >> > @@ -20,7 +20,7 @@
> >> >  #include <asm/io.h>
> >> >  #include <asm/errno.h>
> >> >
> >> > -#ifdef CONFIG_CMD_SHA1SUM
> >> > +#ifdef CONFIG_SHA1
> >>
> >> I'm still not sure about this. I suspect this will bloat the code for
> >> boards that use CONFIG_SHA1 (most) but not CONFIG_CMD_SHA1SUM. You
> >> could check that, but I went through some contortions to make sure
> >> that the hash API was not compiled in when not needed.
> >
> > Since we will be using this API now in RSA checksum, defining CONFIG_SHA1
> should allow the compilation of this structure. Asking user to enable
> CONFIG_CMD_SHA1SUM for using rsa-checksum doesn?t look right. Please suggest.
> 
> Agreed it doesn't, it was just a code size hack. Wolfgang might be able to
> chime in with thoughts here (+Cc).
> 
> But still, do you need to change it? After all, CONFIG_CMD_SHA1SUM should be
> a superest for CONFIG_SHA1.
With CONFIG_FIT_SIGNATURE, CONFIG_SHA1 and CONFIG_SHA256 get automatically defined in include/image.h. I need to use the structure hash_algos to find the  functions to be used for algo SHA1. If I leave this as it is, it would mean that I will have to modify include/image.h to define CONFIG_CMD_SHA1SUM for FIT signatures. I am not sure whether that would be the right thing to do.
> 
> [snip]
> 
> Regards,
> Simon

Regards,
Ruchika

  reply	other threads:[~2014-12-30  9:04 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
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 [this message]
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=1419930247614.73161@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.