There is an elegant way to solve this problem: do a hash over the plain
text data without the first block and use that as the IV. Then do CFB.
On decryption you decrypt everything but the first block and calculate
the hash, then use the hash to get the first block (this is from
Peter Gutmann's SFS). Cost are a few more cycles.
> Many of the Linux community consider loop.c to be broken. Astor in his
> kerneli International Crypto Patches favors relative block, as does
> Al Viro in this thread... and I too acknowledge that relocation of backing
> files, in all its flavors, is desirable in some environments.
I consider the absolute blocks broken too. The problem is just that
loop has no sanity checks at all (no format version number, no way to
check the password in advance). I think such an arbitary change is
not manageable.
> That said, there remain the exemptionally paranoid among us who need
> access to absolute block numbers as IV seeds. Speaking for myself,
> I have no concern adding bmap logic to my own transfer code.
Absolute block numbers are not for the paranoid (they are much better
with the hash technique above), but for compatibility.
-Andi
-- This is like TV. I don't like TV.- 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/