1 |
Hi, |
2 |
|
3 |
On Fri, 17 Jul 2015 10:18:14 +0200 Kristian Fiskerstrand wrote: |
4 |
> > Additionally, I feel that a signature is a means of acknowledging |
5 |
> > that a package has been looked over, and that developer has stated |
6 |
> > that they approve of the existing state. I'm not sure if others |
7 |
> > agree with that sentiment, |
8 |
> |
9 |
> I appreciate that you bring up this point. I would expect that part of |
10 |
> that state is for the developer to verify the source distfile from |
11 |
> upstream using OpenPGP / GnuPG as well, i.e not just rely on TOFU |
12 |
> (trust on first use). This also means keeping a (locally) certified |
13 |
> copy of the upstream distribution key that is reasonably verified by |
14 |
> the developer. |
15 |
|
16 |
Let me point another issue related to discussion above. It would be |
17 |
nice to have cryptographic verification of already installed |
18 |
packages. This will help in forensics and security audit of the |
19 |
systems, so that even without external snapshot of the system it |
20 |
will be possible to check for malicious changes of installed |
21 |
packages. |
22 |
|
23 |
Right now we have /var/db/pkg/$cat/$name/CONTENTS file with such |
24 |
data, but: |
25 |
1. It uses md5 for file checksums. |
26 |
2. It is not signed. |
27 |
|
28 |
So my proposal is: |
29 |
1. Switch to more cryptographically secure hash (e.g. sha512 or |
30 |
whirlpool). |
31 |
2. Add an optional feature to emerge (or even to PMS?) allowing user |
32 |
to provide a usable GPG key for signing packages CONTENTS files |
33 |
after its generation. In order for such key to be usable during |
34 |
emerge run, gpg-agent should be used; alternatively it may be |
35 |
allowed to sign already installed packages on a trusted system. |
36 |
3. Of course backward compatibility with old CONTENTS format should |
37 |
be kept. |
38 |
|
39 |
This proposal is not my own whim: I have requests from users for |
40 |
such functionality which is quite wanted on production setups. |
41 |
|
42 |
Best regards, |
43 |
Andrew Savchenko |