Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Suggestion: gpg-agent for boot sequence
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: Sat May 02, 2009 9:45 pm    Post subject: Suggestion: gpg-agent for boot sequence Reply with quote

Hi,

I was tired of entering 9 passphrases for 9 encrypted partitions at every boot so I made a modification and want you to tell me what you think about it and whether you think that it might be a security problem.

What I basically did was starting the gpg-agent /lib/rcscripts/addons/dm-crypt-start.sh and let it cache the passphrase:

"#xxx" are the lines that I added.
Code:
...ebegin "Setting up dm-crypt mappings"
        export OLDHOME="${HOME}" #xxx
        export OLDUSER="${USER}" #xxx
        export HOME="/root" #xxx
        export USER="root" #xxx
        eval $(gpg-agent --daemon) #xxx
...
...
ewend ${cryptfs_status} "Failed to setup dm-crypt devices"
fi
export HOME="${OLDHOME}" #xxx
export USER="${OLDUSER}" #xxx
killall gpg-agent #xxx


$HOME and $USER need to be set for gpg to find the gpg keys in /root. This way I only have to enter my passphrase once for my root system to boot up, and then once (instead of 8) for gpg, the rest is opened with the help of gpg-agent automatically. Of course I could modify the initrd image to use gpg-agent too, but entering it twice is easy enough for me.

I created a gpg key pair for root and created new hdd keys for my luks partitions that are encrypted with the same passphrase that the gpg-agent caches. I added them to the LUKS partition and then put them encrypted in the root folder. They are decrypted by gpg on startup and piped to cryptsetup.

What do you think about this?
Back to top
View user's profile Send private message
Sujao
l33t
l33t


Joined: 25 Sep 2004
Posts: 677
Location: Germany

PostPosted: Sat Jun 20, 2009 5:29 pm    Post subject: Reply with quote

Nobody?
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