Previous Table of Contents Next


The Update Binary Command

The Update Binary command is used by a reader-side application to erase directly and store a contiguous sequence of bytes in a segment of an EF on the card. The file being accessed must be a transparent file; that is, it cannot be a record-oriented file. If an Update Binary command is attempted on a record-oriented EF, the command will abort with an error indicator being returned by the card to the reader-side application.

The Update Binary command provides the functions that one would normally associate with a file write command. That is, a string of bytes provided in the command are actually written into the EF on the card, with those byte positions in the file on the card being erased first. The net result is that the string of bytes found in the designated position within the EF on the card is exactly the string sent by the reader-side application in the Update Binary command.

Input parameters for the command include an offset pointer from the start of the file and a byte count of the total number of bytes to be written.

The Erase Binary Command

The Erase Binary command is used by a reader-side application to clear bytes within an EF on a card. The file being accessed must be a transparent file; that is, it cannot be a record-oriented file. If an Erase Binary command is attempted on a record-oriented EF, the command aborts, and an error indicator is returned by the card to the reader-side application.

Two parameters are specified as part of the command: an offset from the start of the EF to the segment of bytes within the file to be erased and the number of bytes within that segment.

The Read Record Command

The Read Record command is a command sent by a reader-side application to read and return the contents of one or more records in an EF on a card. This command must be executed against a record-oriented EF. If it is applied to a transparent EF, the command will abort and an error indicator will be sent from the card back to the reader-side application.

Depending on the parameters passed through the command, either the one designated record is read and returned, or all the records from the beginning of the file to the designated record are read and returned, or all the records from the designated record to the end of the file are read and returned.

The Write Record Command

The Write Record command is a command sent by a reader-side application to write a record into an EF on the card. This command must be executed against a record-oriented EF. If it is applied to a transparent EF, the command will abort and an error indicator will be sent from the card back to the reader-side application.

As with the Write Binary command, this command can actually be used to achieve one of three results: a one-time write of a record into the EF, setting of specific bits within a specific record in the EF, or clearing of specific bits within a specific record in the EF.

Several addressing shortcuts may be used in this command to specify the record to be written to; including the first record in the EF, the last record in the EF, the next record in the EF, the previous record in the EF, or a specific record (identified by number) within the EF.

The Append Record Command

The Append Record command is a command sent by a reader-side application to either add an additional record at the end of a linear, record-oriented EF on a card or to write the first record in a cyclic, record-oriented EF on a card. If it is applied to a transparent EF, the command will abort and an error indicator will be sent from the card back to the reader-side application.

The Update Record Command

The Update Record command is a command sent by a reader-side application to write a record into an EF on the card. This command must be executed against a record-oriented EF. If it is applied to a transparent EF, the command will abort and an error indicator will be sent from the card back to the reader-side application.

As with the Update Binary command, this command is used to write a specific record into an EF. The net result of the operation is that the specific record in the EF is erased and the new record specified in the command is written into the EF.

The Get Data Command

The Get Data command is a command sent by a reader-side application to read and return the contents of a data object stored within the file system on the card. This command tends to be very card-specific. That is, the definition of just what constitutes a data object varies widely from card to card.

The Put Data Command

The Put Data command is a command sent by a reader-side application to put information into a data object stored within the file system on the card. This command tends to be card-specific. That is, the definition of what constitutes a data object varies widely from card to card.

The Security API

Associated with each component of the file system is a list of access properties. Through these access properties, a state can be defined such that the smart card system must be put into that state through the successful execution of a series of commands by the reader-side application before that component of the file system can be accessed. At the most basic level, the operations to be performed on the file system are to select a specific file and then write information to that file or read information from that file. As shown later, the access properties may be as simple as requiring the reader to provide a predefined personal identification number (PIN) or as complex as the reader proving that it possesses some shared secret (such as a key) with the card by properly encrypting or decrypting a string of bytes provided by the card. These mechanisms are reviewed in more detail in the following sections.


Previous Table of Contents Next