Re: loop.c: DES bugfixes

Olaf Titz (olaf@bigred.inka.de)
Fri, 17 Jul 1998 20:40:26 +0200


> CBC
> mode is much better, but if it can only be applied on a per-block basis,
> you still have major problems with security (more same-key cyphertexts).
> If the key was somehow dependent on the block number on disk, this would
> be a much less significant problem.

Depends on the cipher used. Some of them have key setup overhead that
you don't want to do for every block. You could do this with Skipjack
which AFAIK has zero key setup overhead.

But there's a simpler solution. Don't change the key, change the IV.
Just stuff the disk block number into an 8 byte block padded with some
bits from the key hash function, encrypt that block with the user's
key and use the result as IV.

> However, would a big-endian machine be able to read an ext2 filesystem
> written by a little-endian machine? I am not thinking clearly right now

Yes. Cipher blocks are non-endian, the leftmost byte is leftmost
regardless whether it's high or low. Thinking that out correctly gave
me major headache when I once had to implement IDEA, which is defined
in terms of big-endian 16-bit registers, in i386 assembler :-)

olaf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html