On Wed, Oct 28, 2015 at 6:37 PM, Eduard <eduard.c.dumitre...@gmail.com>
wrote:

> Hi,
>
> I wish to discuss the issues surrounding the use of SHA1 in Fossil and
> their consequences, as well as propose several possibilities to deal
> with them.
>

{whole bunch of snipped stuff}

If fossil didn't say it used SHA1 to generate artifact IDs, I don't think
anyone would care how it generated IDs.

An artifact ID is a way of assigning a fixed length identifier to an
artifact with good distribution of IDs in the fixed length space provided.
It is not intended to be a cryptographic.

You can't create a collision in advance based on not knowing who is going
to commit what to the repository in advance.

Let's say you do, after the fact, manage to create a collision. If you try
to upload it to the repository it will be ignored because fossil believes
(correctly) it already has the artifact in question.

As you observe, one could in theory mount a MITM attack. At this point what
is to stop them from serving a completely alien repository that they've
specially crafted? No collisions required.

In fact, the "easiest" way to getting people to use malicious software is
to host a compromised repository and convince people to use it instead of
the "blessed" repository.

If you want to change the way fossil does things to limit the possibility
of fraudulent artifacts, that's fine. Perhaps prefixing the blob data with
a length (ala git) might help mitigate the possibility of hash collisions.
Perhaps creating a hash of the complete commit (vs just the manifest) and
storing it in the manifest might help.

Ultimately, one can chase hash algorithms forever trying to create some
ultimately secure ideal. In the case of actual security software, I can see
the point. In this case, it's just an identifier, and the odds of a
non-malicious collision are so close to zero that those odds might as well
be zero.

-- 
Scott Robison
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to