コード例 #1
0
 /*
  *    ISO 7816-4 ch. 8.3.1 Country/issuer indicator
  * When present this data object denotes a country or an issuer.
  * This data object is introduced by either '1Y' or '2Y'.
  * Table 79 - Coding of the country/issuer indicator
  * Tag Length    Value
  * '1' variable  Country code and national date
  * '2' variable  Issuer identification number
  * The tag '1' is followed by the appropriate length (1 nibble) and by three digits denoting the
  * country as defined in ISO 3166. Data which follows (odd number of nibbles) is chosen by the
  * relevant national standardization body.
  * The tag '2' is followed by the appropriate length (1 nibble) and by the issuer identification
  * number as defined in part 1 of ISO/IEC 7812. If the issuer identification number contains an odd
  * number of digits, then it shall be right padded with a nibble valued 'F'.
  *
  */
 public CompactTlvDataObjectCountryCode(AtrCompactTlvHistoricalCharacters owner) : base(owner)
 {
 }
コード例 #2
0
 /*
  *    ISO 7816-4 ch. 8.3.1 Country/issuer indicator
  * When present this data object denotes a country or an issuer.
  * This data object is introduced by either '1Y' or '2Y'.
  * Table 79 - Coding of the country/issuer indicator
  * Tag Length    Value
  * '1' variable  Country code and national date
  * '2' variable  Issuer identification number
  * The tag '1' is followed by the appropriate length (1 nibble) and by three digits denoting the
  * country as defined in ISO 3166. Data which follows (odd number of nibbles) is chosen by the
  * relevant national standardization body.
  * The tag '2' is followed by the appropriate length (1 nibble) and by the issuer identification
  * number as defined in part 1 of ISO/IEC 7812. If the issuer identification number contains an odd
  * number of digits, then it shall be right padded with a nibble valued 'F'.
  */
 public CompactTlvDataObjectIssuerIdentificationNumber(AtrCompactTlvHistoricalCharacters owner) : base(owner)
 {
 }
コード例 #3
0
 protected CompactTlvDataObjectBase(AtrCompactTlvHistoricalCharacters owner)
 {
     this.owner = owner;
 }
コード例 #4
0
 /*
  *    ISO 7816-4 ch. 8.3.2 Card service data
  * This data object denotes the methods available in the card for supporting the services described in
  * clause 9.
  * This data object is introduced by '31'.
  * When this data object is not present, the card supports only the implicit application selection.
  * Table 80 - Card-profile for application-independent card services
  * NOTE - The contents of the DIR and ATR files may give information on selection methods.
  * b8 b7 b6 b5 b4 b3 b2 b1 Meaning
  * 1 -- -- -- -- -- -- -- Direct application selection by full DF name
  * --  1 -- -- -- -- -- -- Selection by partial DF name (see 9.3.2)
  * -- --  x  x -- -- -- -- Data objects available
  * -- --  1 -- -- -- -- -- - in DIR file
  * -- -- --  1 -- -- -- -- - in ATR file
  * -- -- -- --  x -- -- -- File I/O services by
  * -- -- -- --  1 -- -- -- - READ BINARY command
  * -- -- -- --  0 -- -- -- - READ RECORD(S) command
  * -- -- -- -- --  x  x  x '000' (other value are RFU)
  */
 public CompactTlvDataObjectCardServiceData(AtrCompactTlvHistoricalCharacters owner)
     : base(owner)
 {
 }
コード例 #5
0
 /*
  *    ISO 7816-4 ch. 8.3.3 Initial access data
  * This optional data object allows the retrieval of a string of data objects defined in ISO/IEC 7816.
  * The string retrieved by this data object is called the "initial data string".
  * This data object is introduced by '41','42' or '45'.
  * Any command APDU described in this clause is assumed to be the first command sent after the answer
  * to reset. Consequently, the data available at this point may not be subsequently retrievable.
  * 8.3.3.1 Length='1'
  * When only one byte of information is provided, it indicates the length of the command to perform
  * for retrieving the initial data string. The command to perform is a READ BINARY command structured
  * as follows :
  * Table 81 - Coding of the command when length='1'
  * CLA         '00' (see 5.4.1)
  * INS         'B0'
  * P1-P2       '0000'
  * Lc field    Empty
  * Data field  Empty
  * Le field    First and only byte of value field of initial access data (indicating the number of bytes to be read)
  * 8.3.3.2 Length='2'
  * When two bytes of information are provided, the first byte indicates the file structure
  * (transparent or record) and the short identifier of the EF to be read. The second byte indicates
  * the length of the READ command to perform for retrieving data string.
  * Table 82 - Structure of the file byte
  * b8     = 0 Record oriented file
  *  = 1 Transparent file
  * b7-6   '00' (other values are RFU)
  * b5-1   Short EF identifier
  * Table 83 - Coding of the command when b8=0
  * CLA         '00' (see 5.4.1)
  * INS         'B2'
  * P1          '01'
  * P2          Short EF identifier (from the first byte of initial access data) followed by b3-1='110'
  * Lc field    Empty
  * Data field  Empty
  * Le field    Second and last byte of bvalue field of initial access data (indicating the number of
  *       bytes to be read)
  * Table 84 - Coding of the command when b8=1
  * CLA         '00' (see 5.4.1)
  * INS         'B0'
  * P1          Value of the first byte on initial access data
  * P2          '00'
  * Lc field    Empty
  * Data field  Empty
  * Le field    Second and last byte of bvalue field of initial access data (indicating the number of
  *       bytes to be read)
  * 8.3.3.3 Length='5'
  * The value found in the initial access data object consists of the APDU of a command to perform.
  * When executed this command provides the initial data string in its response data field.
  *
  * ISO7816-4 6.1 READ BINARY
  * 6.1.1 Definition and scope
  * The Read Binary response message gives (part of) the content of an EF with transparent structure.
  * 6.1.2 Conditional usage and security
  * When the command contains a valid short EF identifier, it sets the file as current EF. The command
  * is processed on the currently selected EF.
  * The command can be performed only if the security status satisfies the security attributes defined
  * for this EF for the read function.
  * The command shall be aborted if it is applied to an EF without transparent structure.
  * 6.1.3 Command message
  *
  * Table 27 - READ BINARY command APDU
  * CLA        As defined in 5.4.1
  * INS        'B0'
  * P1-P2      See text below
  * Lc field   Empty
  * Data field Empty
  * Le field   Number of bytes to be read
  *
  * If bit8=1 in P1, then bit7-6 are set to 0. bit3-1 of P1 are a short EF (Elementary File) identifier
  * and P2 is the offset of the first byte to be read in date units from the beginning of the file.
  * If bit8=0 in P1, then P1||P2 is the offset of the first byte to be read in data units from the
  * beginning of the file.
  * 6.1.4 Response message (nominal size)
  * If the Le field contains only zeroes, then within the limit of 256 for short length or 65536 for
  * extended length, all the bytes until the end of the file should be read.
  *
  * ISO 7816-4 6.5 READ RECORD(S) command
  * 6.5.1 Definition and scope
  * The READ RECORD(S) response message gives the contents of the specified record(s) (or the beginning
  * part of one record) of an EF.
  * 6.5.2 Conditional usage and security
  * The command can be performed only if the security status satisfies the security attributes for this
  * EF for the read function.
  * If an EF is currently selected at the time of issuing the command, then this command may be
  * processed without identification of this file.
  * When the command contains a valid short EF identifier, it sets the file as current EF and resets
  * the current record pointer.
  * The command shall be aborted if applied to an EF without record structure.
  * 6.5.3 Command message
  *
  * Table 35 - READ RECORD(S) command APDU
  * CLA        As defined in 5.4.1
  * INS        'B2'
  * P1         Record number or record identifier of the first record to be read ('00' indicates the
  * current record)
  * P2         Reference control, according to table 36
  * Lc field   Empty
  * Data field Empty
  * Le field   Number of bytes to be read
  *
  * Table 36 - Coding of the reference control P2
  * b8 b7 b6 b5 b4 b3 b2 b1  Meaning
  * 0  0  0  0  0 -- -- --  Currently selected EF
  * x  x  x  x  x -- -- --  Short EF identifier
  * 1  1  1  1  1 -- -- --  RFU
  * -- -- -- -- --  1  x  x  Usage of record number in P1
  * -- -- -- -- --  1  0  0  - Read record P1
  * -- -- -- -- --  1  0  1  - Read all records from P1 up to the last
  * -- -- -- -- --  1  1  0  - Read all records from the last up to P1
  * -- -- -- -- --  1  1  1  - RFU
  * -- -- -- -- --  0  x  x  Usage of record identifier in P1
  * -- -- -- -- --  0  0  0  - Read first occurence
  * -- -- -- -- --  0  0  1  - Read last occurrence
  * -- -- -- -- --  0  1  0  - Read next occurrence
  * -- -- -- -- --  0  1  1  - Read previous occurrence
  */
 public CompactTlvDataObjectInitialAccessData(AtrCompactTlvHistoricalCharacters owner)
     : base(owner)
 {
 }
コード例 #6
0
 /*
  * ISO 7816-4 ch. 8.4 Status information
  * The status information consists of 3 bytes: the card life status (1 byte) and the two status bytes
  * SW1-SW2.
  * The value '00' of the card life status indicates that no card life status is provided. The values
  * '80' to 'FE' are proprietary. All other values are RFU.
  * The value '9000' of SW1-SW2 indicates normal processing as defined in 5.4.5.
  * The value '0000' of SW1-SW2 indicates that the status is not indicated.
  * If the category indicator is valued to '80', then the status information may be present in a
  * COMPACT-TLV data object. In this case, the tag number is '8'. When the length is '1', then the
  * value is the card life status. When the length is '2', then the value is SW1-SW2. When the length
  * is '3', then the value is the card life status followed by SW1-SW2. Other values of the length are
  * reserved for ISO.
  */
 public CompactTlvDataObjectStatusIndicator(AtrCompactTlvHistoricalCharacters owner) : base(owner)
 {
 }
コード例 #7
0
 /*
  * http://www.emvlab.org/emvtags/?number=4F
  * http://www.kartenbezogene-identifier.de/de/rapi/rid-liste.html
  */
 public CompactTlvDataObjectApplicationIdentifier(AtrCompactTlvHistoricalCharacters owner) : base(owner)
 {
 }
コード例 #8
0
 /*
  * ISO 7816-4 ch. 8.3.6 Card capabilities
  * This data object is optional and of variable length. Its value field consists of either the first
  * software function table, or the first two software tables, or the three software function tables.
  * This data object is introduced by '71','72' or '73'.
  * Table 85 shows the first software function table.
  * Table 85 - First software function table
  * b8 b7 b6 b5 b4 b3 b2 b1 Meaning
  *                   DF selection
  * 1 -- -- -- -- -- -- -- - by full DF name
  * --  1 -- -- -- -- -- -- - by partial DF name
  * -- --  1 -- -- -- -- -- - by path
  * -- -- --  1 -- -- -- -- - by file identifier
  * -- -- -- --  1 -- -- -- - implicit
  *                   EF management
  * -- -- -- -- --  1 -- -- - Short EF identifier supported
  * -- -- -- -- -- --  1 -- - Record number supported
  * -- -- -- -- -- -- --  1 - Record identifier supported
  * Table 86 shows the second software function table which is the data coding byte. The data coding
  * byte may also be present as the second data element in the file control parameter with tag '82' (see table 2).
  * Table 86 - Second software function table (data coding byte)
  * b8 b7 b6 b5 b4 b3 b2 b1  Meaning
  * --  x  x -- -- -- -- --  Behavior of write functions
  * --  0  0 -- -- -- -- --  - one-time write
  * --  0  1 -- -- -- -- --  - proprietary
  * --  1  0 -- -- -- -- --  - write OR
  * --  1  1 -- -- -- -- --  - write AND
  * -- -- -- -- --  x  x  x  Data unit size in nibbles (power of 2, e.g. '001'=2 nibbles) (default value=one byte)
  * x -- --  x  x -- -- --  0..00 (other values are RFU)
  * Table 87 shows the third software functions table.
  * Table 87 - Third software function table
  * b8 b7 b6 b5 b4 b3 b2 b1  Meaning
  * x -- -- -- -- -- -- --  0 (1 is RFU)
  * --  1 -- -- -- -- -- --  - Extended Lc and Le fields
  * -- --  x -- -- -- -- --  0 (1 is RFU)
  * -- -- --  x  x -- -- --  Logical channel assignment
  * -- -- --  0  1 -- -- --  - by the card
  * -- -- --  1  0 -- -- --  - by the interface device
  * -- -- --  0  0 -- -- --  No logical channel
  * -- -- -- -- --  x -- --  0 (1 is RFU)
  * -- -- -- -- -- --  x  y  Maximum number of logical channels (=2*x+y+1)
  */
 public CompactTlvDataObjectCardCapabilities(AtrCompactTlvHistoricalCharacters owner)
     : base(owner)
 {
 }