Re: [PATCH] Put sha1dc on a diet
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 2, 2017, 14:39 UTC
- Message-ID
- <alpine.DEB.2.20.1703021538060.3767@virtualbox>
- In-Reply-To
- <20170301231921.2puf7o7jkrujscwn@sigill.intra.peff.net>
Hi Peff,
On Wed, 1 Mar 2017, Jeff King wrote:
Show 6 quoted lines
> I do think that could argue for turning on the collision detection only > during object-write operations, which is where it matters. It would be > really trivial to flip the "check collisions" bit on sha1dc. But I > suspect you could go faster still by compiling against two separate > implementations: the fast-as-possible one (which could be openssl or > blk-sha1), and the slower-but-careful sha1dc.
Given the speed difference between OpenSSL and sha1dc, it would be a wise thing indeed to do sha1dc only where objects enter from possibly untrusted sources, and use OpenSSL for all other hashing.
Ciao, Johannes