From owner-freebsd-security@FreeBSD.ORG Mon Sep 27 15:04:17 2004 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53B1816A4CE; Mon, 27 Sep 2004 15:04:17 +0000 (GMT) Received: from bas.flux.utah.edu (bas.flux.utah.edu [155.98.60.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18F3043D54; Mon, 27 Sep 2004 15:04:17 +0000 (GMT) (envelope-from danderse@flux.utah.edu) Received: from bas.flux.utah.edu (localhost [127.0.0.1]) by bas.flux.utah.edu (8.12.9/8.12.5) with ESMTP id i8RF4G1f016424; Mon, 27 Sep 2004 09:04:16 -0600 (MDT) (envelope-from danderse@bas.flux.utah.edu) Received: (from danderse@localhost) by bas.flux.utah.edu (8.12.9/8.12.5/Submit) id i8RF4GD8016423; Mon, 27 Sep 2004 09:04:16 -0600 (MDT) Date: Mon, 27 Sep 2004 09:04:16 -0600 From: "David G. Andersen" To: Giorgos Keramidas Message-ID: <20040927090416.B16227@cs.utah.edu> References: <20011107211316.A7830@nomad.lets.net> <20040925140242.GB78219@gothmog.gr> <41575DFC.9020206@wadham.ox.ac.uk> <20040927091710.GC914@orion.daedalusnetworks.priv> <20040927084511.E75411@cs.utah.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040927084511.E75411@cs.utah.edu>; from danderse@cs.utah.edu on Mon, Sep 27, 2004 at 08:45:11AM -0600 cc: freebsd-security@freebsd.org cc: Colin Percival Subject: Re: compare-by-hash (was Re: sharing /etc/passwd) X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Security issues [members-only posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2004 15:04:17 -0000 David G. Andersen just mooed: > > What's the error rate when sending only the hash? Since the > probabilities are small, we can effectively add them. > > P(undetected TCP error) = 0.000000005 > P(hash collision) = 1/1208925819614629174706176 > =~ 0.00000000000000000000001 > > "Worsening" = 0.00000000500000000000001 (btw, I wasn't really being fair to compare-by-hash in this example. Assuming you're synchronizing a "moderate" file with rsync, it's going to split it into, say, S/1k chunks. So let's be nasty and say that it's a 1Tb file. The chances of any one block colliding with any of the other blocks in the file is (again, because our probabilities are really small) 2^30 / 2^160 =~ 1/2^130. In the example above, I used a very conservative value of 1/2^80. So the actual worsening is probably from 0.0000005 to 0.000000500000000000000000000000000000001 I'll take those odds any day. Even if you send each data packet 3x with a non-hashed rcp, your chances of death per-packet are still 0.000000000000000000125 or thereabouts... -Dave -- work: dga@lcs.mit.edu me: dga@pobox.com MIT Laboratory for Computer Science http://www.angio.net/ I do not accept unsolicited commercial email. Do not spam me.