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

Antoine Tenart antoine.tenart at free-electrons.com
Fri Apr 21 08:05:52 EDT 2017


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;
> > > > +		opad[i] ^= 0x5c;
> > > 
> > > What are these constant ?
> > 
> > They are defined in the HMAC RFC, as ipad and opad values. See
> > https://www.ietf.org/rfc/rfc2104.txt.
> > 
> 
> Since many driver use them, I think defining them in include/ should be done (HMAC_IPAD/HMAC_OPAD)
> I will send a patch for it.

OK, I'll send a following up patch on this driver when your series is
merged.

Antoine

-- 
Antoine Ténart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170421/76266910/attachment.sig>


More information about the linux-arm-kernel mailing list