linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Valerio Riedel <hvr@hvrlab.org>
To: Jari Ruusu <jari.ruusu@pp.inet.fi>
Cc: Andrea Arcangeli <andrea@suse.de>,
	Marcelo Tosatti <marcelo@conectiva.com.br>,
	linux-kernel@vger.kernel.org, linux-crypto@nl.linux.org
Subject: Re: 2.4.19pre3aa2
Date: 15 Mar 2002 13:19:44 +0100	[thread overview]
Message-ID: <1016194785.5713.200.camel@janus.txd.hvrlab.org> (raw)
In-Reply-To: <3C912ACF.AF3EE6F0@pp.inet.fi>
In-Reply-To: <20020314032801.C1273@dualathlon.random>  <3C912ACF.AF3EE6F0@pp.inet.fi>

[-- Attachment #1: Type: text/plain, Size: 3651 bytes --]

hello!

On Thu, 2002-03-14 at 23:57, Jari Ruusu wrote:
> Andrea Arcangeli wrote:
> > Only in 2.4.19pre3aa2: 00_loop-IV-API-hvr-1
> > 
> >         Make the IV API not to be in function of the blkdev
> >         of the underlying fs, so you can copy your cryptoloop
> >         around without risking to lose data. This breaks the
> >         on-disk format of some encrypted transfer module though,
> >         if you don't like it please discuss it here in CC with
> >         Herbert Valerio Riedel <hvr@hvrlab.org>, the patch
> >         is from him. I think writing a converter in place of
> >         the loop data would be the preferred solution if needed. It could
> >         be done in a way to link transparently with the source of
> >         the kernel modules.

just as a side note to compatibility to the old IV metric;

the patch I sent to andrea is quite minimal, it only changes the IV
metric, and adds a few #define's to loop.h in order to recognize the IV
metric when compiling filter modules against it; as to jari's patch, if
the following def's were added, it can be used instead of my minimal
patch...

/* definitions for IV metric */
#define LOOP_IV_SECTOR_BITS 9
#define LOOP_IV_SECTOR_SIZE (1 << LOOP_IV_SECTOR_BITS)

typedef int loop_iv_t;

...except maybe for when backward compatibility is needed. As it is a
major concern to some of us to be able to convert their old iv-metric
encrypted volumes to the new "atomic"-IV-metric, it can be usefull to be
able to have both IV metrics available on the same system...

one approach could be to losetup the concerned volume w/ an old loop.o v
ersion and decipher the content on-the-fly by doing something like

# set up the loop dev
losetup -e cipher /dev/loop0 /dev/partition

# make sure we got the right passphrase etc...; and also make sure the
# kernel fs code set the right transfer-block-size...
mount /dev/loop0 /mnt/tmp; umount /dev/loop0

# decrypt on-the-fly...
dd if=/dev/loop0 of=/dev/partition

...now in theory we should have the unencrypted data lying in
/dev/partition 


now we could replace the loop.o module by one feature the new IV metric,
and just reverse the process..

so far ok... but some of us might want to decrypt and encrypt directly,
w/o having to have some unencrypted (thus unprotected) data lying around
for the meantime; so we might want to have 2 IV metrics available at the
same time... this can either be done by cooperation from the loop.o
module, i.e. some option for setting the IV size to calculate... _or_ it
can be calculated by the filter module, by finding out what IV blocksize
to assume, and then dividing the 512-IV-metric by some integral factor
to reflect the old metric...

the latter approach is possible w/ my patch, and has been implemented
cryptoapi's cryptoloop filter through ioctl()...

this relays on the IV-fix not modifying the transfer block size (if the
blocks passed to the transfer filter should become smaller than the old
metric's IV block size, we simply can't emulate the old metric...), but
only the passed IV value...

ps: just to make one thing clear (again), I don't care too much whether
my loop-fix or jari's goes in; I primarily care for a fixed IV situation
(including the above mentioned #define's/typedef) and if possible anyhow
to allow for limited compatibility to the old metric...

regards,
-- 
Herbert Valerio Riedel       /    Phone: (EUROPE) +43-1-58801-18840
Email: hvr@hvrlab.org       /    Finger hvr@gnu.org for GnuPG Public Key
GnuPG Key Fingerprint: 7BB9 2D6C D485 CE64 4748  5F65 4981 E064 883F
4142

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

  parent reply	other threads:[~2002-03-15 12:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-14  2:28 2.4.19pre3aa2 Andrea Arcangeli
2002-03-14 12:32 ` 2.4.19pre3aa2 Dave Jones
2002-03-14 12:37   ` 2.4.19pre3aa2 Andrea Arcangeli
2002-03-14 12:46   ` 2.4.19pre3aa2 Jeff Garzik
2002-03-14 12:59     ` 2.4.19pre3aa2 Dave Jones
2002-03-14 15:53   ` 2.4.19pre3aa2 Bill Davidsen
2002-03-14 16:12     ` 2.4.19pre3aa2 Andrea Arcangeli
2002-03-14 16:16       ` 2.4.19pre3aa2 Dave Jones
2002-03-14 16:32         ` 2.4.19pre3aa2 Andrea Arcangeli
2002-03-16  1:26       ` 2.4.19pre3aa2 Mike Fedyk
2002-03-14 16:13     ` 2.4.19pre3aa2 Dave Jones
2002-03-14 17:16       ` 2.4.19pre3aa2 Bill Davidsen
2002-03-14 21:16   ` 2.4.19pre3aa2 H. Peter Anvin
2002-03-14 18:00 ` 2.4.19pre3aa2 Andrew Morton
2002-03-14 22:57 ` 2.4.19pre3aa2 Jari Ruusu
2002-03-15 10:56   ` 2.4.19pre3aa2 Jens Axboe
2002-03-15 11:06     ` 2.4.19pre3aa2 Jens Axboe
2002-03-15 17:35     ` 2.4.19pre3aa2 Jari Ruusu
2002-03-15 17:57       ` 2.4.19pre3aa2 Andrea Arcangeli
2002-03-16 12:10         ` 2.4.19pre3aa2 Jari Ruusu
2002-03-16 13:54           ` 2.4.19pre3aa2 Andrea Arcangeli
2002-03-18 19:13       ` 2.4.19pre3aa2 Jens Axboe
2002-03-19 23:26         ` 2.4.19pre3aa2 Jari Ruusu
2002-03-20  7:54           ` 2.4.19pre3aa2 Jens Axboe
2002-03-20 18:16             ` 2.4.19pre3aa2 Jari Ruusu
2002-03-20 14:21           ` 2.4.19pre3aa2 Herbert Valerio Riedel
2002-03-15 12:19 ` Herbert Valerio Riedel [this message]
2002-03-15 17:36   ` 2.4.19pre3aa2 Jari Ruusu
2002-03-15 18:36   ` 2.4.19pre3aa2 Herbert Valerio Riedel
2002-03-16 12:12     ` 2.4.19pre3aa2 Jari Ruusu

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=1016194785.5713.200.camel@janus.txd.hvrlab.org \
    --to=hvr@hvrlab.org \
    --cc=andrea@suse.de \
    --cc=jari.ruusu@pp.inet.fi \
    --cc=linux-crypto@nl.linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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;
as well as URLs for NNTP newsgroup(s).