?? 089-092.html
字號:
<!-- Edit EirGrabber 3.01 -->
<HTML>
<HEAD>
<TITLE>Smart Card Developer's Kit:The Schlumberger Multiflex Smart Card</TITLE>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="087-089.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="092-094.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H4 ALIGN="LEFT"><A NAME="Heading5"></A><FONT COLOR="#000077">Selecting an Elementary File</FONT></H4>
<P>As indicated in the descriptive data returned from the <TT>Get Response</TT> command we issued after selecting the master file, there are no subdirectories and two elementary files on an unused Multiflex card. The two elementary files have fileIds 0002<SUB>16</SUB> and 0011<SUB>16</SUB>. The first elementary file, 0002<SUB>16</SUB>, is called the <I>serial number file</I> and the second, 0011<SUB>16</SUB>, is called the <I>transport key file</I>.</P>
<P>The serial number file contains a sequence of 8 bytes that uniquely identifies this card among all the millions of cards ever manufactured by Schlumberger. Like the historical bytes of the ATR, how the serial number is placed on a card varies from manufacturer to manufacturer. The 8 bytes in the serial number file of a Schlumberger card have the following interpretation:</P>
<TABLE WIDTH="100%"><TR>
<TD WIDTH="30%">Bytes 1-4
<TD WIDTH="70%">Series number
<TR>
<TD>Byte 5
<TD>Customer Identification Code
<TR>
<TD>Bytes 6-7
<TD>Schlumberger Manufacturing Site
<TR>
<TD>Byte 8
<TD>Usage
</TABLE>
<P>The 8 bytes in file 0002<SUB>16</SUB> in the 3K Multiflex sitting in the author’s computer right now are</P>
<P>00<SUB>16</SUB> 00<SUB>16</SUB> 0E<SUB>16</SUB> 67<SUB>16</SUB> 01<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 02<SUB>16</SUB></P>
<P>This is card #3687 made for the customer with identification code 1 (Schlumberger itself) at Schlumberger’s Pont Audemer factory, and it is a sample card. Schlumberger guarantees that the 8 bytes taken together uniquely identify the card.</P>
<P>The transport key is a key that locks the card while it is being shipped from Schlumberger to you. This way, if somebody breaks into the truck and steals the cards, they aren’t in possession of a whole bunch of valid cards from your smart card program. Schlumberger sends you the transport key for your cards via a channel different than the truck. When the cards arrive, you will use the transport key to unlock the cards, to personalize them, and to add new keys to them. At the end of this process, you will overwrite or completely erase the transport key. By the way, the transport key on your 3K Multiflex card is</P>
<P>47<SUB>16</SUB> 46<SUB>16</SUB> 58<SUB>16</SUB> 49<SUB>16</SUB> 32<SUB>16</SUB> 56<SUB>16</SUB> 78<SUB>16</SUB> 40<SUB>16</SUB></P>
<P>but don’t tell anybody.</P>
<P>A simple transport key is sufficient for relatively low-value cards. Higher-value cards use more elaborate transport key protocols. For example, there may be a different transport key on each card which is a secret function of the serial number of the card (a <I>diversified key</I>), or the card may have to receive a properly encrypted version of a challenge it issues to a <I>mother card</I> or <I>batch card</I> before it unlocks itself.</P>
<P>If we again select the serial number file, 0002, using the <TT>Select File</TT> command:</P>
<P>C0<SUB>16</SUB> A4<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 02<SUB>16</SUB> 00<SUB>16</SUB> 02<SUB>16</SUB></P>
<P>we’ll get a returned status code of</P>
<P>61<SUB>16</SUB> 0F<SUB>16</SUB></P>
<P>which means there are 15 (0F<SUB>16</SUB>) bytes of descriptive information about the serial number file waiting on the card for us. So, we send the card a <TT>Get Response</TT> to get this information:</P>
<P>C0<SUB>16</SUB> C0<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 0F<SUB>16</SUB></P>
<P>and it returns this:</P>
<P>00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 08<SUB>16</SUB> 00<SUB>16</SUB> 02<SUB>16</SUB> 01<SUB>16</SUB> 00<SUB>16</SUB> 04<SUB>16</SUB> FF<SUB>16</SUB> FF<SUB>16</SUB> 01<SUB>16</SUB> 01<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB></P>
<P>The meaning of the bytes returned from issuing a <TT>Get Response</TT> after selecting an elementary file is similar to but not exactly the same as the meaning of the bytes returned after selecting a directory file. The meaning of the bytes is the same, no matter what type of elementary file is selected: a transparent file with fixed-length records or a file with variable-length records. See Table 5.8.</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 5.8.</B> File control information for the serial number file (0002<SUB>16</SUB>).
<TR>
<TH WIDTH="15%" ALIGN="LEFT">Byte
<TH WIDTH="30%" ALIGN="LEFT">Description
<TH WIDTH="20%" ALIGN="LEFT">Value
<TH WIDTH="35%" ALIGN="LEFT">Interpretation of Value
<TR>
<TH COLSPAN="4"><HR>
<TR>
<TD>1-2
<TD>Unused
<TD>00<SUB>16</SUB> 00<SUB>16</SUB>
<TD>Unused.
<TR>
<TD VALIGN="TOP">3-4
<TD>Free bytes in selected file
<TD VALIGN="TOP">00<SUB>16</SUB> 08<SUB>16</SUB>
<TD VALIGN="TOP">There are 8 bytes in this file.
<TR>
<TD VALIGN="TOP">5-6
<TD VALIGN="TOP">File ID of selected file
<TD VALIGN="TOP">00<SUB>16</SUB> 02<SUB>16</SUB>
<TD VALIGN="TOP">The selected file has file ID 0002<SUB>16</SUB>.
<TR>
<TD VALIGN="TOP">7
<TD VALIGN="TOP">Type of selected file
<TD VALIGN="TOP">01<SUB>16</SUB>
<TD>The selected file is a transparent file.
<TR>
<TD VALIGN="TOP">8 High
<TD>Restriction of <TT>Update</TT>, <TT>Increase</TT>, and <TT>Decrease</TT> commands
<TD VALIGN="TOP">0<SUB>16</SUB>
<TD VALIGN="TOP">Only the <TT>Update</TT> command can be used.
<TR>
<TD>8 Low
<TD>Unused
<TD>0<SUB>16</SUB>
<TD>Unused.
<TR>
<TD VALIGN="TOP">9 High
<TD>Access condition for <TT>Read</TT> and <TT>Seek</TT> commands
<TD VALIGN="TOP">0<SUB>16</SUB>
<TD VALIGN="TOP">Anyone can use the <TT>Read</TT> and <TT>Seek</TT> commands on this file.
<TR>
<TD VALIGN="TOP">9 Low
<TD VALIGN="TOP">Access condition for <TT>Update</TT>, <TT>Decrease</TT>, and <TT>Decrease Stamped</TT> commands
<TD VALIGN="TOP">4<SUB>16</SUB>
<TD>You must know a cryptographic key to update this file. You can’t use <TT>Decrease</TT> or <TT>Decrease Stamped</TT> due to byte 8.
<TR>
<TD VALIGN="TOP">10 High
<TD>Access condition for <TT>Increase</TT> and <TT>Increase Stamped</TT> commands
<TD VALIGN="TOP">F<SUB>16</SUB>
<TD VALIGN="TOP">These commands can never be used on this file.
<TR>
<TD VALIGN="TOP">10 Low
<TD VALIGN="TOP">Access condition for the <TT>Create Record</TT> command
<TD VALIGN="TOP">F<SUB>16</SUB>
<TD VALIGN="TOP">These commands can never be used on this file.
<TR>
<TD VALIGN="TOP">11 High
<TD>Access condition for <TT>Rehabilitate</TT> command
<TD VALIGN="TOP">F<SUB>16</SUB>
<TD>These commands can never be used on this file.
<TR>
<TD VALIGN="TOP">11 Low
<TD>Access condition for <TT>Invalidate</TT> command
<TD VALIGN="TOP">F<SUB>16</SUB>
<TD>These commands can never be used on this file.
<TR>
<TD VALIGN="TOP">12
<TD VALIGN="TOP">Status of the selected file
<TD VALIGN="TOP">01<SUB>16</SUB>
<TD>The file is currently unblocked.
<TR>
<TD VALIGN="TOP">13
<TD>Number of bytes in following data
<TD VALIGN="TOP">01<SUB>16</SUB>
<TD VALIGN="TOP">One byte of data follows.
<TR>
<TD>14
<TD>Unused
<TD>00<SUB>16</SUB>
<TD>Unused.
<TR>
<TD VALIGN="TOP">15
<TD>Length of record in fixed-length record files
<TD VALIGN="TOP">00<SUB>16</SUB>
<TD VALIGN="TOP">Not a record structure file.
<TR>
<TD COLSPAN="4"><HR>
</TABLE>
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="087-089.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="092-094.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -