lkml.org 
[lkml]   [1999]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectkernel encryption in 2.2.10
Hi,

I've been trying to get kernel encryption, specifically IDEA, running with the
2.2.10 kernel. I patched the kernel with patch-int-2.2.10.4 from kerneli.org, and
turned on all the relevant config options:

CONFIG_CIPHERS=y
CONFIG_CIPHER_BLOWFISH=m
CONFIG_CIPHER_DES=m
CONFIG_CIPHER_DFC=m
CONFIG_CIPHER_IDEA=m
CONFIG_CIPHER_MARS=m
CONFIG_CIPHER_RC5=m
CONFIG_CIPHER_RC6=m
CONFIG_CIPHER_SERPENT=m

CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_USE_REL_BLOCK=y
CONFIG_BLK_DEV_LOOP_GEN=y
# CONFIG_BLK_DEV_LOOP_CAST is not set
CONFIG_BLK_DEV_LOOP_FISH2=m

I also obtained util-linux-2.9u and applied util-linux-2.9s.patch to it, to
build suitable mount, umount and losetup tools.

Now when I try to setup an encrypted filesystem using the loopback device (with
anything other than XOR), I get e.g. :

root@lethe /tmp> losetup -e DES /dev/loop0 image
Password:
Init (up to 16 hex digits):
ioctl: LOOP_SET_STATUS: Invalid argument

I noticed some previous discussion on the list of precisely the same problem,
but it usually ended with an admonition to apply the crypto patch to the kernel
(which I have already done); however there was one interesting response from
arslanm@gate.marketweb.net.tr citing loop.c :

> Because DES encryption is not implemented, yet.

> loop.c_128:
> struct loop_func_table *xfer_funcs[MAX_LO_CRYPT] = {
> &none_funcs,
> &xor_funcs
> };

> loop.c_506:
> type = info.lo_encrypt_type;
> if (type >= MAX_LO_CRYPT || xfer_funcs[type] == NULL)
> return -EINVAL;

> Here, xfer_funcs[type] is NULL, so returned 'Invalid argument'.

The code in loop.c still looks like this even after applying the crypto patch,
so I suspect something is missing from the patch (all hunks succeeded, but did
not contain any changes to the above code).

Does anyone know whether kernel encryption is still working in the 2.2.x kernel
- is anyone at all using it ? If so, how does one get it working ?

I used to use cfs, but switched to kernel encryption a few years ago. Since then
I've done a lot of searching for the right patches when upgrading the kernel. It
is so troublesome that I wish I had stuck to cfs.

Any help would be much appreciated.

Tim

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.039 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site