Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cryptsetup+gpg not working in /etc/init.d/dmcrypt. bug?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Sujao
l33t
l33t


Joined: 25 Sep 2004
Posts: 677
Location: Germany

PostPosted: Wed Apr 01, 2009 8:06 pm    Post subject: cryptsetup+gpg not working in /etc/init.d/dmcrypt. bug? Reply with quote

I decided to decrypt my encrypted partitions with gpg keys instead of entering the passwords at boot every time. I have about 9 partitions so this is quiet tiresome.

I have the feeling that the decrypting function in /lib/rcscripts/addons/dm-crypt-start.sh that takes the data from /etc/conf.d/dmcrypt is not working correctly. It passes the key directly to cryptsetup through piping:
Code:
gpg ${gpg_options} ${key} 2>/dev/null | cryptsetup ${options} ${arg1} ${arg2} ${arg3}

I tried doing this command manually on a fully booted system after I closed the home mapping manually
Code:
gpg -q -d --cipher-algo AES256 home.gpg 2>/dev/null | cryptsetup luksOpen /dev/md5 home

and it didn't work. So I tried passing the key file as an argument (not the key directly) as it is described in the man file of cryptsetup and it worked! ("home" is the name of the mapping and also the file where the key is stored)
Code:
cryptsetup luksOpen /dev/md5 home --key-file home


So my conclusion is that the script is buggy or the behaviour of cryptsetup changed in one of the recent versions. Any ideas?
Back to top
View user's profile Send private message
Sujao
l33t
l33t


Joined: 25 Sep 2004
Posts: 677
Location: Germany

PostPosted: Thu Apr 02, 2009 3:45 pm    Post subject: Reply with quote

Can someone at least confirm that cryptsetup-1.0.5-r1, gnupg-2.0.10 and baselayout-1.12.11.1 are working for him with a gpg key file configuration? Thanks
Back to top
View user's profile Send private message
Sujao
l33t
l33t


Joined: 25 Sep 2004
Posts: 677
Location: Germany

PostPosted: Fri Apr 17, 2009 3:11 pm    Post subject: Reply with quote

There is a bug report on this: https://bugs.gentoo.org/show_bug.cgi?id=266546
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum