Live data from Hacker News

Secure yourself, Part 1: Air-gapped computer, GPG and smartcards

viccuad.me

11–20 of 62 posts

Re: Secure yourself, Part 1: Air-gapped computer, GPG and smartcards

#11
post #9
post #7

Earlier quoted context omitted.

For a little while, I used a YubiKey NEO-n as an OpenPGP smartcard, with gpg-agent running as an ssh-agent (so that my SSH key was only present on my smartcard). While great in theory, the authentication time made it totally impractical to connect to multiple servers at once. I know this doesn't invalidate the general idea of using gpg-agent as ssh-agent -- just an anecdote.

Can you elaborate on 'authentication time made it totally impractical' ? Does this mean it was slow? I'm using gpg-agent on osx with a neo-n to ssh into boxes and it's not noticeably slow.

I got this just this second on my debian8 system.

:~$ time ssh an6n@mybox exit

real 0m1.910s

user 0m0.024s

sys 0m0.000s

Re: Secure yourself, Part 1: Air-gapped computer, GPG and smartcards

#12
post #3

How easy is it for somebody to get your PGP key off a yubikey if they stole it? In particular since physical devices can be fuzzed, etc, it might be worse than an encrypted keychain on device for some people?

I don't know how difficult it would be to obtain the key from the device. However, if you have a strong passphrase on the key itself, then even if an attacker obtained the key, there would not be a lot to worry about. Just revoke it and move on. They'll likely never guess the passphrase.

Re: Secure yourself, Part 1: Air-gapped computer, GPG and smartcards

#13
I'm a little worried about generating a new "master" RSA key nowadays, since it seems like ECC is right on the horizon of going mainstream. I would generate a new Ed25519 key today with GPG 2.1, but Curve25519 encryption isn't supported yet (only signing is). Does anyone else have the same feeling of apprehension?

Re: Secure yourself, Part 1: Air-gapped computer, GPG and smartcards

#14
post #5

When's the Part 2 gonna be published? Will there be a blog post about using gpg-agent as a ssh-agent? :) BTW, Androids openkeychain supports fully yubikey neo, this is a great addition to using the pass(1) on from mobile with yubikey neo. https://github.com/zeapo/Android-Password-Store http://www.openkeychain.org/

I will not give up on this setup, minus the Yubikey (would love to one day), but it recently broke it when I updated via F-Droid, and it has not been the same since.

https://github.com/zeapo/Android-Password-Store/issues/77

Still, the only password manager simple enough that I can understand it and will actually use.

http://git.zx2c4.com/password-store/

Re: Secure yourself, Part 1: Air-gapped computer, GPG and smartcards

#15
post #12
post #3

How easy is it for somebody to get your PGP key off a yubikey if they stole it? In particular since physical devices can be fuzzed, etc, it might be worse than an encrypted keychain on device for some people?

I don't know how difficult it would be to obtain the key from the device. However, if you have a strong passphrase on the key itself, then even if an attacker obtained the key, there would not be a lot to worry about. Just revoke it and move on. They'll likely never guess the passphrase.

If you're that confident in your pass-phrase, you could just push your private key to github. Might want to consider that there is some overlap between being able to steal your yubi-key, and being able to install a hardware (or software) key logger...

Re: Secure yourself, Part 1: Air-gapped computer, GPG and smartcards

#17
"quite possible that this kind of device will be the norm in 10 years"

I want to believe this, but I just can't see people caring, ever. The worst has already happened. Edward Snowdon has exposed that government can, and does, look at you penis and we still don't care.

Re: Secure yourself, Part 1: Air-gapped computer, GPG and smartcards

#19
post #2

Simpler version is to encrypt root partition and have kernel with boot loader on separate sd card or usb flash drive.

I used to run this until I couldn't ignore that it was pointless because it offloads the attack vector to something I can easily lose, have taken or replaced. Or someone could come in an pop in a drive with their own kernel. Nevermind the reality that I'd never completely follow through with the security measures needed on a personal machine. I'd just be giving myself an active role in my home's security theater. I j…

The card also contains certificate protected by password.

Re: Secure yourself, Part 1: Air-gapped computer, GPG and smartcards

#20
Very nice guide, but a couple of things:

1) No mention of full-disk encryption on both machines. This is trivial, and especially with flash-storage I consider it mandatory. There's hardly any reason not to do fde.

This protects data at rest, and makes the system(s) somewhat tamper proof. You're still counting on the BIOS and keyboard to be safe (not booting into a vm, no hardware keylogger) -- but at least it makes it a little harder to compromise the system.

One could use/add the neo passphrase to the boot procedure, but it is easy to copy (just get hold of the neo, plug it in, push button) -- and there's no way to know the key has been compromised.

With a manually entered pass phrase, the input path needs to be compromised (eg: hardware key logger). In many theat scenarios the two are similar -- but there's a difference between someone lifting the yubikey for 10 seconds when you're passed out at a party, and someone breaking-and-entering to your apartment and installing a hw key logger/bios back door etc.

2) I've been running FDE/LUKS on my laptop(s) -- and have been considering to add a passphrase on an usb dongle (I don't have a yubikey neo, and my old yubikey II that I got as a promo seem to have stopped working, the button does nothing -- not sure why). This is a trade-off, as anything else.

The constraint of having to be able to type in a pass phrase blindly (and quickly), does not mix well with having a pass phrase that is at least equivalent to a 128 bit random key. If you just want a random phrase of lower-case letters (easier to touch type, don't have to remember where capital letters go/avoid errors with shift) you need ~28 random characters (with a set of ~67 characters, you get down to ceiling(128/log2(67))=22 -- with more room for errors while typing)).

Another thing, is that any such "unlocked" key needs manual intervention to be removed. So if someone steals your laptop and your yubi/usb-key with a static passphrase/key -- they can be expected to gain access, and you can't do anything about it.

This is of course true if they capture your pass phrase with a keylogger before stealing the laptop as well (I wonder a bit about this account[1] from the DPR case -- if it is misinformation of incompetence -- but I'd assume the smartest thing to do was a sneak-and-peak warrant installing a hw key logger (or just a camera) in order to make sure that they had most of the passwords/pass phrases. Seems strange that they weren't able to obtain probable cause for that).

[1] http://www.wired.com/2015/05/silk-road-2/ (If TL;DR search for library)

Post reply on HN