From owner-freebsd-geom@FreeBSD.ORG Tue Jul 24 23:39:28 2012 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0AD9106566B for ; Tue, 24 Jul 2012 23:39:28 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 2F1FC8FC08 for ; Tue, 24 Jul 2012 23:39:28 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so109079wgb.31 for ; Tue, 24 Jul 2012 16:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=dedc3+GpI6mJHvGqm9vaTCaQnxxhlDb6ole8SSyE2no=; b=FRqacW5QBfZyNqISbthzAF+BvYhh24/kAAQ3TUkov1ZyQLBFi7uEOUOfDNGQbGvcCt XV938nKxP34Bs4GJ1JCxOviAUDeOXvXQFTqz86cgGEkVxzDG8nPM1yFzgCAix4ibo6Z9 CrFpuPh8nhwzmxYWiVKhS+P8UsdKewqZEK7CSxNS9eebX+M6Eh9cMiAQF6KfqB+RjIBj O4Ts4MClrvkmp3oT2tg3paU6c0bp/RjR4mR+IXvj+CiWbVKMpstjdJzBhacOs29MwWxf 1/yP47rDp0/PL48607ylPiysNmMZJ8Tv2qAyzPDgl8feTLkoZV/HtlKbThb2dZ/QONTh Zz7w== Received: by 10.216.243.203 with SMTP id k53mr3832157wer.91.1343173167140; Tue, 24 Jul 2012 16:39:27 -0700 (PDT) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPS id j6sm10570148wiy.4.2012.07.24.16.39.25 (version=SSLv3 cipher=OTHER); Tue, 24 Jul 2012 16:39:26 -0700 (PDT) Date: Wed, 25 Jul 2012 00:39:23 +0100 From: RW To: freebsd-geom@freebsd.org Message-ID: <20120725003923.6956a238@gumby.homeunix.com> In-Reply-To: <20120724112823.GD1384@garage.freebsd.pl> References: <20120722230539.43054c22@gumby.homeunix.com> <500E772F.6000709@cyberleo.net> <20120724112823.GD1384@garage.freebsd.pl> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; amd64-portbld-freebsd8.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: XTS v's CBC X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2012 23:39:28 -0000 On Tue, 24 Jul 2012 13:28:23 +0200 Pawel Jakub Dawidek wrote: > On Tue, Jul 24, 2012 at 05:21:35AM -0500, CyberLeo Kitsana wrote: > > On 07/22/2012 05:05 PM, RW wrote: > > > > > > Is there any good reason for preferring XTS over CBC in geli? I > > > just did some tests on a new disk and CBC seems to be about 30% > > > faster. > > > > This depends on how the initialization vectors are generated for > > CBC. If guessable IVs are used, such as with plain sector/block > > numbers, a cryptographic watermark attack is possible. > > > > The attack is not possible if ESSIV (encrypted salt-sector IV) is > > used in CBC mode, since the IVs cannot be guessed without the key. > > > > The design of XTS mode thwarts the watermark attack, and allows the > > cipher to be easily parallelized, but requires twice the keying > > material due to its use of separate keys for encryption and > > whitening. > > > > The geli manpage does not say which algorithm is used to generate > > IVs for CBC mode. > >... The CBC mode used by geli is very similar to the mode ESSIV. > I was aware of all of the above, I was wondering if there is anything that justified the switch to AES-XTS as default given the drop in performance.