From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <8D987F97-4760-4243-A9E7-F2F3BA9C63E3@bitblocks.com> References: <8D987F97-4760-4243-A9E7-F2F3BA9C63E3@bitblocks.com> From: Charles Forsyth Date: Sun, 26 Feb 2017 18:16:47 +0000 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=001a11489ade55040c054972f7d8 Subject: Re: [9fans] SHA-1 collision and venti Topicbox-Message-UUID: b57b1e06-ead9-11e9-9d60-3106f5b1d025 --001a11489ade55040c054972f7d8 Content-Type: text/plain; charset=UTF-8 On 26 February 2017 at 17:25, Bakul Shah wrote: > Venti is similarly corruptible, right? Since the checksum is over just the > content. If you downloaded https://shattered.io/static/shattered-1.pdf > and > https://shattered.io/static/shattered-2.pdf, venti would lose the > contents of one. > Luckily, (a) they are both bigger than the block size usually configured, over which the hash is calculated, and (b) in case someone tries it, you've actually linked to the same file (-2.pdf) but under different names, so there won't be a collision by following your links. Hurrah! Venti detects a collision on the attempt to write the second copy if that differs from the earlier one stored (error "store collision"). The earlier copy is untouched (venti anyway is write-once per score). Fossil doesn't handle it well, because it turns up during archiving and ends up marking the archive attempt as failed, but it will try again. Meanwhile, you've got time to change fossil to check the venti error return for "score collision" and announce it, loudly, discarding the second one. Obviously if you care about something, make sure your version is in venti first! Chances are that collisions arise from naughty people tricking you later. Probably. --001a11489ade55040c054972f7d8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 26 February 2017 at 17:25, Bakul Shah <bakul@bitblocks.com> wrote:
Venti is similarly corru= ptible, right? Since the checksum is over just the content. If you download= ed=C2=A0https://shattered.io/static/shattered-1.pdf=C2=A0and=C2=A0<= a href=3D"https://shattered.io/static/shattered-2.pdf" target=3D"_blank">https://shattered.io/static/shattered-2.pdf, venti would lose t= he contents of one.

Luckily, (a) they are both = bigger than the block size usually configured, over which the hash is calcu= lated, and (b) in case someone tries it, you've actually linked to the = same file (-2.pdf) but under different names, so there won't be a colli= sion by following your links. Hurrah!

<= /div>
Venti detects a collision on the attempt to= write the second copy if that differs from the earlier one stored (error &= quot;store collision"). The earlier copy is untouched (venti anyway is= write-once per score).
Fossil doesn't = handle it well, because it turns up during archiving and ends up marking th= e archive attempt as failed, but it will try again.
Meanwhile, you've got time to change fossil to check the venti= error return for "score collision" and announce it, loudly, disc= arding the second one.
Obviously if you car= e about something, make sure your version is in venti first! Chances are th= at collisions arise from naughty people tricking you later. Probably.
=
--001a11489ade55040c054972f7d8--