Re: [PATCH v2 2/3] crypto: inside-secure: add SafeXcel EIP197 crypto engine driver

2017-04-21 Thread Antoine Tenart
On Fri, Apr 21, 2017 at 01:36:45PM +0200, Corentin Labbe wrote: > > > > + memset(ipad + keylen, 0, blocksize - keylen); > > > > + memcpy(opad, ipad, blocksize); > > > > + > > > > + for (i = 0; i < blocksize; i++) { > > > > + ipad[i] ^= 0x36; > > > > +

Re: [PATCH v2 2/3] crypto: inside-secure: add SafeXcel EIP197 crypto engine driver

2017-04-21 Thread Corentin Labbe
> > > + memset(ipad + keylen, 0, blocksize - keylen); > > > + memcpy(opad, ipad, blocksize); > > > + > > > + for (i = 0; i < blocksize; i++) { > > > + ipad[i] ^= 0x36; > > > + opad[i] ^= 0x5c; > > > > What are these constant ? > > They are defined in the HMAC RFC, as ipad and

Re: [PATCH v2 2/3] crypto: inside-secure: add SafeXcel EIP197 crypto engine driver

2017-04-21 Thread Antoine Tenart
Hi Corentin, On Fri, Apr 21, 2017 at 09:30:56AM +0200, Corentin Labbe wrote: > > I have some minor comment below […] > > + /* > > +* Result Descriptor Ring prepare > > +*/ > > This is not preferred comment format for one line Sure. > > [...] > > > +static int

Re: [PATCH v2 2/3] crypto: inside-secure: add SafeXcel EIP197 crypto engine driver

2017-04-21 Thread Corentin Labbe
Hello I have some minor comment below On Wed, Apr 19, 2017 at 09:14:17AM +0200, Antoine Tenart wrote: > Add support for Inside Secure SafeXcel EIP197 cryptographic engine, > which can be found on Marvell Armada 7k and 8k boards. This driver > currently implements: ecb(aes), cbc(aes), sha1,