Almost working...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I bet there is simple fix.  Here is a fairly complete description of
my current situation:

Okay, I am trying to setup, on a RH6.2 system these pieces:

linux-2.2.18.tar.bz2 with patch-int-2.2.18.3.gz and freeswan-1.8.tar.gz

Which seems to work.  In particular, "modprobe twofish" works.
[root@xxxxxxxxx /sbin]# ls /proc/crypto/cipher/ -l
total 0
-r--r--r--    1 root     root            0 Dec 17 20:24 twofish
-r--r--r--    1 root     root            0 Dec 17 20:24 twofish-cbc

On top of the programs from the util-linux-2.10p-1 rpm, I have created
a second rpm ( called util-linux-2.10r-13_crypto ) with just the
mount, umount, and losetup commands.  I compiled these 3 commands from
util-linux-2.10r.tar.bz2 with the util-linux-2.10o.int.patch from
patch-int-2.2.18.3.gz.  So now I get

[root@xxxxxxxxx /sbin]# ./losetup
usage:
  ./losetup loop_device                                      # give info
  ./losetup -d loop_device                                   # delete
  ./losetup [ -e encryption ] [ -o offset ] loop_device file # setup
    where encryption is one of:
       no
       none
       xor
       DES
       twofish
       blowfish
       cast128
       serpent
       mars
       rc6
       DES_EDE3
       dfc
       idea

Which is odd, since I expected aes to be listed, but oh well.  The "no" and "xor"
types seem to work, but I cannot use the ciphers.  The error message is:

[root@xxxxxxxxx /sbin]# losetup -e twofish /dev/loop0 ~/testing 
Password :
ioctl: LOOP_SET_STATUS: Invalid argument

So this is my question: How do I fix this error?  Did I miss a step?
Mix the wrong set of patches?  Forget to sacrfice a young enough goat?

I have strace output, but it is not very illuminating to me:

write(6, "Password :", 10)              = 10
read(6, "frogs\n", 4096)                = 6
write(6, "\n", 1)                       = 1
ioctl(6, SNDCTL_TMR_CONTINUE, {B38400 opost isig icanon echo ...}) = 0
close(6)                                = 0
munmap(0x4012c000, 4096)                = 0
ioctl(5, LOOP_SET_FD, 0x4)              = 0
ioctl(5, LOOP_SET_STATUS, 0xbffff9a0)   = -1 ENOSYS (Function not implemented)
ioctl(5, LOOP_SET_STATUS, 0xbffff9a0)   = -1 ENOSYS (Function not implemented)
ioctl(5, LOOP_SET_STATUS, 0xbffff9a0)   = -1 EINVAL (Invalid argument)
ioctl(5, LOOP_CLR_FD, 0)                = 0
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "ioctl: LOOP_SET_STATUS: Invalid "..., 41) = 41
_exit(1)                                = ?

The relevant loopback and CRYPTO sections of the kernel .config file are

#
# Additional Block Devices
#
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_USE_REL_BLOCK=y
CONFIG_BLK_DEV_LOOP_GEN_SEL="1"
CONFIG_BLK_DEV_LOOP_GEN=y
# CONFIG_BLK_DEV_LOOP_CAST is not set
# CONFIG_BLK_DEV_LOOP_FISH2 is not set

#
# Crypto options
#
CONFIG_CRYPTO=y
CONFIG_CIPHERS=y
CONFIG_CIPHER_AES=m
CONFIG_CIPHER_RIJNDAEL=y

#
# AES Finalist Ciphers (128 bit blocksize)
#
CONFIG_CIPHER_TWOFISH=m
CONFIG_CIPHER_MARS=m
CONFIG_CIPHER_RC6=m
CONFIG_CIPHER_SERPENT=m

#
# Other Ciphers submitted as AES Candidates:
#
CONFIG_CIPHER_DFC=m

#
# Other ciphers (64 bit blocksize)
#
CONFIG_CIPHER_BLOWFISH=m
CONFIG_CIPHER_IDEA=m
CONFIG_CIPHER_RC5=m
# CONFIG_CIPHER_DES_EDE3 is not set
# CONFIG_CIPHER_DES is not set
# CONFIG_DIGEST is not set

Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux