Introduction
SmartK provides a simple API that allows kernel modules to
interact directly with smart card.
The frawework exports 3 functions:
- smartk_init_card(): to activate the card.
- smartk_data(BYTE *new_cmd, int len_cmd, BYTE *new_rsp, int
*len_rsp): to send an APDU to the activated smart card and to receive
the answer (BYTE is a typedef of unsigned char).
- smartk_cleanup_card(): to disactivate the card.
All the functions return -1 on error.
SmartK is composed by four modules:
- smartk.o: the core of the framework
- pt_t0_smartk.o: implements protocol ISO 7816-3 T=0
- ifd_towitoko_smartk.o: the Towitoko reader's driver
- io_serial_smartk.o: a simple interface with the serial port.
An example of how to use the framework is test_mod, a module that
offers
an interface to the framework for users. It handles the character
device /dev/smartk.
An user who wants to communicate with a card writes the APDU in byte to
the
device and receives the reply reading from it.
The file demo.c shows an example with an ISO 7816 standard card.
SmartK is based on the
Unix
driver for Towitoko card readers created by
Carlos Prados.
Supported Reader
Towitoko Chipdrive Micro 120
Supported Port
RS252 serial port
Supported Protocol
Short Case 1,2,3,4 of ISO 7816-3 T=0 protocol.
Download
This software is provided under GPL.
Authors
Luigi Catuogno
Roberto Gassira'
Michele Masullo