From: Fruhwirth Clemens <clemens@endorphin.org>
To: Christophe Saout <christophe@saout.de>
Cc: Pascal Brisset <pascal.brisset-ml@wanadoo.fr>,
linux-kernel@vger.kernel.org, mbligh@aracnet.com,
kernel@gozer.org, axboe@suse.de
Subject: Re: [PATCH] loop: fixing cryptoloop troubles.
Date: Mon, 11 Aug 2003 15:11:05 +0200 [thread overview]
Message-ID: <20030811131105.GA2040@ghanima.endorphin.org> (raw)
In-Reply-To: <1060553236.25524.49.camel@chtephan.cs.pocnet.net>
[-- Attachment #1: Type: text/plain, Size: 2168 bytes --]
On Mon, Aug 11, 2003 at 12:07:16AM +0200, Christophe Saout wrote:
> The main problem with CBC is that you can't really do it. It only works
> when you have a constant stream of data because you always need the
> result from the previous encryption which you don't have when doing
> something in the middle of the block device.
That's partially correct. As most block cipher operate on blocks of 16 bytes
size it perfectly makes sence to use CBC on a 512 byte block.
> Warning: A long analysis of obvious things is following. I think most of
> you know everything I'm writing here, I'm just looking through the code
> myself and trying to explain what's happening. On the end I'll find the
> bug you fixed. I think that was the only bug regarding IV handling.
*knockonwood* :)
> The cryptoloop code is doing things correctly. In ecb mode, every bio
> could get converted at once, or every bvec.
ECB mode is broken in 2.6.0-test[12]. See
http://marc.theaimsgroup.com/?l=linux-kernel&m=106043148921893&w=2
It's a quite conservative patch. ECB processing can be optimized.
> ========== analysis end ========== ;)
Thanks :)
> Yes, I think putting this into loop.c adds unnecessary complexity.
> Especially the IV handling is ugly. Sometimes the IV is calculated in
> loop.c (three times) and sometimes it gets incremented in cryptoloop.c.
> Wow. Error prone and ugly.
Definitly. loop.c is anyway ugly :). It would be nice to rip out the
block-backend stuff of loop.c and recommend to use device mapper instead.
loop.c will benefit from that for sure since it doesn't have to handle two
different case in such a schizophrenic manner.
> And you can still use dm over loop device if you want to encrypt a file.
I like that idea.
> > If you can't get attention for your patch, try to convince someone "more
> > important". DM maintainer is a good place to start :)
>
> Yes, the DM maintainer helped me write the patch and would like to see
> it merged. Convincing some more important persons would be easier if I
> would get any reaction from them. ;)
I'll give it a try, promised :)
Regards, Clemens
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2003-08-11 13:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-10 2:36 [PATCH] loop: fixing cryptoloop troubles Fruhwirth Clemens
2003-08-10 14:10 ` Pascal Brisset
2003-08-10 14:27 ` Christophe Saout
2003-08-10 21:03 ` Fruhwirth Clemens
2003-08-10 22:07 ` Christophe Saout
2003-08-11 13:11 ` Fruhwirth Clemens [this message]
2003-08-11 16:16 ` Christophe Saout
2003-08-12 3:30 ` David Wagner
2003-08-10 15:15 ` James Morris
2003-08-10 16:08 ` Pascal Brisset
2003-08-10 16:28 ` James Morris
2003-08-10 18:01 ` Ingo Oeser
2003-08-11 8:38 ` Pascal Brisset
2003-08-11 13:31 ` James Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030811131105.GA2040@ghanima.endorphin.org \
--to=clemens@endorphin.org \
--cc=axboe@suse.de \
--cc=christophe@saout.de \
--cc=kernel@gozer.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
--cc=pascal.brisset-ml@wanadoo.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox