Gentoo Archives: gentoo-security

From: Chris Frederick <cdf123@××××××.net>
To: gentoo-security@l.g.o
Subject: Re: [gentoo-security] User authentication with key-file and gpg-agent
Date: Mon, 03 Mar 2008 19:24:01
Message-Id: 47CC5025.90306@cdf123.net
In Reply to: [gentoo-security] User authentication with key-file and gpg-agent by Florian Philipp
1 Florian Philipp wrote:
2 > Hi!
3 >
4 > Now that my initrd-script is ready and provides me with the means to
5 > encrypt partitions with a gpg-encrypted key-file [1], I'd like to use
6 > the very same file for user authentication.
7 >
8 > It would be even better if gpg-agent could get it right from the user
9 > authentication (pam) to use it for as many services as possible, ssh,
10 > gpg, gnome-keyring (?), sudo (?), password database.
11 >
12 > I think what I really want is something like a poor man's version of
13 > smartcard authentication.
14 >
15 > Could you please give me some hints? I'd be pleased to hear any
16 > comments, criticism and recommendations on that issue.
17 >
18 > Thanks in advance!
19 >
20 > Florian Philipp
21 >
22 > [1] basically 1k of random data, encrypted with 3DES by gpg
23
24 emerge pam_usb
25
26 The latest version of pam_usb uses the usb serial number of the drive,
27 the older one uses an encrypted key in a hidden directory and can be
28 used with more than just a usb key (basically any mountable device would
29 work).
30
31 I would also recommend checking out how to make your own custom rules in
32 udev. This can let you auto-mount the device on connect, or run a
33 command on connect, etc..
34
35 Between the two you should be able to make a good auth function. If you
36 know any C/C++ you could combine the two into a custom setup (e.g. using
37 the contents of a file on the key, decrypted via the serial number to
38 get your gpg data..., or use your imagination.)
39
40 Good luck,
41 Chris Frederick
42 --
43 gentoo-security@l.g.o mailing list