Table of Contents
~~META: status = done &relation firstimage = :project:cryptotoken.jpg ~~
The aim of the project is to explore uses of cryptographic tokens, starting with Feitian ePass 2003. At first basic features like use for SSH and GnuPG, later possibly extended options provided by OpenSC and PKCS#11 interface - e.g. code signing, TLS client certificates.
Notes and prepared packages
- Compiled RPMs for EL6 x86_64 and source RPM packages for EL6/Fedora 17-18 (note: F17/18 requires just the opensc package)
epass2003 hacking and debugging
Workshop took place in February. Few notes below.
The token offers multiple interfaces:
- note on
~/.ssh/config- PKCS11Provider option (OpenSSH 5.5p1 or later recommended)
- Import of PGP/GnuPG key and basic operations - decrypt, verify (GnuPG PKCS#11 interface)
- Overview of PAM and PAM configuration.
- pam_pkcs11 - PAM module to perform authentication via PKCS#11 interface offered by the token
- one example for some
/etc/pam.d/config file (e.g. sudo)
- Import of client certificate from PKCS#12 file
OpenSC >= 0.13.0 required. Check OpenSC on github for recent fixes, I've commited some to upstream.
Other tutorials on gooze.eu.
GnuPG support is kind of hackish, PKCS#11 mostly works except for replug bug - if token is replugged while long-running app like Firefox or gpg-agent is still running, it won't get reinitialized correctly. The OpenSC driver should reissue SCP-01 handshake after ATR, but doesn't.
The Yubikey Neo with NFC seems interesting, too. It's the standard Yubikey with NFC NDEF type 4 tags and Mifare classic interface. Applications:
- OTP token working as USB HID keyboard that writes OTP when button is pushed (this is the original Yubikey's functionality)
- usable e.g. for SSH two-factor authentication
- multiple “slots” or “apps”
- not much technical information yet (“Yubico will share more information on how this can be used in Q1, 2013”)
- product page says something about Common Criteria certified bank grade authentication ICs, but what EAL level?
- does attacking via Mifare Classic interface reveal random seeds or RNG states usable for other interfaces? (HID, NFC)
- could the above be combined with NDEF record composition attack?
Yubikey has its own PAM module pam_yubico which is quite configurable. E.g. it can provide two-factor auth or replacing passwords with OTP.