[dm-crypt] cryptsetup not accepting plain passwd with -d option

Nikhil AR nikhilalayil at gmail.com
Tue Jan 31 15:49:27 CET 2012


Hi,

I have created an encrypted ISO image of a directory named data using the
below command.

# mkisofa -r data | aespipe -p3 -e aes256 3<./passphrase > data.iso

In order to mount encrypted disk using dm-crypt, I followed below steps:

1) creating the loop device
# losetup /dev/loop0 data.iso

2) creating device mapper device for this loop device
# cryptsetup -c aes -s 256 -h sha512 -d./passphrase create aesdev /dev/loop0

3) mount dm device on an empty folder to access iso contents
# mount /dev/mapper/aesdev /mnt

The mount command gives me the below error:
# mount: you must specify the filesystem type

After lot of trial and error iterations, I figured out that cryptsetup is
the culprit. Because issue surfaces only when -d option of cryptsetup is
used. If I'm giving the password manually when cryptsetup prompts,
everything works fine. Also a wrongly entered passphrase is not also
reported until the mount step is attempted.

[root at dhcp210-115 ~]# cat passphrase
thisisanaes256passphrasetotestae

Is there a way to provide cryptsetup its password in a file when it is used
in this manner?

Thanks in advance.

Cheers,
-- Nikhil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20120131/cd32cd2a/attachment.html>


More information about the dm-crypt mailing list