Linux - GeneralThis 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.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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 http://forums.gentoo.org where more people know what they're talking about in terms of Gentoo.
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:
Code:
# uname -a
Linux Samba 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 athlon i386 GNU/Linux
# losetup
usage:
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
recommended
--phash <hash>, -P <hash>
specify <hash> to use for hashing the passphrase
(supported: rmd160old, sha256, sha384, sha512)
new fedora c2:
Code:
#uname -a
Linux redhat 2.6.5-1.358 #1 Sat May 8 09:04:50 EDT 2004 i686 athlon i386 GNU/Linux
#losetup
losetup loop_device # give info
losetup -d loop_device # delete
losetup [ -e encryption ] [ -o offset ] loop_device file # setup
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.