Previous Table of Contents Next


Tritheim SmartPort

The Tritheim SmartPort smart card reader attaches to a serial, parallel, PCMCIA or USB port. Like Aladdin’s ASESoft, the Tritheim Smart Card Development System (SCDS) offers a high-level interface to Tritheim’s own smart cards and a low-level interface to arbitrary ISO 7816 cards.

A unique feature of the Tritheim system is that the reader itself contains an internal smart card. The internal card is addressed as Card 2 while the inserted card is addressed as Card 1. This clearly sets the stage for multicard systems such as e-commerce servers which will contain many merchant cards.

The high-level interface to the Tritheim reader and card treats the smart card as a floppy disk with password-protected files. Both linear and circular files are supported in this metaphor. Records in circular files can be read and written sequentially and randomly. The interface is implemented as a Windows DLL.

The following are the functions on the high-level disk-like interface:

Close
Closes a file or a card
Dir
Returns a directory of the card’s file with attributes
Empty
Sets a file’s contents to NULL
Error
Returns the text associated with the provided error code
First
Resets the sequential read pointer to the beginning of the file
Format
Formats the card according to the provided specification
OpenFile
Prepares a file for reading and writing
ReadRandom
Reads a specified record from a record file
ReadSequential
Reads the next record from a record file
ReadLast
Reads the last record from a record file
Status
Resets the card and initializes it for access
Submit
Submits a password to the card
Unused
Returns the number of unused records in a record file
Update
Overwrites the last sequentially read record in a record file
WriteRandom
Writes a specified record into a record file
WriteSequential
Writes the next record in a record file

As an alternative to passwords, Tritheim cards and the high-level interface also supports DES-based challenge/response authentication to gain file access. The DES extension API includes the following functions:

Cipher
Passes a challenge to the card for encryption
Mode
Turns the DES extension on and off and sets the mode of ciphering
Random
Gets a random number challenge from the card
ReadCipher
Reads back the card’s encryption of a challenge
SetApplicationModule
Selects the source of the DES encryption
SetCipherKey
Reads a record from a record file and sets it as the card’s DES key

The low-level interface to the Tritheim reader supports any ISO 7816 card in either T=0 or T=1 mode. The following are the functions on this API:

IFD_Get_Capabilities
Retrieves information about the card such as ATR string and status of contacts
IFD_Set_Capabilities
Attempts to set the capabilities of a parameter of the card
IFD_Power_ICC
Turns power to the card on or off
IFD_Get_ICC_Com_Error
Returns the status of the communications interface to the card
IFD_Escape
Sends a command to the card reader
IFD_Read_From_SC
Returns information from the card
IFD_Write_To_SC
Sends a command to the card

Advanced Card Systems ACR20

The Advanced Card Systems ACR20 reader handles both memory and microprocessor cards on a serial interface. The reader will talk T=0 or T=1 to ISO 7816 microprocessor cards. Interestingly, the ACR20 takes a daughter board that will internally accept up to three additional smart cards so that the ACR20 can act as a merchant terminal.

The API for the ACR20 consists of the following functions:

AC_Open
Opens the communication channel to the reader
AC_Close
Closes the communication channel to the reader
AC_StartSession
Sends a reset to the card and returns the ATR sent back by the card
AC_EndSession
Powers off the card
AC_Exchange_APDU
Sends an APDU to the card and returns the response
AC_GetInfo
Returns status information from the currently selected reader
AC_SetOptions
Sets various options on the reader

There are also 18 functions on the interface that support access to memory cards.

The Protekila Smart Card Reader Library

The Protekila Smart Card Reader library is a very simple C-language DOS and Windows interface to their smart card readers. Here is the most parsimonious of all smart card reader APIs known to the authors:

get_atr_respond(char *atr)
send_cmd_in(char *command)
card_reader_status(char *status)
card_power_off(char *str)


Previous Table of Contents Next