Re: [PATCH 2/2] crypto: inside-secure - Add support for the Chacha20-Poly1305 AEAD

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

 



On Wed, Sep 11, 2019 at 03:37:25PM +0000, Pascal Van Leeuwen wrote:
> > On Tue, Sep 10, 2019 at 04:38:13PM +0200, Pascal van Leeuwen wrote:
> > > @@ -43,8 +44,8 @@ struct safexcel_cipher_ctx {
> > >
> > >  	u32 mode;
> > >  	enum safexcel_cipher_alg alg;
> > > -	bool aead;
> > > -	int  xcm; /* 0=authenc, 1=GCM, 2 reserved for CCM */
> > > +	char aead; /* !=0=AEAD, 2=IPSec ESP AEAD */
> > > +	char xcm;  /* 0=authenc, 1=GCM, 2 reserved for CCM */
> > 
> > You could use an u8 instead. It also seems the aead comment has an
> > issue, I'll let you check that.
> > 
> I don't see what's wrong with the comment though?
> Anything unequal to 0 is AEAD, with value 2 being the ESP variant.

OK, that wasn't clear to me when I first read it. Maybe you could say
that 1: AEAD, 2: IPsec ESP AEAD; and then of course the check of this
value being > 0 would mean it's one of the two.

Thanks!
Antoine

-- 
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



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

  Powered by Linux