Smartcards with Linux

Introduction

Smartcards are small plastic cards with a chip on it, conforming to ISO/IEC 7816. There are two general kinds: memory cards (providing non-volatile memory) and processor cards. The specifications are available since at least 1989.

Examples for smartcards include

New-style flash memory cards such as SD, MMC, xD, MS, or CF cards are NOT considered smartcards.

System

A system employing a smartcard consists of these components:

There is a large variety of ICCs and CTs available, ISO/IEC 7816 ensures interoperability among them. Predominant communications layers are traditional serial or serial-over-USB connections, but some built-in CTs in laptop computers present a PCMCIA device interface.

Application Programming Interfaces

There are at least four different APIs at various levels for CT and ICC access: CT-API, IFDHandler, CCID, and PC/SC. Due to the wide variety of ICCs, the APIs at most attempt to abstract management and CT interaction.

CT-API is the most basic of all: Devised by Deutsche Telekom, GMD, TUeV, and Teletrust, it specifies a protocol with a single request/response interaction. Depending on the address, the messages are sent to the CT or the ICC.

There is a USB class specification CCID (Chip/Smart Card Interface Devices).

IFDHandler is PC/SC Lite's driver API. It uses Windows-style coding conventions.

The PC/SC Workgroup developed the PC/SC API as an application API. It is compatible with the MS Windows winscard API and provides 19 function calls.

Software

Some drivers implement the IFDHandler API in terms of the CT-API, among them OZSCR and Towitoko.

PC/SC Lite implements the PC/SC API, using the IFDHandler API for its drivers.

Further Links


Written by Jens Maurer, my e-mail address is first name dot last name at gmx dot net.
$Id: index.html,v 1.2 2006/08/08 19:37:47 jmaurer Exp $