?? 130-133.html
字號:
<!-- Edit EirGrabber 3.01 -->
<HTML>
<HEAD>
<TITLE>Smart Card Developer's Kit:Smart Card Software Development Tools</TITLE>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="129-130.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="133-136.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P><FONT SIZE="+1"><B>Tritheim SmartPort</B></FONT></P>
<P>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.
</P>
<P>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.</P>
<P>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.</P>
<P>The following are the functions on the high-level disk-like interface:</P>
<DL>
<DT><B><TT>Close</TT>
</B>
<DD>Closes a file or a card
<DT><B><TT>Dir</TT>
</B>
<DD>Returns a directory of the card’s file with attributes
<DT><B><TT>Empty</TT>
</B>
<DD>Sets a file’s contents to <TT>NULL</TT>
<DT><B><TT>Error</TT>
</B>
<DD>Returns the text associated with the provided error code
<DT><B><TT>First</TT>
</B>
<DD>Resets the sequential read pointer to the beginning of the file
<DT><B><TT>Format</TT>
</B>
<DD>Formats the card according to the provided specification
<DT><B><TT>OpenFile</TT>
</B>
<DD>Prepares a file for reading and writing
<DT><B><TT>ReadRandom</TT>
</B>
<DD>Reads a specified record from a record file
<DT><B><TT>ReadSequential</TT>
</B>
<DD>Reads the next record from a record file
<DT><B><TT>ReadLast</TT>
</B>
<DD>Reads the last record from a record file
<DT><B><TT>Status</TT>
</B>
<DD>Resets the card and initializes it for access
<DT><B><TT>Submit</TT>
</B>
<DD>Submits a password to the card
<DT><B><TT>Unused</TT>
</B>
<DD>Returns the number of unused records in a record file
<DT><B><TT>Update</TT>
</B>
<DD>Overwrites the last sequentially read record in a record file
<DT><B><TT>WriteRandom</TT>
</B>
<DD>Writes a specified record into a record file
<DT><B><TT>WriteSequential</TT>
</B>
<DD>Writes the next record in a record file
</DL>
<P>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:
</P>
<DL>
<DT><B><TT>Cipher</TT>
</B>
<DD>Passes a challenge to the card for encryption
<DT><B><TT>Mode</TT>
</B>
<DD>Turns the DES extension on and off and sets the mode of ciphering
<DT><B><TT>Random</TT>
</B>
<DD>Gets a random number challenge from the card
<DT><B><TT>ReadCipher</TT>
</B>
<DD>Reads back the card’s encryption of a challenge
<DT><B><TT>SetApplicationModule</TT>
</B>
<DD>Selects the source of the DES encryption
<DT><B><TT>SetCipherKey</TT>
</B>
<DD>Reads a record from a record file and sets it as the card’s DES key
</DL>
<P>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:
</P>
<DL>
<DT><B><TT>IFD_Get_Capabilities</TT>
</B>
<DD>Retrieves information about the card such as ATR string and status of contacts
<DT><B><TT>IFD_Set_Capabilities</TT>
</B>
<DD>Attempts to set the capabilities of a parameter of the card
<DT><B><TT>IFD_Power_ICC</TT>
</B>
<DD>Turns power to the card on or off
<DT><B><TT>IFD_Get_ICC_Com_Error</TT>
</B>
<DD>Returns the status of the communications interface to the card
<DT><B><TT>IFD_Escape</TT></B>
<DD>Sends a command to the card reader
<DT><B><TT>IFD_Read_From_SC</TT>
</B>
<DD>Returns information from the card
<DT><B><TT>IFD_Write_To_SC</TT>
</B>
<DD>Sends a command to the card
</DL>
<P><FONT SIZE="+1"><B>Advanced Card Systems ACR20</B></FONT></P>
<P>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.
</P>
<P>The API for the ACR20 consists of the following functions:</P>
<DL>
<DT><B><TT>AC_Open</TT>
</B>
<DD>Opens the communication channel to the reader
<DT><B><TT>AC_Close</TT>
</B>
<DD>Closes the communication channel to the reader
<DT><B><TT>AC_StartSession</TT>
</B>
<DD>Sends a reset to the card and returns the ATR sent back by the card
<DT><B><TT>AC_EndSession</TT>
</B>
<DD>Powers off the card
<DT><B><TT>AC_Exchange_APDU</TT>
</B>
<DD>Sends an APDU to the card and returns the response
<DT><B><TT>AC_GetInfo</TT>
</B>
<DD>Returns status information from the currently selected reader
<DT><B><TT>AC_SetOptions</TT>
</B>
<DD>Sets various options on the reader
</DL>
<P>There are also 18 functions on the interface that support access to memory cards.
</P>
<P><FONT SIZE="+1"><B>The Protekila Smart Card Reader Library</B></FONT></P>
<P>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:
</P>
<PRE>
get_atr_respond(char *atr)
send_cmd_in(char *command)
card_reader_status(char *status)
card_power_off(char *str)
</PRE>
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="129-130.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="133-136.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -