Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

ISO7816 - Odd INS codes?

Communication

Moderator: UNKNwYSHSA

User avatar
mabel
Posts: 237
Joined: Mon May 18, 2015 3:09 am
Points :1705
Contact:

ISO7816 - Odd INS codes?

Post by mabel » Thu May 21, 2015 2:06 am

I found the following descriptions in ISO 7816. http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-4_5_basic_organizations.aspx#chap5_4

5.4.2 Instruction byte

The instruction byte INS of a command shall be coded to allow transmission with any of the protocols defined in part 3 of ISO/IEC 7816. Table 10 shows the INS codes that are consequently invalid.

Table 10 - Invalid INS codes

b8 b7 b6 b5 b4 b3 b2 b1 Meaning
x x x x x x x 1 Odd values
0 1 1 0 x x x x '6X'
1 0 0 1 x x x x '9X'


Why cann't I use odd values? Could it really cause any problems if I do?
Last edited by mabel on Tue Jun 16, 2015 10:15 pm, edited 1 time in total.

User avatar
horse dream
Posts: 76
Joined: Thu May 21, 2015 11:48 pm
Points :138
Contact:

Re: ISO7816 - Odd INS codes?

Post by horse dream » Fri May 22, 2015 1:14 am

The specification that you saw is an old version.
Odd instruction codes are typically handled differently from the even ones by the card, they are no simple aliases for these, but equally valid.
Beaucse 7816-4 requires a different handling of secure messaging and the pressure towards odd instruction codes came from additional requirements.
the even instruction code of read binary can handle only offsets up to 15 bits. If this is insufficient, the odd instruction has to be used, where the offset has to be coded in an offset DO.
Last edited by horse dream on Tue Jun 16, 2015 10:41 pm, edited 1 time in total.

User avatar
mabel
Posts: 237
Joined: Mon May 18, 2015 3:09 am
Points :1705
Contact:

Re: ISO7816 - Odd INS codes?

Post by mabel » Fri May 22, 2015 1:19 am

Hi,horse dream.Could you please explain what you mean : "Odd instruction codes are typically handled differently from the even ones by the card, they are no simple aliases for these..." As we all know,according to ISO, odd INS codes are invalid . What I want to know is if there is a card, which handles odd INS codes in an incorrect way .
Last edited by mabel on Tue Jun 16, 2015 10:25 pm, edited 1 time in total.

User avatar
horse dream
Posts: 76
Joined: Thu May 21, 2015 11:48 pm
Points :138
Contact:

Re: ISO7816 - Odd INS codes?

Post by horse dream » Fri May 22, 2015 1:53 am

mabel wrote:Hi,horse dream.Could you please explain what you mean : "Odd instruction codes are typically handled differently from the even ones by the card, they are no simple aliases for these..." As we all know,according to ISO, odd INS codes are invalid . What I want to know is if there is a card, which handles odd INS codes in an incorrect way .

The ISO7816 version you refer to dates from 1995. My understanding of javacard is, that your app alone defines, which INS codes it reacts to; I can't imagine another card-side instance taking any care.
Last edited by horse dream on Tue Jun 16, 2015 10:49 pm, edited 2 times in total.

User avatar
Larson
Posts: 18
Joined: Wed May 20, 2015 3:56 am
Points :30
Contact:

Re: ISO7816 - Odd INS codes?

Post by Larson » Tue May 26, 2015 11:46 pm

You can see the following description in the page 11 of ISO7816 spec.
In the interindustry class, bit 1 of INS indicates a data field format as follows.
* If bit 1 is set to 0 (even INS code), then no indication is provided.
* If bit 1 is set to 1 (odd INS code), then BER - TLV encoding (see 5.2.2) shall apply as follows.
• In unchained commands with SW1 not set to '61', data fields, if any, shall be encoded in BER - TLV .
• Command chaining and / or the use of SW1 set to '61' allow the transmission of data strings too long
for a single command. Such a process may split data objects in data fields consecutively sent as a
sequence in one direction, i.e., while sending no data field in the opposite direction. When chaining
commands and / or using SW1 set to '61', the concatenation of all the consecutive data fields in the
same direction in the same sequence shall be encoded in BER - TLV .
:)

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 6 guests

JavaCard OS : Disclaimer