Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-01-2004, 12:48 PM   #1
LQ Newbie
Registered: Dec 2003
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
Encrypted filesystems and util-linux

Ok, so I have an encrypted ext2 filesystem inside a disk file (~/.crypto). Up until now, it's been working perfectly with the following line in fstab:
/home/stephen/.crypto /mnt/crypt ext2 defaults,noauto,loop,encryption=aes,user 0 0

I typed mount /mnt/crypt, and it asked for a keysize and password.

Now, however, I get the following message:
You must specify a key size (in bits) for use with CryptoAPI encryption.

The only thing I can think of that's changed is that I upgraded util-linux (to 2.12-r4). My kernel hasn't changed; it's still 2.4.20-gentoo-r9.

The file Documentation/cryptoapi/cryptoloop.txt in the kernel source tree suggests adding the option -k 128 to the losetup command line, but then losetup complains about invalid option -- k.

Can anyone suggest what's changed here? Has upgrading util-linux changed something important?
Old 01-01-2004, 09:31 PM   #2
Registered: Feb 2003
Location: Cleveland, Ohio (USA)
Distribution: Gentoo, Kubuntu 6.06
Posts: 179

Rep: Reputation: 30
I'm not sure if util-linux changed anything important. Did you end up changing any configs while installing util-linux?

If the "-k" option isn't accepted, look for the program mount calls upon to mount the encrypted loopback filesytem. Look up man and info entries for that program for something equivalent to the "-k" option, such as a way to specify key size on the command line. For all we know, the correct syntax could be "--k".

When faced with gentoo-specific problems like this, I usually meet with better success at where more people know what they're talking about in terms of Gentoo.
Old 05-31-2004, 11:16 AM   #3
LQ Newbie
Registered: May 2004
Posts: 1

Rep: Reputation: 0

Do you found a solution?

I have "Linux redhat 2.6.5-1.358 #1 Sat May 8 09:04:50 EDT 2004 i686 athlon i386 GNU/Linux" / Fedora Core2. I installed the newest util-linux Version 2.12a, with no success.

I think i need a "international" kernel patch, but there is no avaible for 2.6.5.

My old rh8 linux, with "-k" support:

# uname -a
Linux Samba 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 athlon i386 GNU/Linux
# losetup
  losetup loop_device                                      # give info
  losetup -d loop_device                                   # delete
  losetup [ options ] loop_device file                     # setup
    where options include
    --offset <num>, -o <num>
        start at offset <num> into file.
    --pass-fd <num>, -p <num>
        read passphrase from file descriptor <num>
        instead of the terminal.
    --encryption <cipher>, -e <cipher>
        encrypt with <cipher>.
        Check /proc/crypto/cipher for available ciphers.
    --keybits <num>, -k <num>
        specify number of bits in the hashed key given
        to the cipher.  Some ciphers support several key
        sizes and might be more efficient with a smaller
        key size.  Key sizes < 128 are generally not
    --phash <hash>, -P <hash>
        specify <hash> to use for hashing the passphrase
        (supported: rmd160old, sha256, sha384, sha512)
new fedora c2:

#uname -a
Linux redhat 2.6.5-1.358 #1 Sat May 8 09:04:50 EDT 2004 i686 athlon i386 GNU/Linux
  losetup loop_device                                      # give info
  losetup -d loop_device                                   # delete
  losetup [ -e encryption ] [ -o offset ] loop_device file # setup

Last edited by Meisi; 05-31-2004 at 11:50 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Encrypted Filesystems on Removable Media Soltis Linux - Security 8 03-21-2005 02:35 PM
Encrypted Filesystems using Loop Device erktrek Linux - Security 0 12-16-2004 02:57 PM
Searching for util-linux sources cbonar Mandriva 6 11-18-2004 08:05 AM
windows filesystems vs. linux filesystems irfanhab General 8 05-25-2004 08:21 AM
Problem compiling util-linux buboleck Slackware 0 12-21-2003 07:41 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:22 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration