Published first in April 2017
I’ve been interested in smart card based cryptography for a while; there’s less risk that you misplace your valuable private keys as compared to a digital file, as the card doesn’t spit out your private key - meaning that physical possession of the original card itself is needed to do anything (unless you prepare multiple cards with the same secret keys). And just recently, an opportunity came to acquire a few things…
Firstly, I acquired a Gemalto IDBridge CT700 PIN-pad reader; unlike most readers sold in Finland, this one has an integrated PIN pad to avoid against the danger of a keylogger snooping my PIN code.
I’m actually quite surprised about how tricky standalone pinpad readers are to find; the Finnish stores I checked often only have non-PIN models, and the PIN models typically are specialized keyboards with integrated readers. Not desirable - I already have a perfectly fine mechanical keyboard! I finally ended up buying the reader from the same shop as the next product, which is..
An OpenPGP smartcard. I decided to buy a special Mifare model, for the possible eventuality that I’ll also want it to do NFC stuff; the cryptography functionality is not accessible from it though, which is a minor drawback. Serial numbers are partially hidden - would you expose all the details on your cards’ physical appearance either? ;)
Both of these products were bought from the FLOSS-Shop, also formerly known as Kernel Concepts Shop. The experience of buying was very straightforward - after a short email discussion, I placed an order and paid it; the order shipped next day, and arrived promptly next week exactly as promised :)
Setting up a smart card key was fairly uncomplicated; find a suitable Linux machine (I used an older, offline dedicated machine for that), then use GnuPG to create the keyset (master key and subkeys for the card, all 4096-bit RSA) and upload the subkeys to the smartcard. Technically, the card would have been capable of creating the keys right on the card - but I decided to have encrypted backups for the possibility that the card gets lost or ruined (remember, you cannot easily coax the private key out of the card!). Of course, I also have a backed-up, printed-on-paper revocation certificate which invalidates the key the moment I publish it. Let’s hope I don’t need it right away though…
Although GPG is a highly complex piece of software, with some study of the manual and a few tutorials, I soon ended up with a card capable of decrypting and signing stuff - without ever exposing the private keys to the host PC. Gpg4Win also works very nicely with it, properly recognizing the smartcard and being able to ask the card to operate with the keys where needed.
There were some hitches with the PIN not being asked from the reader’s PIN pad; this was solved by a small alteration of the card’s contents to work around a device-specific gotcha. After that, GPG started using the reader correctly for PIN requests, both on Linux and Windows.
I also happen to be an owner of a Finnish identity card with a chip; these ID cards were once advertised for their ability to securely log on to services; in practice, bank-issued identification mechanisms dominate, and a cursory glance seems to hint that the electronic ID card is mostly accepted by governmental services only. Naturally, I wanted to have a go trying its features.
Finnish ID cards use a special program (link in Finnish) made by Fujitsu; this program does seem to conflict with GPG, causing card errors on GPG wherever the DigiSign client is running. Shutting it down does solve the problem though, allowing the OpenPGP card to work properly again.
A minor disappointment was caused by the client program not supporting the PIN pad and instead preferring to use its own GUI; it is unclear if this is due to the DigiSign itself or the device. Nevertheless, the practical consequence is that I can not use the device itself to enter the PINs used for the identity card, somewhat increasing the risk of the PIN being compromised.
Despite the issues, I was able to get the client to function rather nicely on Windows 10; both Internet Explorer / Edge (ick) and Firefox were able to ask the card for a client certificate, which was then utilized to authenticate me to a given service.
Naturally, I also need a place to publish my new cryptographic identity. I recently heard of Keybase which uses a fascinating set of technologies to have publicly auditable, highly secure identity records (and I’d imagine more accessible than traditional keyservers as well!). And so I went and created an account there. I was conveniently able to use my smartcard-based signature key as the root to my identity; very nice to not be dependent to any specific computer ;)
I have also updated several locations on my website to include links and references to both the key and the Keybase identity.
All in all, it seems utilizing secure cryptography isn’t all that complicated in the end; some bodging was required, but mostly everything worked out without major hitches. And the end result, having a fairly secure cryptographic device available is a major benefit. If one is teeter-tottering on making a decision, consider this post as a gentle encouragement.
Now, I just need to start using it with things :D maybe one of the first things would be also getting a portable PIN reader, as the desktop model is a tad clunky.. unfortunately, I have still not managed to locate one for sale for a reasonable price. Once I’ve got that, I can use my card, for example, as a SSH authentication factor in places, again being a tad less dependent on a specific machine.