linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
To: Antoine Tenart <antoine.tenart@bootlin.com>,
	Pascal van Leeuwen <pascalvanl@gmail.com>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: RE: [PATCH 1/3] crypto: inside-secure - Added support for basic SM3 ahash
Date: Wed, 11 Sep 2019 15:47:21 +0000	[thread overview]
Message-ID: <MN2PR20MB2973F633782C5B9DC9E509CBCAB10@MN2PR20MB2973.namprd20.prod.outlook.com> (raw)
In-Reply-To: <20190911154055.GC5492@kwain>

> -----Original Message-----
> From: Antoine Tenart <antoine.tenart@bootlin.com>
> Sent: Wednesday, September 11, 2019 5:41 PM
> To: Pascal van Leeuwen <pascalvanl@gmail.com>
> Cc: linux-crypto@vger.kernel.org; antoine.tenart@bootlin.com;
> herbert@gondor.apana.org.au; davem@davemloft.net; Pascal Van Leeuwen
> <pvanleeuwen@verimatrix.com>
> Subject: Re: [PATCH 1/3] crypto: inside-secure - Added support for basic SM3 ahash
> 
> Hi Pascal,
> 
> On Wed, Sep 11, 2019 at 09:41:09AM +0200, Pascal van Leeuwen wrote:
> >  static int safexcel_register_algorithms(struct safexcel_crypto_priv *priv)
> > diff --git a/drivers/crypto/inside-secure/safexcel.h b/drivers/crypto/inside-
> secure/safexcel.h
> > index 282d59e..fc2aba2 100644
> > --- a/drivers/crypto/inside-secure/safexcel.h
> > +++ b/drivers/crypto/inside-secure/safexcel.h
> > @@ -374,6 +374,7 @@ struct safexcel_context_record {
> >  #define CONTEXT_CONTROL_CRYPTO_ALG_XCBC192	(0x2 << 23)
> >  #define CONTEXT_CONTROL_CRYPTO_ALG_XCBC256	(0x3 << 23)
> >  #define CONTEXT_CONTROL_CRYPTO_ALG_POLY1305	(0xf << 23)
> > +#define CONTEXT_CONTROL_CRYPTO_ALG_SM3		(0x7 << 23)
> 
> Please order the definitions (0x7 before 0xf).
> 
While I generally agree with you that having them in order is
nicer, the other already existing algorithms weren't in order
either (i.e. SHA224 is 4 but comes before SHA256 which is 3, 
same  for SHA384 and SHA512), hence I just appended at the 
end of the list in the order I actually added them.

Do you want me to put them *all* in order? Because otherwise
it doesn't make sense to make an exception for SM3.

> Otherwise the patch looks good, and with that you can add:
> 
> Acked-by: Antoine Tenart <antoine.tenart@bootlin.com>
> 
> Thanks!
> Antoine
> 
> --
> Antoine Ténart, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Thanks,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com


  reply	other threads:[~2019-09-11 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11  7:41 [PATCH 0/3] crypto: inside-secure - Add support for (HMAC) SM3 Pascal van Leeuwen
2019-09-11  7:41 ` [PATCH 1/3] crypto: inside-secure - Added support for basic SM3 ahash Pascal van Leeuwen
2019-09-11 15:40   ` Antoine Tenart
2019-09-11 15:47     ` Pascal Van Leeuwen [this message]
2019-09-11 15:52       ` Antoine Tenart
2019-09-11  7:41 ` [PATCH 2/3] crypto: inside-secure - Added support for HMAC-SM3 ahash Pascal van Leeuwen
2019-09-11 15:41   ` Antoine Tenart
2019-09-11  7:41 ` [PATCH 3/3] crypto: testmgr - Added testvectors for the hmac(sm3) ahash Pascal van Leeuwen

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=MN2PR20MB2973F633782C5B9DC9E509CBCAB10@MN2PR20MB2973.namprd20.prod.outlook.com \
    --to=pvanleeuwen@verimatrix.com \
    --cc=antoine.tenart@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=pascalvanl@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).