git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Yo dawg, I heard you like trees...
@ 2011-12-05 23:57 Sebastian Morr
  2011-12-06  0:04 ` Andrew Ardill
       [not found] ` <CABURp0rBkGtGfU=od2XeuhD6otUWUfL2ASqo1XBckra18WKy7w@mail.gmail.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Sebastian Morr @ 2011-12-05 23:57 UTC (permalink / raw)
  To: git

Just out of curiosity: Do you know of any attempts to construct a tree
object that contains itself, that is, references it's own SHA-1?

Sebastian

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

* Re: Yo dawg, I heard you like trees...
  2011-12-05 23:57 Yo dawg, I heard you like trees Sebastian Morr
@ 2011-12-06  0:04 ` Andrew Ardill
       [not found] ` <CABURp0rBkGtGfU=od2XeuhD6otUWUfL2ASqo1XBckra18WKy7w@mail.gmail.com>
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Ardill @ 2011-12-06  0:04 UTC (permalink / raw)
  To: Sebastian Morr; +Cc: git

The difficulty in doing this is essentially the same as breaking
SHA-1, so I doubt anyone has seriously tried to do it.

Regards,

Andrew Ardill



On 6 December 2011 10:57, Sebastian Morr <sebastian@morr.cc> wrote:
> Just out of curiosity: Do you know of any attempts to construct a tree
> object that contains itself, that is, references it's own SHA-1?
>
> Sebastian
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: Yo dawg, I heard you like trees...
       [not found] ` <CABURp0rBkGtGfU=od2XeuhD6otUWUfL2ASqo1XBckra18WKy7w@mail.gmail.com>
@ 2011-12-07 15:54   ` Sebastian Morr
  2011-12-07 22:12     ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Morr @ 2011-12-07 15:54 UTC (permalink / raw)
  To: Phil Hord; +Cc: git

> Git uses a DAG. The A stands for "acyclic". Loops are not allowed.

I'm aware of that. It's acyclic by design, but is this actually enforced
by the code? Or does it simply trust that no loops will ever occur,
because it's so improbable?

After Andrew's response I investigated a bit, and it seems I
overvalued the attempts to "break" SHA-1. Wikipedia quotes a 2008
attack, that can create a collision with 2^51 hash function calls.

Which, of course, is still way to much. Good for you! :-)

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

* Re: Yo dawg, I heard you like trees...
  2011-12-07 15:54   ` Sebastian Morr
@ 2011-12-07 22:12     ` Jeff King
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2011-12-07 22:12 UTC (permalink / raw)
  To: Sebastian Morr; +Cc: Phil Hord, git

On Wed, Dec 07, 2011 at 04:54:11PM +0100, Sebastian Morr wrote:

> > Git uses a DAG. The A stands for "acyclic". Loops are not allowed.
> 
> I'm aware of that. It's acyclic by design, but is this actually enforced
> by the code? Or does it simply trust that no loops will ever occur,
> because it's so improbable?

The latter. And not just "improbable", but "so improbable that trying to
do it on purpose should still take billions of years".

Assuming sha1 isn't totally broken, of course.

> After Andrew's response I investigated a bit, and it seems I
> overvalued the attempts to "break" SHA-1. Wikipedia quotes a 2008
> attack, that can create a collision with 2^51 hash function calls.

According to wikipedia, it _may_ produce collisions in 2^51 to 2^57.

Worrisome numbers, certainly, but 2^51 is probably within our ability to
compute if a big project is undertaken. Yet to my knowledge nobody has
actually created such a collision. So the attack is still theoretical at
this point, and there's no good way to create a loop within the git DAG
(or within a tree).

-Peff

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

end of thread, other threads:[~2011-12-07 22:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-05 23:57 Yo dawg, I heard you like trees Sebastian Morr
2011-12-06  0:04 ` Andrew Ardill
     [not found] ` <CABURp0rBkGtGfU=od2XeuhD6otUWUfL2ASqo1XBckra18WKy7w@mail.gmail.com>
2011-12-07 15:54   ` Sebastian Morr
2011-12-07 22:12     ` Jeff King

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 NNTP newsgroup(s).