When "loopback device support" and "Twofish encryption for loopback device" is compiled INTO the kernel, the "losetup -e twofish /dev/loop0 /encrypted-file" command fails with the error: "ioctl: LOOP_SET_STATUS: invalid argument"
If they are compiled as modules, everything works OK.
I have tred it with many versions of the SuSE kernels, and the result is always the same !.
Any suggestions on how to get it to work.
Yeah, I have my own kernel compiled with the various different algorithms built-in. There were 2 patches which I had to apply to the vanilla kernel. One was the patch-int-2.4.20.0 and the other was loop-jari-2.4.20.0.patch
So I will hazard a guess that you don't have the patched loop built into the kernel.
The files are at: http://ftp.linux.hr/pub/linux/kernel/crypto/v2.4/testing/
Yes but the strange thing is that it works when "Twofish encryption for loopback device" is compiled as a module, so it must be included in the source. I use SuSE kernels, the latest I have testet is 2.4.20-13.
Well SuSE is heavily patched and they do everything with modules, so maybe the loop module isn't getting loaded right when you build twofish into the kernel. Have you tried to manually load the loop module first, before any attempt to use the encryption?
I don't understand. What do you meen by "manually load the loop module" ?. No matter if "loopback device support" is compiled into the kernel or not, as long as "Twofish encryption for loopback device" is compiles as a module everything works OK. I have not tried compiling the "loopback device support" as a module and the "Twofish encryption for loopback device" INTO the kernel, if that's what you meen.