Drivers, tools, and libraries for Unix.

Most of these tools do not have to be built from source on current Linux distributions.

OpenCT

OpenCT provides drivers for smart card readers and makes them available via the CT-API or as a PC/SC-Lite ifdhandler. You don't really need this to use the eToken on Linux and build instructions are included here just for completeness.

OpenCT 0.6.14 on Mandriva 2006

Testing/Use

OpenSC

OpenSC provides an API to access smart cards. It can deal with both PCSC and OpenCT readers as well as PKCS#11 providers. For use with the eToken, pkcs11-tool and cardos-info are quite useful. OpenSC is also required for building other useful components of the OpenSC project.

OpenSC formatted cards use PKCS#15 and are widely supported on Unix. An eToken formatted with the FIPS option will not allow you to create the PKCS#15 application.

OpenSC 0.11.4 on Mandriva 2006

Testing/Use

CardOS-info

PKCS#15

pkcs15-init --pin 3333 --create-pkcs15 --profile pkcs15+onepin
# Did not enter a PUK when prompted.

$ pkcs15-tool --dump
PKCS#15 Card OpenSC Card:
Version : 1
Serial number : 2613BD171023
Manufacturer ID: OpenSC Project
Last update : 20061018165432Z
Flags : EID compliant

PIN User PIN
Com. Flags: 0x3
ID : 01
Flags : 0x3A, local, unblock-disabled, initialized, needs-padding
Length : min_len:4, max_len:8, stored_len:8

$ pkcs15-init --generate-key "rsa/1024" --auth-id 01 --pin 3333

$ pkcs15-tool --dump
PKCS#15 Card OpenSC Card:
Version : 1
Serial number : 2613BD171023
Manufacturer ID: OpenSC Project
Last update : 20061018184537Z
Flags : EID compliant

PIN User PIN
Com. Flags: 0x3
ID : 01
Flags : 0x3A, local, unblock-disabled, initialized, needs-padding
Length : min_len:4, max_len:8, stored_len:8
Pad char : 0x00
Reference : 1
Type : ascii-numeric
Path : 3f005015

Private RSA Key Private Key
Com. Flags : 3
Usage : 0x4, sign
Access Flags: 0x1D, sensitive, alwaysSensitive, neverExtract, local
ModLength : 1024
Key ref : 16
Native : yes
Path : 3f005015
Auth ID : 01
ID : 45

Public RSA Key Public Key
Com. Flags : 2
Usage : 0x4, sign
Access Flags: 0x0
ModLength : 1024
Key ref : 0
Native : no
Path : 3f0050153048
Auth ID :
ID : 45

$ pkcs15-init --store-private-key thawte-vt-20060914.p12 --format PKCS12 --auth-id 01 --key-usage sign
error:23076071:PKCS12 routines:PKCS12_parse:mac verify failure
Please enter passphrase to unlock secret key:
Importing 3 certificates:
0: /SN=Benchoff/GN=Phillip E/CN=Phillip E Benchoff/emailAddress=benchoff@bev.net
1: /C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte Personal Freemail Issuing CA
2: /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting/OU=Certification Services Division/CN=Thawte Personal Freemail CA/emailAddress=personal-freemail@thawte.com
Warning: requested key usage incompatible with key usage specified by X.509 certificate
User PIN required.
Please enter User PIN:
User PIN required.
Please enter User PIN:
User PIN required.
Please enter User PIN:
User PIN required.
Please enter User PIN:
User PIN required.
Please enter User PIN:

Libp11

Libp11 is a library implementing a small layer on top of PKCS#11 API to make using PKCS#11 implementations easier. It is required by Engine_PKCS#11 and pkcs11-helper.

Engine_PKCS#11

Engine_pkcs11 is an implementation of an engine for OpenSSL. It allows a PKCS#11 provider to be used make a smartcard usable from OpenSSL.

pkcs11-helper

Pkcs11-helper is a library that simplifies the interaction with PKCS#11 providers for end-user applications using a simple API. It is required to use eTokens with gnupg-pkcs11-scd and ssh. It is one of the most important tools for using the eToken with unix applications.

OpenSSL

Global Platform

Global Platform Library

gpshell

http://sourceforge.net/projects/globalplatform/

Sectok