From: "Zhang, Sonic" Subject: RE: Tcrypt hmac(crc32) test can work only on Blackfin Date: Thu, 6 Dec 2012 04:58:04 -0500 Message-ID: References: <50AB8DB3.6040008@redhat.com> <50ACC2AD.2060100@redhat.com> <20121122023308.GA19138@gondor.apana.org.au> <20121206090710.GA15642@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Cc: Milan Broz , "linux-crypto@vger.kernel.org" To: Herbert Xu Return-path: Received: from [216.32.181.183] ([216.32.181.183]:9173 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753468Ab2LFJ7U convert rfc822-to-8bit (ORCPT ); Thu, 6 Dec 2012 04:59:20 -0500 In-Reply-To: <20121206090710.GA15642@gondor.apana.org.au> Content-Language: en-US Sender: linux-crypto-owner@vger.kernel.org List-ID: Hi Herbert, >-----Original Message----- >From: Herbert Xu [mailto:herbert@gondor.hengli.com.au] >Sent: Thursday, December 06, 2012 5:07 PM >To: Zhang, Sonic >Cc: Milan Broz; linux-crypto@vger.kernel.org >Subject: Re: Tcrypt hmac(crc32) test can work only on Blackfin > >On Thu, Nov 22, 2012 at 03:38:45AM -0500, Zhang, Sonic wrote: >> >> >On Wed, Nov 21, 2012 at 01:01:49PM +0100, Milan Broz wrote: >> >> >> >> On 11/21/2012 12:29 PM, Zhang, Sonic wrote: >> >> > Is there a policy that the CRC test vector in testmgr.h should >> >> > support all CRC drivers? >> >> > If so, I am fine to drop this test vector. >> >> >> >> Question for Herbert... >> >> But the problem I see is that it confuses people, it simply returns >> >> fail everytime (except Blackfin platform). >> >> >> >> My mail originates from bug report "tcrypt tests started failing", >> >> and it was not obvious why (for people not familiar with tcrypt >> >> internals, they just tried all test modes available). >> > >> >We should just make a generic version of crc32 available. >> > >> >> Hi Herbert and Broz, >> >> Unfortunately, after investigating the hardware manual of Blackfin CRC engine >and the CRC algorithm, I have to say the Blackfin CRC driver can't use current >crc32c test vector in testmgr.h. Blackfin CRC engine only supports big endian >CRC algorithm, while current crypto crc32c driver uses little endian CRC >algorithm. The big endian CRC digest is different from that of the little endian. >> >> There are 2 solutions. One is to add a big endian crc32c test vector. The other >is to keep the Blackfin specific test vector. However, neither meets Broz's >expectation of a generic crc32 test vector. >> >> Any idea? > >I think we should just remove the blackfin crc driver altogether as nothing in the >kernel ever uses hmac(crc32). > Blackfin Linux applications may use the crypto bfin_crc driver. I wish you could remove the blackfin crc test patch from testmgr, while keeping the driver as it is. Thanks, Sonic >Cheers, >-- >Email: Herbert Xu Home Page: >http://gondor.apana.org.au/~herbert/ >PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt