On Tue, 2018-08-21 at 14:44 +0300, Andrew Savchenko wrote: > On Tue, 21 Aug 2018 08:44:22 +0200 Michał Górny wrote: > > On Tue, 2018-08-21 at 02:26 +0300, Andrew Savchenko wrote: > > > On Mon, 20 Aug 2018 16:57:52 -0400 Alec Warner wrote: > > > > On Mon, Aug 20, 2018 at 4:27 PM, Kristian Fiskerstrand > > > > wrote: > > > > > > > > > On 08/20/2018 10:18 PM, Alec Warner wrote: > > > > > > Are there other ways to measure if the keys are used in the manner we are > > > > > > hoping for? > > > > > > > > > > Nope... additional complexity arise if multiple signing keys exists > > > > > (primary or subkeys), and furthermore there is no guarantee the key is > > > > > stored on key only. > > > > > > > > > > That said, the actual security is even further muddied by operational > > > > > security concerns regarding how the primary key is accessed even in the > > > > > event signing subkey is on card only.. and other security precations > > > > > required by the developers for the token to have any meaningful addition > > > > > to security as an attacker can anyways just wait for it to be be > > > > > available, in particular if not mandating forcesig on the openpgp applet > > > > > and counting the number of signatures manually to detect abnormalities. > > > > > > > > > > > > > I assert that the hardware token, when the key is stored only in the token > > > > and not in another place online, prevents export of key material. > > > > > > No, it doesn't. The cost of extracting a key from a stolen token is > > > approximately $1000 depending on a token model. > > > > What is the cost of extracting a key from a stolen hard drive? > > Keys on my hard drive have double encryption using independent > algorithms and passwords. So if we are talking about cost of > retrieving such case from hard drive alone (and not other attack > vectors), it will be infinite. What if you install a malicious GnuPG upgrade that leaks your secret key material upon decryption? It's not that hard. In fact, if right now our 'gpg --version' output 'This version has been hacked by Gentoo to prove how easy it is to release hacked software without anyone noticing', how many users would actually notice that? And we're talking about *easily visible* change vs silent behavior that can easily be implemented without raising any suspicion, especially given that gpg2 operates almost entirely in the background. I mean, you could do it without any user-visible slowdown, additional processes etc. How could it happen? Let's say that a Gentoo maintainer account is compromised. When a new version of GnuPG is released, the account is used to perform the bump using a malicious tarball hosted on Gentoo Infra. Of course, this would probably be noticed sooner or later, though replacing it with a valid bump shortly afterwards reduces the chance of detecting it in time. Before we can deal even with establishing how many developers were affected, the attacker can have dozens of private keys ready to be used. This is one attack vector that -- AFAIU -- hardware tokens protect against. The attacker can find a way to use the key remotely but he can't obtain it. Of course, you can now start arguing that's bad enough as it is, so making it worse doesn't matter. PS. I wonder how many users checked our 'gpg --version' at this point. -- Best regards, Michał Górny