Gentoo Archives: gentoo-nfp

From: "Michał Górny" <mgorny@g.o>
To: gentoo-nfp@l.g.o
Subject: Re: [gentoo-nfp] Developer Crypto Hardware (AGM)
Date: Wed, 22 Aug 2018 13:37:29
Message-Id: 1534945039.1559.12.camel@gentoo.org
In Reply to: Re: [gentoo-nfp] Developer Crypto Hardware (AGM) by Andrew Savchenko
1 On Tue, 2018-08-21 at 14:44 +0300, Andrew Savchenko wrote:
2 > On Tue, 21 Aug 2018 08:44:22 +0200 Michał Górny wrote:
3 > > On Tue, 2018-08-21 at 02:26 +0300, Andrew Savchenko wrote:
4 > > > On Mon, 20 Aug 2018 16:57:52 -0400 Alec Warner wrote:
5 > > > > On Mon, Aug 20, 2018 at 4:27 PM, Kristian Fiskerstrand <k_f@g.o>
6 > > > > wrote:
7 > > > >
8 > > > > > On 08/20/2018 10:18 PM, Alec Warner wrote:
9 > > > > > > Are there other ways to measure if the keys are used in the manner we are
10 > > > > > > hoping for?
11 > > > > >
12 > > > > > Nope... additional complexity arise if multiple signing keys exists
13 > > > > > (primary or subkeys), and furthermore there is no guarantee the key is
14 > > > > > stored on key only.
15 > > > > >
16 > > > > > That said, the actual security is even further muddied by operational
17 > > > > > security concerns regarding how the primary key is accessed even in the
18 > > > > > event signing subkey is on card only.. and other security precations
19 > > > > > required by the developers for the token to have any meaningful addition
20 > > > > > to security as an attacker can anyways just wait for it to be be
21 > > > > > available, in particular if not mandating forcesig on the openpgp applet
22 > > > > > and counting the number of signatures manually to detect abnormalities.
23 > > > > >
24 > > > >
25 > > > > I assert that the hardware token, when the key is stored only in the token
26 > > > > and not in another place online, prevents export of key material.
27 > > >
28 > > > No, it doesn't. The cost of extracting a key from a stolen token is
29 > > > approximately $1000 depending on a token model.
30 > >
31 > > What is the cost of extracting a key from a stolen hard drive?
32 >
33 > Keys on my hard drive have double encryption using independent
34 > algorithms and passwords. So if we are talking about cost of
35 > retrieving such case from hard drive alone (and not other attack
36 > vectors), it will be infinite.
37
38 What if you install a malicious GnuPG upgrade that leaks your secret key
39 material upon decryption?
40
41 It's not that hard. In fact, if right now our 'gpg --version' output
42 'This version has been hacked by Gentoo to prove how easy it is to
43 release hacked software without anyone noticing', how many users would
44 actually notice that? And we're talking about *easily visible* change
45 vs silent behavior that can easily be implemented without raising any
46 suspicion, especially given that gpg2 operates almost entirely
47 in the background. I mean, you could do it without any user-visible
48 slowdown, additional processes etc.
49
50 How could it happen? Let's say that a Gentoo maintainer account is
51 compromised. When a new version of GnuPG is released, the account is
52 used to perform the bump using a malicious tarball hosted on Gentoo
53 Infra. Of course, this would probably be noticed sooner or later,
54 though replacing it with a valid bump shortly afterwards reduces
55 the chance of detecting it in time. Before we can deal even with
56 establishing how many developers were affected, the attacker can have
57 dozens of private keys ready to be used.
58
59 This is one attack vector that -- AFAIU -- hardware tokens protect
60 against. The attacker can find a way to use the key remotely but he
61 can't obtain it. Of course, you can now start arguing that's bad enough
62 as it is, so making it worse doesn't matter.
63
64 PS. I wonder how many users checked our 'gpg --version' at this point.
65
66 --
67 Best regards,
68 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-nfp] Developer Crypto Hardware (AGM) Kristian Fiskerstrand <k_f@g.o>