From: Linus Torvalds Subject: Re: [PATCH] lib/sha1: use the git implementation of SHA-1 Date: Sun, 7 Aug 2011 13:17:35 -0700 Message-ID: References: <1312595187-3265-1-git-send-email-msb@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: Joachim Eastwood , Mandeep Singh Baines , linux-kernel@vger.kernel.org, Ramsay Jones , Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, linux@arm.linux.org.uk To: Andreas Schwab , Nicolas Pitre Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:44618 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755011Ab1HGUSg (ORCPT ); Sun, 7 Aug 2011 16:18:36 -0400 In-Reply-To: Sender: linux-crypto-owner@vger.kernel.org List-ID: On Sun, Aug 7, 2011 at 12:47 PM, Andreas Schwab wrote: > > ARM has its own implementation of sha_transform in arch/arm/lib/sha1.S, > which assumes SHA_WORKSPACE_WORDS is 80. Well, that certainly explains it. I wonder if that thing is worth it. It seems to be based on the bad slow version of sha1, so I suspect that the biggest advantage of it may the byte-swapping being done more efficiently. The ARM version of "get_unaligned_be32()" is potentially pretty bad. Joachim, does it all work for you if you just remove 'sha1.o' from lib-y in arch/arm/lib/Makefile? Nico (now with corrected email address): is that ARM-optimized asm really worth it? Compared to the git C implementation? Linus