John Goerzen: Detailed Smart Card Cryptographic Token Security Guide
After my first post about smartcards under Linux, I thought I would share some information I ve been gathering.
This post is already huge, so I am not going to dive into much specific commands, but I am linking to many sources with detailed instructions.
I ve reviewed several types of cards. For this review, I will focus on the OpenPGP card and the Yubikey NEO, since the Cardomatic Smartcard-HSM is not supported by the gpg version in Jessie.
Both cards are produced by people with strong support for the Free Software ecosystem and have strong cross-platform support with source code.
OpenPGP card: Basics with GnuPG
The OpenPGP card is well-known as one of the first smart cards to work well on Linux. It is a single-application card focused on use with GPG. Generally speaking, by the way, you want GPG2 for use with smartcards.
Basically, this card contains three slots: decryption, signing, and authentication slots. The concept is that the private key portions of the keys used for these items are stored only on the card, can never be extracted from the card, and the cryptographic operations are performed on the card. There is more information in my original post. In a fairly rare move for smartcards, this card supports 4096-byte RSA keys; most are restricted to 2048-byte keys.
The FSF Europe hands these out to people and has a lot of good information about them online, including some HOWTOs. The official GnuPG smart card howto is 10 years old, and although it has some good background, I d suggest using the FSFE instructions instead.
As you ll see in a bit, most of this information also pertains to the OpenPGP mode of the Yubikey Neo.
OpenPGP card: Other uses
Of course, this is already pretty great to enhance your GPG security, but there s a lot more that you can do with this card to add two-factor authentication (2FA) to a lot of other areas. Here are some pointers:
OpenPGP card: remote authentication with ssh
You can store the private part of your ssh key on the card. Traditionally, this was only done by using the ssh agent emulation mode of gnupg-agent. This is still possible, of course.
Now, however, the OpenSC project now supports the OpenPGP card as a PKCS#11 and PKCS#15 card, which means it works natively with ssh-agent as well. Try just ssh-add -s /usr/lib/x86_64-linux-gnu/pkcs11/opensc-pkcs11.so if you ve put a key in the auth slot with GPG. ssh-add -L will list its fingerprint for insertion into authorized_keys. Very simple!
As an aside: Comments that you need scute for PKCS#11 support are now outdated. I do not recommend scute. It is quite buggy.
OpenPGP card: local authentication with PAM
You can authenticate logins to a local machine by using the card with libpam-poldi here are some instructions.
Between the use with ssh and the use with PAM, we have now covered 2FA for both local and remote use in Unix environments.
OpenPGP card: use on Windows
Let s move on to Windows environments. The standard suggestion here seems to be the mysmartlogon OpenPGP mini-driver. It works with some sort of Windows CA system, or the local accounts using EIDAuthenticate. I have not yet tried this.
OpenPGP card: Use with X.509 or Windows Active Directory
You can use the card in X.509 mode via these gpgsm instructions, which apparently also work with Windows Active Directory in some fashion.
You can also use it with web browsers to present a certificate from a client for client authentication. For example, here are OpenSC instructions for Firefox.
OpenPGP card: Use with OpenVPN
Via the PKCS#11 mode, this card should be usable to authenticate a client to OpenVPN. See the official OpenVPN HOWTO or these other instructions for more.
OpenPGP card: a note on PKCS#11 and PKCS#15 support
You ll want to install the opensc-pkcs11 package, and then give the path /usr/lib/x86_64-linux-gnu/pkcs11/opensc-pkcs11.so whenever something needs the PKCS#11 library. There seem to be some locking/contention issues between GPG2 and OpenSC, however. Usually killing pcscd and scdaemon will resolve this.
I would recommend doing manipulation operations (setting PINs, generating or uploading keys, etc.) via GPG2 only. Use the PKCS#11 tools only to access.
OpenPGP card: further reading
- Background on how these things work
- Fellowship homepage, HOWTO
- Debian portal page with lots of info
- g10code page from the person behind the hardware
- Ordering information
- OpenPGP JavaCard Applet (pc/sc-compatible)
- Personal Identity Verification [PIV] (pc/sc-compatible, PKCS#11-compatible in Windows and OpenSC)
- Yubico HOTP, via your own auth server or Yubico s
- OATH, with its two sub-modes:
- OATH TOTP, with a mobile or desktop helper app (drop-in for Google Authenticator
- OATH HOTP
- Challenge-response mode
- U2F (Universal 2nd Factor) with Chrome
- Windows auth
- libpam-yubico, a quite versatile PAM module
I've been using qsub for a while now on the cluster here at the
The
It's been a while since I talked about Ceilometer and its companions, so I
thought I'd go ahead and write a bit about what's going on this side of
OpenStack. I'm not going to cover new features and fancy stuff today, but
rather a shallow overview of the new project processes we initiated.
Ceilometer growing
Ceilometer development activity
What happened in the 



It s 



My monthly report covers a large part of what I have been doing in the free software world. I write it for 
So we're in Finland, and the differences start out immediately.
We're renting a flat, in building ten, on a street. You'd think "10
Streetname" was a single building, but no. It is a pair of buildings: 10A, and 10B.
Both of the buildings have 12 flats in them, with 10A having 1-12, and 10B having 13-24.
There's a keypad at the main entrance, which I assumed was to let you press a button and talk to the people inside "Hello I'm the postmaster", but no. There is no intercom system, instead you type in a magic number and the door opens.
The magic number? Sounds like you want to keep that secret, since it lets people into the common-area? No. Everybody has it. The postman, the cleaners, the DHL delivery man, and all the ex-tenants. We invited somebody over recently and gave it out in advance so that they could knock on our flat-door.
Talking of cleaners: In the UK I lived in a flat and once a fortnight somebody would come and sweep the stair-well, since we didn't ever agree to do it ourselves. Here somebody turns up every day, be it to cut the grass, polish the hand-rail, clean the glass on the front-door, or mop the floors of the common area. Sounds awesome. But they cut the grass, right outside our window, at 7:30AM. On the dot. (Or use a leaf-blower, or something equally noisy.)
All this communal-care is paid for by the building-association, of which all flat-owners own shares. Sounds like something we see in England, or even like Americas idea of a Home-Owners-Association. (In Scotland you own your own flat, you don't own shares of an entity which owns the complete building. I guess there are pros and cons to both approaches.)
Moving onwards other things are often the same, but the differences when you spot them are odd. I'm struggling to think of them right now, somebody woke me up by cutting our grass for the second time this week (!)
Anyway I'm registered now with the Finnish government, and have a citizen-number, which will be useful, I've got an appointment booked to register with the police - which is something I had to do as a foreigner within the first three months - and today I've got an appointment with a local bank so that I can have a euro-bank-account.
Happily I did find a gym to join, the owner came over one Sunday to
give me a tiny-tour, and then gave me a list of other gyms to try if
his wasn't good enough - which was a nice touch - I joined a couple of
days later, his gym is awesome.
(I'm getting paid in UK-pounds, to a UK-bank, so right now I'm getting local money by transferring to my wifes account here, but I want to do that to my own, and open a shared account for paying for rent, electricity, internet, water, & etc).
My flat back home is still not rented, because the nice property management company lost my keys. Yeah you can't make that up can you? With a bit of luck the second set of keys I mailed them will arrive soon and the damn thing can be occupied, while I'm not relying on that income I do wish to have it.
My previous blog posts about
Long long time ago I wanted to have
I have already updated the packaging for the latest version 0.8.7, which will be included in Debian/sid rather soon. Thanks again especially Mattia for his great work.






