Re: Linus' sha1 is much faster!
On Mon, 17 Aug 2009, George Spelvin wrote:
Show 27 quoted lines
> If it helps anyone resolve license issues, here's a from-FIPS-180-2
> implementation that's placed in the public domain. That should be
> compatible with any license.
>
> It uses Linus's and Artur's performance ideas, and some of Linus' macro
> ideas (in the rotate implementation), but tries to be textually different.
> Is there anything recognizable that anyone cares to clam copyright to?
>
> It's not quite 100% finished, as I haven't benchmarked it against Linus's
> code yet, but it's functionally correct.
>
> It's also clean with -W -Wall -Wextra.
>
> TODO: Check if an initial copy to w[] is faster on i386 (less register
> pressure).
>
> /*
> * Secure Hash Algorith SHA-1, as published in FIPS PUB 180-2.
> *
> * This implementation is in the public domain. Copyright abandoned.
> * You may do anything you like with it, including evil things.
> *
> * This is a rewrite from scratch, based on Linus Torvalds' "block-sha1"
> * from the git mailing list (August, 2009). Additional optimization
> * ideas cribbed from
> * - Artur Skawina (x86, particularly P4, and much benchmarking)
> * - Nicilas Pitre (ARM)
Please be careful to spell my name correctly.
Nicolas