Previous | Table of Contents | Next |
Since we dont have to know any key to read the contents of this file, use a Read Binary command to take a look at the 8 bytes in this file. The Read Binary command reads bytes from transparent files. The bytes well send to the card are
C016 B016 0016 0016 0816
C016 is the class code and B016 is the instruction code for the Read Binary command. The next two bytes say at what offset from the first byte in the file the read should start and the last byte says how may bytes should be read. Since we want to see all the bytes in the file well read 8 bytes starting at an offset of 0.
The 8 bytes we get back are
0016 0016 0E16 6716 0116 0016 0016 0216
The first 4 bytes are the serial number of the card (0016 0016 0E16 6716) and the second 4 bytes are a manufacturers code. Taken together, these 8 bytes are guaranteed to be a unique serial number for the smart card.
If we select the transport key file, 0011:
C016 A416 0016 0016 0216 0016 1116
and get back the status code:
6116 0F16
and use the Get Response command to get the 15 bytes of information about it:
0016 C016 0016 0016 0F16
we get this:
0016 0016 0016 2616 0016 1116 0116 0016 F416 4016 F416 0116 0116 0016 0016
The interpretation of these bytes is given in Table 5.9.
Byte | Description | Value | Interpretation of Value |
---|---|---|---|
1-2 | Unused | 0016 0016 | Unused. |
3-4 | Free bytes in selected file | 0016 2616 | There are 38 bytes in this file. |
5-6 | Fileld of selected file | 0016 1116 | The selected file has fileId 001116. |
7 | Type of selected file | 0116 | The selected file is a transparent file. |
8 High | Restriction of Update, Increase, and Decrease commands | 016 | Only the Update command can be used. |
8 Low | Unused | 016 | Unused. |
9 High | Access condition for Read and Seek commands | F16 | Nobody can use the Read and Seek commands on this file. |
9 Low | Access condition for Update, Decrease, and Decrease Stamped commands | 416 | You must know a cryptographic key to update this file. You cant use Decrease or Decrease Stamped because of byte 8. |
10 High | Access condition for Increase and Increase Stamped commands | 416 | Youd have to know a cryptographic key to use these commands but you cant due to byte 8. |
10 Low | Access condition for the Create Record command | 016 | Anybody can use this command on this file. |
11 High | Access condition for Rehabilitate command | F16 | Rehabilitate can never be used on this file. |
11 Low | Access condition for Invalidate command | 416 | You have to know a cryptographic key to invalidate this file. |
12 | Status of the selected file | 0116 | The file is currently unblocked. |
13 | Number of bytes in following data | 0116 | One byte of data follows. |
14 | Unused | 0016 | Unused. |
15 | Length of record in fixed-length record files | 0016 | |
If you ignore the access conditions on this file and try to read the contents without successfully presenting the Authenticate key to the card, the status return from the card will be
6916 8216
which means the access condition is not fulfilled for the requested operation. You need to know the key in the transport key file in order to perform useful operations on the card (such as creating new files), but since you cant read the file, it seems like you are stuck.
As described above, the reason the key in this file is called the transport key is that it is the key that locks the card during transport from the card manufacturer to you. This prevents somebody from breaking into the box containing the cards and possibly, unknown to you, putting something nasty on the cards. The transport key is typically given to you out of band, that is by post, fax, telephone, bonded courier, or some way other than how the cards are shipped.
When you receive the cards from the card manufacturer, you will present the transport key to each card and then build the files that describe your application on the card. This process of building a particular application on a generic card is called card personalization. The personalization process might also include writing specific data into the files you create on the card, such as the account number with which the card is associated. The personalization process will most likely overwrite the transport key or delete the transport key file altogether.
Since the card included with this book is for learning and experimentation, we arent going to require you to get in touch with the authors to get the transport key for your card. Were just going to tell it to you here. Just in case you missed it previously, here it is again:
4716 4616 5816 4916 3216 5616 7816 4016
Previous | Table of Contents | Next |