Agreed. But, storing random IVs someplace doesn't sound very righteous.
Several months ago, as an experiment, I generated a large kernel module
(called loop_rand) filled with data taken from /dev/random. I then
modified the kerneli twofish code to derive IVs based on both the real_block
and data taken from the table. My twofish notes to myself:
* Jan 17, 1999 - Added exploitation of module loop_rand. This table
* contains a fairly large number of 96 bit entries of
* random data. A 128 bit block IV is derived by computing
* IV = E( real_block + loop_rand[ mod(real_block/entries ] )
* <-32bits-> + <-----------96bits---------------->
* <---------------------128 bit IV ------------------->
*
* The implication is now that two secrets must be known
* to recover the data: 1) The 128 bit key (pass phrase hash)
* and 2) the loop_rand kernel module (which is intended to
* be stored on *OTHER* than the encrypted disk)(preferably
* a diskette which is stored seperately from the machine).
The stength of the cipher should remain in the key, not in the IVs. I am
not comfortable with my loop_rand work, it strikes me as an overkill.
I think your #2 idea is perfect. Suppose one were to develop a
"filesystem signature" in losetup as a hash of the fully qualified
device/file name, stuff that into the loop_device structure, and then have
loop.c pass IV = relative_block + signature into the transfer module.
The result is both relocatable and avoids duplication of ciphertext...
the best of both worlds.
Your thoughts?
Reed,
P.S.
<RANT>
I could easily do this work in an evening. However, silly USA export
laws prevent me from changing loop.c from a BSD vnode psuedo device into
a crypto API.
Such is life behind the crypto iron curtain. I sincerely hope that
others in the world will continue to grow the technology. USA based
skill does atrophy behind clueless regulation.
</RANT>
-
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.tux.org/lkml/