RE: [PATCH 1/3] crypto: inside-secure - Added support for basic SM3 ahash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Antoine Tenart <antoine.tenart@xxxxxxxxxxx>
> Sent: Wednesday, September 11, 2019 5:41 PM
> To: Pascal van Leeuwen <pascalvanl@xxxxxxxxx>
> Cc: linux-crypto@xxxxxxxxxxxxxxx; antoine.tenart@xxxxxxxxxxx;
> herbert@xxxxxxxxxxxxxxxxxxx; davem@xxxxxxxxxxxxx; Pascal Van Leeuwen
> <pvanleeuwen@xxxxxxxxxxxxxx>
> 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@xxxxxxxxxxx>
> 
> 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





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux