Re: loop-aes mount problem

Jari Ruusu <[email protected]>
Newsgroups gmane.linux.cryptography
Message-ID <[email protected]>
GNUtoo wrote:
> I've re(cross)compiled the custom 2.4.19-rmk7-omap1 linux kernel
> and removed the loop module that is only needed if you install
> a new system...

Can you post here those commands that you used to compile the kernel.
ARCH=/CROSS_COMPILE=/CC=/LD= and such make overrides being the interesting
parts.

Also, please include gcc parameters that the kernel build uses to compile
one .c source file, for example kernel/signal.c

> I've cross compiled the following programs or modules:
> -loop-aes v3.2c module(it lives at /lib/modules/2.4.19-rmk7-omap1/block/loop.o

Can you post here the command that you used to compile the module.
ARCH=/CROSS_COMPILE=/CC=/LD= and such make overrides being the interesting
parts.

Also, please include the output of the make command so that I can see that
gcc parameters match those used to build kernel sources.

> insmod works fine: dmesg shows: "loop: loaded(max 8 devices)"

OK. some code ran OK in the kernel module.

> but the mount command doesn't work:
> it asks for the password, then use the cpu at 100% and it is used by
> system not application according to a qopia application named system
> info...but didn't give me back my prompt
> 
> with the help of ##crypto in freenode i've tried the following command:
> losetup -e aes128 -K key.gpg /dev/loop/6 /dev/ahd/disc0/part3
> and again it asked for the password,used the cpu at 100%
> and didn't give me back my prompt...

How long did you wait?

The processor that you are using isn't a fast one. The slowest box that I
have access to, and that still boots, is 1991 vintage Intel 486 33 MHz.
Decrypting a gpg encrypted key file takes almost 3 minutes on that poor
machine. See:

# date; gpg --decrypt --passphrase-fd=3 3<foo <key.gpg >/dev/null; date
Wed Jul  9 08:13:04 EEST 2008
Reading passphrase from file descriptor 3
gpg: AES256 encrypted data
gpg: encrypted with 1 passphrase
Wed Jul  9 08:15:57 EEST 2008
# cat /proc/cpuinfo | grep bogomips
bogomips        : 16.53

The optional gpg patch that is included in loop-AES tarball changes default
passphrase iteration count so that dictionary attacks against a key file
will be much slower. It does have a side effect that decrypting a key file
on a slow machine can be very slow.

What happens if you create a symmetrically encrypted key file using
unpatched gpg, or using a patched one but with these gpg options:

 --s2k-count 65536

That option reverts the passphrase iteration count back to original default,
which is more suitable on slow computers.

-- 
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.