git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Exploiting SHA1's  "XOR weakness" allows for faster hash calculation
@ 2012-12-05  9:19 Sebastian Schuberth
  2012-12-05 12:26 ` Marko Kreen
  2012-12-05 17:20 ` Theodore Ts'o
  0 siblings, 2 replies; 4+ messages in thread
From: Sebastian Schuberth @ 2012-12-05  9:19 UTC (permalink / raw
  To: git

Hi,

to say it in advance: I do not want to trigger any bogus security 
discussion here. Instead, I believe the findings from [1] allow for an 
up to 20% faster SHA1 calculation, if my brief reading of the 
presentation is correct. Any opinions on integration this optimization 
into Git?

[1] https://hashcat.net/p12/js-sha1exp_169.pdf

-- 
Sebastian Schuberth

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exploiting SHA1's "XOR weakness" allows for faster hash calculation
  2012-12-05  9:19 Exploiting SHA1's "XOR weakness" allows for faster hash calculation Sebastian Schuberth
@ 2012-12-05 12:26 ` Marko Kreen
  2012-12-05 17:20 ` Theodore Ts'o
  1 sibling, 0 replies; 4+ messages in thread
From: Marko Kreen @ 2012-12-05 12:26 UTC (permalink / raw
  To: Sebastian Schuberth; +Cc: git

On Wed, Dec 5, 2012 at 11:19 AM, Sebastian Schuberth
<sschuberth@gmail.com> wrote:
> to say it in advance: I do not want to trigger any bogus security discussion
> here. Instead, I believe the findings from [1] allow for an up to 20% faster
> SHA1 calculation, if my brief reading of the presentation is correct. Any
> opinions on integration this optimization into Git?
>
> [1] https://hashcat.net/p12/js-sha1exp_169.pdf

Pretty cool find.  Although it's not actual cryptographic weakness, it does
show some gaps in designers thinking - as there are simple optimizations
available to crackers but not users.

It does seem unusable for real implementation - the 20% win
is available only after the data is processed properly once.
Then after changing the data a little, you can calculate next
hash faster.

There still small possibility that there is way to optimize W calculation
for the first run, but it does seem really hard, and even impossible
while trying to keep the cache usage small.

-- 
marko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exploiting SHA1's  "XOR weakness" allows for faster hash calculation
  2012-12-05  9:19 Exploiting SHA1's "XOR weakness" allows for faster hash calculation Sebastian Schuberth
  2012-12-05 12:26 ` Marko Kreen
@ 2012-12-05 17:20 ` Theodore Ts'o
  2012-12-06  8:11   ` Sebastian Schuberth
  1 sibling, 1 reply; 4+ messages in thread
From: Theodore Ts'o @ 2012-12-05 17:20 UTC (permalink / raw
  To: Sebastian Schuberth; +Cc: git

On Wed, Dec 05, 2012 at 10:19:43AM +0100, Sebastian Schuberth wrote:
> 
> to say it in advance: I do not want to trigger any bogus security
> discussion here. Instead, I believe the findings from [1] allow for
> an up to 20% faster SHA1 calculation, if my brief reading of the
> presentation is correct. Any opinions on integration this
> optimization into Git?
> 
> [1] https://hashcat.net/p12/js-sha1exp_169.pdf

It's only useful if you are trying to do brute-force password
cracking, where the password is being hashed in a very specific way.
(If for example the password was replicated N times in the input
buffer for SHA-1, instead of keeping the padding constant in the rest
of theinput buffer, this particular optimization would't apply.)

In any case, it's not at all applicable for general purpose checksum
calculations, and hence wouldn't apply to git.

Regards,

						- Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exploiting SHA1's "XOR weakness" allows for faster hash calculation
  2012-12-05 17:20 ` Theodore Ts'o
@ 2012-12-06  8:11   ` Sebastian Schuberth
  0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Schuberth @ 2012-12-06  8:11 UTC (permalink / raw
  To: Theodore Ts'o; +Cc: git

On Wed, Dec 5, 2012 at 6:20 PM, Theodore Ts'o <tytso@mit.edu> wrote:

> It's only useful if you are trying to do brute-force password
> cracking, where the password is being hashed in a very specific way.
> (If for example the password was replicated N times in the input
> buffer for SHA-1, instead of keeping the padding constant in the rest
> of theinput buffer, this particular optimization would't apply.)
>
> In any case, it's not at all applicable for general purpose checksum
> calculations, and hence wouldn't apply to git.

Thanks for the explanation.

-- 
Sebastian Schuberth

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-06  8:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-05  9:19 Exploiting SHA1's "XOR weakness" allows for faster hash calculation Sebastian Schuberth
2012-12-05 12:26 ` Marko Kreen
2012-12-05 17:20 ` Theodore Ts'o
2012-12-06  8:11   ` Sebastian Schuberth

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).