[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: announce: linux-int-2.4.3.1-hvr3



Herbert Valerio Riedel wrote:
> On Tue, 10 Apr 2001, Jari Ruusu wrote:
> > So, you anchor the IV beginning to "lo->lo_offset". But, what happens when
> > someone losetups a hard drive partition with a different offset than what
> > was used before? Unreadable data, that what. I'm not saying that is a normal
> > thing to do. If IV beginning is anchored to the beginning of a partition or
> > file, data would be readable no matter what offset is used.
> 
> mmmh... ok, that's the way it was calculated in the past... it has its
> merits... but it has it's faults too...
> 
> as a sidenote, you have to use an offset being a multiple of the the
> media blocksize, since otherwise your argument isn't valid, due to
> unreadable data...
> 
> then, if I created some partitions on my harddisk, and losetup those
> partitions... then I happen do something, which I would say either, that
> it was a normal thing to do ;), and I backed up the whole device,...
> say, to a cdrw, or something like that, or just any device where
> partitions aren't supported,
> then I could just use the starting partition offset as the offset argument
> and have completely readable data... as opposed to your case...

You have a valid point here.

> so, tell me, which way of interpreting an offset is the 'right' one? :-)
> 
> (since this new IV calculation breaks everything, we can take the
> opportunity to change the offset semantics too... just in case your
> argument was, to stick with the old way of doing things, assuming they
> were done right.. :-)

You do it your way, and I do it my way.

I have been doing my own crypto for years (just implementing standard
algorithms, not creating them). I was using TripleDES until last Sunday,
when I decided to switch to AES. I have included a bzip2 compressed tar
archive of what I use now. It has some very good features:

1)  No modifications to kernel. No patch hassles when a new version of
    kernel comes out.
2)  Works with 2.2 and 2.4 kernels.
3)  AES cipher is built-in. No /etc/modules.conf alias hassles.

Take a look if you want. For those that don't like attachments, its here:

    http://members.surfeu.fi/ce6c8edf/loop-AES-v1.0c.tar.bz2
    md5sum 8ec3ae621d8a2d7f35cfffd896d040e5

There is still a bug in the official 2.4.3 (Axboe, wake up) loop driver as
well as your 2.4.3-int1-hvr3 in the IV calculation in situations where
"lo->lo_offset" is non-zero. Look at my patch loop.c-2.4.diff in the
tarball, fourth hunk in the patch. You use "rbh->b_rsector" when you really
should be using "bh->b_rsector".

Regards,
Jari Ruusu <jari.ruusu@pp.inet.fi>

loop-AES-v1.0c.tar.bz2