YstokCard - smart card API

YstokCard is a portable Common Lisp library dealing with smart cards.
It allows a Lisp program to interact to integrated chip cards (ICC) and interface devices (IFD, card readers).

Memory cards can securely store relatively small amounts of data. Applications usually require certain conditions to be fulfilled before access to the data is possible, such as a PIN verification or authentication of the card.

Processor cards provide environment for the secure execution of programs. This makes smart cards good candidates for the entire security sector. Additionally, they have a well-established format and are convenient for manual use and handling.

YstokCard can be useful for programming both memory-based and file-based card applications. The library relies on the following "back-ends":

PS/SC specification
http://www.pcscworkgroup.com/
This specification tries to abstract the smart card layer into a high level API so that smart cards and their readers can be accessed in a homogeneous fashion.
Synchronous API for HID OmniKey readers
http://www.hidglobal.com/drivers/14980

PC/SC is a short for "Personal Computer/Smart Card". This specification integrates smart cards into computing environments. Microsoft has implemented PC/SC in Windows 2000. A free implementation of PC/SC, PC/SC Lite, is available for Linux and other Unixes. A forked version comes bundled with Mac OS X.

Basic features

Hardware

The library supports various smart card types including

In practice, YstokCard was tested with the following devices and cards.

Omnikey 5321
Contact and contactless (RFID 13,56 Mhz) smart card reader USB connected.
Mifare Classic/Ultralight
Contactless cards with 1KB, 4KB, or 256B memory chip by NXP Semiconductors.
ID-000
Visa/MasterCard/Europay (very slightly).

Dependencies

YstokCard requires Ystok-FFC and Ystok-Library.

Platforms

LispWorks
Tested on versions 4.4 and 6.1 for Windows.
SBCL
Tested on version 1.0.55 for Windows.

Download and installation

YstokCard is available from
http://lisp.ystok.ru/ycard/ycard-0-1-001.zip or
http://lisp.ystok.ru/ycard/ycard-0-1-001.tgz.

The distribution package contains both the ASDlite/ASDF-based ycard.asd and the LispWorks-based defsys.lisp system definition files.

See change.log.

Tests and examples

Some examples of YstokCard usage are listed here. The distribution includes the following files:

test.lisp
Simple tests based on the tester suit from the ACL-Compat lite module.
run-monitor.lisp
Starting and stopping the device monitor.

See also