⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 181-183.html

📁 Smart Card Developer s Kit, a smart card manual for development, English
💻 HTML
字号:
<!-- Edit EirGrabber 3.01 -->
<HTML>
<HEAD>
<TITLE>Smart Card Developer's Kit:Card-Side Application Programming Interfaces</TITLE>



<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="178-180.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="183-184.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H4 ALIGN="LEFT"><A NAME="Heading13"></A><FONT COLOR="#000077">The ISO 7816-4 Standard</FONT></H4>
<P>Unquestionably the most widely talked-about smart card API is that set forth in the ISO 7816-4 standard, which is discussed at length in Chapter 4, &#147;Smart Card Commands.&#148; There are 18 basic interindustry commands on this API:
</P>
<PRE>
ReadBinary(byte <I>fileId</I>, short <I>offset</I>, byte <I>buffer</I>[])
WriteBinary(byte <I>fileId</I>, short <I>offset</I>, byte <I>buffer</I>[])
UpdateBinary(byte <I>fileId</I>, short <I>offset</I>, byte <I>buffer</I>[])
EraseBinary(byte <I>fileId</I>, byte <I>offset</I>)
ReadRecord(byte <I>record_number</I>, byte <I>mode</I>, byte <I>buffer</I>[])
WriteRecord(byte <I>record_number</I>, byte <I>mode</I>, byte <I>buffer</I>[])
AppendRecord(byte <I>record_number</I>, byte <I>mode</I>, byte <I>buffer</I>[])
UpdateRecord(byte <I>record_number</I>, byte <I>mode</I>, byte <I>buffer</I>[])
GetData(short <I>mode</I>, byte <I>buffer</I>[])
PutData(short <I>mode</I>, byte <I>buffer</I>[])
SelectFile(byte <I>mode</I>, byte <I>info</I>, byte <I>name</I>[])
Verify(byte <I>mode</I>, byte <I>key</I>[])
InternalAuthenticate(byte <I>algorithm</I>, byte <I>mode</I>, byte <I>challenge</I>[])
ExternalAuthenticate(byte <I>algorithm</I>, byte m<I>o</I>de, byte <I>response</I>[])
GetChallenge(byte <I>challenge</I>[])
ManageChannel(byte <I>operation</I>, byte <I>channel</I>_<I>number</I>)
GetResponse(byte <I>response</I>[]);
Envelope(byte <I>buffer</I>[])
</PRE>
<P>As far as we know, there is no smart card on the market&#151;nor has there ever been&#151;that implements all the ISO 7816-4 commands with all the generality and capability written into the standard. Nevertheless, the ISO 7816-4 commands have served as a reference model for smart card interfacing and have to at least some degree enabled card interoperability. Many off-the-shelf smart cards implement some variant of most of these commands.
</P>
<H4 ALIGN="LEFT"><A NAME="Heading14"></A><FONT COLOR="#000077">The GSM 11.14 Standard</FONT></H4>
<P>A <I>subscriber interface module</I> (SIM) is a smart card that is inserted into a GSM (Groupe Sp&#233;cial Mobile/Global System for Mobile Communication) cellular telephone. As its name implies, a SIM carries, among other things, the subscriber&#146;s account information. The European Telecommunications Standards Institute (ETSI) has published a number of standards covering SIMs and their relationship to the GSM phone.</P>
<P>Unlike the master/slave relationship between terminal and card mandated by ISO 7816-4, GSM 11.14&#151;the ETSI standard describing the interface between the phone and the card&#151;allows for the SIM to initiate communication to the phone. Thus the code running in a SIM card has two APIs: one looking inward to services on the card itself and one looking outward to services on the phone.</P>
<P>The inward-looking API on a SIM card is similar to but not identical to ISO 7816-4. What distinguishes a SIM card from other smart cards is the file system and the encryption algorithms used to authenticate keys.</P>
<P>The outward-looking API on a SIM card contains the following functions:</P>
<DL>
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>DisplayText</TT>&#151;Displays text on the phone&#146;s display window
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>GetInKey</TT>&#151;Gets one key hit from the phone&#146;s keypad
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>GetInput</TT>&#151;Gets a string of characters from the phone&#146;s keypad
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>MoreTime</TT>&#151;Prevents phone timeout by asking for more processing time
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>PlayTone</TT>&#151;Plays an audio tone in the earpiece and on the phone line
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>PollInterval</TT>&#151;Sets time between <TT>STATUS</TT> commands from phone
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>Reset</TT>&#151;Notifies the phone of changes in the SIM
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>SelectItem</TT>&#151;Sends a selection list to the phone to get user selection
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>SendShortMessage</TT>&#151;Sends a short message to the network
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>SendSS</TT>&#151;Sends a supplementary service request to the phone
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>SendUSSD</TT>&#151;(Not currently defined)
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>SetUpCalls</TT>&#151;Sets up a call on the network
<DD><B>&#149;</B>&nbsp;&nbsp;<TT>SetUpMenu</TT>&#151;Sends a user-selection menu to the phone, which displays it
</DL>
<P>Notice that the outward-looking API enables the smart card to contact an arbitrary node on the telephone network by using <TT>PlayTone</TT> to communicate with it.</P>
<H3><A NAME="Heading15"></A><FONT COLOR="#000077">The Vendor APIs</FONT></H3>
<P>Because card-side programming is still very new, most of the card-side APIs are vendor specific, although most of them include the same fuctionality found on the standards-based APIs. All necessarily support loading of applications onto the card after the card has been manufactured and personalized. MULTOS, DKCCOS, and SPYCOS support secure loading schemes.
</P>
<H4 ALIGN="LEFT"><A NAME="Heading16"></A><FONT COLOR="#000077">Schlumberger&#146;s Customer-Oriented System</FONT></H4>
<P>The operating system in Schlumberger&#146;s Multiflex smart card includes the ability to load machine code into and execute machine code from the card&#146;s EEPROM memory. This executable code can extend or replace executable code in the Multiflex ROM. Schlumberger calls this functionality the Schlumberger Customer Oriented System (SCOS). Due to security considerations, primarily the fear of the creation of counterfeit cards, the Multiflex card included in this book has had the SCOS capability deactivated.
</P>
<P>SCOS is a very powerful capability. It lets you create a custom smart card of your own design without incurring the time, expense, or risk of making a ROM mask, manufacturing the chips, and embedding the chips into cards.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="178-180.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="183-184.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>



</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -