From: Amit <ami...@re...> - 2018-08-08 13:06:10
|
Dear Devels, I see this after connecting Atos card 5.3 # /usr/local/bin/opensc-tool -a -vvv 0x7fd485e77880 17:20:53.811 [opensc-tool] apdu.c:378:sc_single_transmit: CLA:0, INS:CA, P1:1, P2:8D, data(0) (nil) 0x7fd485e77880 17:20:53.811 [opensc-tool] reader-pcsc.c:284:pcsc_transmit: reader 'Gemalto PC Twin Reader 00 00' 0x7fd485e77880 17:20:53.811 [opensc-tool] reader-pcsc.c:285:pcsc_transmit: Outgoing APDU (5 bytes): 00 CA 01 8D 02 ..... 0x7fd485e77880 17:20:53.811 [opensc-tool] reader-pcsc.c:213:pcsc_internal_transmit: called 0x7fd485e77880 17:20:53.815 [opensc-tool] reader-pcsc.c:294:pcsc_transmit: Incoming APDU (4 bytes): 01 80 90 00 .... What is 02 in CAPDU (00 CA 01 8D 02)? Is this Le? P1=01(1st parameter), P2=8D(2nd parameter) Is RAPDU correct? (01 80 90 00) a. Asked P2 was 8D, but came=80. Does this mean card does not have data starting from 01 8D? b. Do I need to ask communication specs from manufacturer of card for same. Too early to say but sorry I feel there is lot of repetitive code we can optimize it. -- Thanks Amit Kumar !!If you stumble, get back up. What happened yesterday, no longer matters. Today is another day to move closer to your GOAL!! |
From: Jakub J. <jj...@re...> - 2018-08-09 08:15:56
|
On Wed, 2018-08-08 at 18:08 +0530, Amit wrote: > Dear Devels, > > I see this after connecting Atos card 5.3 > # /usr/local/bin/opensc-tool -a -vvv > 0x7fd485e77880 17:20:53.811 [opensc-tool] > apdu.c:378:sc_single_transmit: > CLA:0, INS:CA, P1:1, P2:8D, data(0) (nil) > 0x7fd485e77880 17:20:53.811 [opensc-tool] > reader-pcsc.c:284:pcsc_transmit: reader 'Gemalto PC Twin Reader 00 > 00' > 0x7fd485e77880 17:20:53.811 [opensc-tool] reader- > pcsc.c:285:pcsc_transmit: > Outgoing APDU (5 bytes): > 00 CA 01 8D 02 ..... > 0x7fd485e77880 17:20:53.811 [opensc-tool] > reader-pcsc.c:213:pcsc_internal_transmit: called > 0x7fd485e77880 17:20:53.815 [opensc-tool] reader- > pcsc.c:294:pcsc_transmit: > Incoming APDU (4 bytes): > 01 80 90 00 .... > > What is 02 in CAPDU (00 CA 01 8D 02)? Is this Le? > P1=01(1st parameter), P2=8D(2nd parameter) Yes, the 0x02 byte is Le from the Case 2 Short APDU [1]: http://cardwerk.com/iso-7816-4-annex-a-smart-card-standard/#AnnexA_2E_1 > Is RAPDU correct? (01 80 90 00) Yes, The 0x01 0x80 are the two bytes you got in response to Le=0x02 and 0x90 and 0x00 are Status Words (SW1 and SW1) indicating success. > a. Asked P2 was 8D, but came=80. Does this mean card does not have > data > starting from 01 8D? The 0xCA instruction is generic ISO GET DATA: http://cardwerk.com/smart-card-standard-iso7816-4-section-6-basic-interindustry-commands The provided P1-P2 value 0x01 0x8D falls under Application data (proprietary coding). The meaning is not defined by the ISO standard, but by the vendor. >From the card-cardos.c, this instruction is used to 207 /* probe DATA FIELD LENGTH with GET DATA */ so the response just means the amount of bytes we can send the card or receive from the card, nothing more nothing less. > b. Do I need to ask communication specs from manufacturer of card for > same. This might help to figure out what needs to be done for card enrolling. Regards, -- Jakub Jelen Software Engineer Security Technologies Red Hat, Inc. |
From: Douglas E E. <dee...@gm...> - 2018-08-13 13:55:54
|
ISO 7816-4 [1] answers most of your questions in Section "5.3 APDU message structure" and Section 6 - Basic Interindustry Commands" Note the class of the command determines if Lc and/or Le are present. The command your are looking at is "CA" see "6.9 GET DATA command" The protocol T=0 or T=1 also comes into play. As you read through 7816 you will not how complicated it is. And even worse when it is a proprietary command, where CLA byte is 8X or 9X. Thus there is a lot of code that your card may not be using, but other cards do. [1] http://cardwerk.com/iso-7816-smart-card-standard/ or other source. On 8/8/2018 7:38 AM, Amit wrote: > Dear Devels, > > I see this after connecting Atos card 5.3 > # /usr/local/bin/opensc-tool -a -vvv > 0x7fd485e77880 17:20:53.811 [opensc-tool] apdu.c:378:sc_single_transmit: CLA:0, INS:CA, P1:1, P2:8D, data(0) (nil) > 0x7fd485e77880 17:20:53.811 [opensc-tool] reader-pcsc.c:284:pcsc_transmit: reader 'Gemalto PC Twin Reader 00 00' > 0x7fd485e77880 17:20:53.811 [opensc-tool] reader-pcsc.c:285:pcsc_transmit: > Outgoing APDU (5 bytes): > 00 CA 01 8D 02 ..... > 0x7fd485e77880 17:20:53.811 [opensc-tool] reader-pcsc.c:213:pcsc_internal_transmit: called > 0x7fd485e77880 17:20:53.815 [opensc-tool] reader-pcsc.c:294:pcsc_transmit: > Incoming APDU (4 bytes): > 01 80 90 00 .... > > What is 02 in CAPDU (00 CA 01 8D 02)? Is this Le? > P1=01(1st parameter), P2=8D(2nd parameter) > > Is RAPDU correct? (01 80 90 00) > a. Asked P2 was 8D, but came=80. Does this mean card does not have data starting from 01 8D? > b. Do I need to ask communication specs from manufacturer of card for same. > > Too early to say but sorry I feel there is lot of repetitive code we can optimize it. > > > -- > Thanks > Amit Kumar > !!If you stumble, get back up. > What happened yesterday, no longer matters. > Today is another day to move closer to your GOAL!! > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > Opensc-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensc-devel > -- Douglas E. Engert <DEE...@gm...> |
From: Amit <ami...@re...> - 2018-08-13 14:35:33
|
Thanks Douglas, https://www.iso.org/standard/70479.html This is to be paid version. >From where you get ISO 7816-4 [1] On 08/13/2018 07:25 PM, Douglas E Engert wrote: > ISO 7816-4 [1] answers most of your questions in Section "5.3 APDU > message structure" > and Section 6 - Basic Interindustry Commands" > > Note the class of the command determines if Lc and/or Le are present. > The command your > are looking at is "CA" see "6.9 GET DATA command" The protocol T=0 or > T=1 also comes > into play. > > As you read through 7816 you will not how complicated it is. And even > worse when it is > a proprietary command, where CLA byte is 8X or 9X. Thus there is a lot > of code that > your card may not be using, but other cards do. > > [1] http://cardwerk.com/iso-7816-smart-card-standard/ > or other source. > > > On 8/8/2018 7:38 AM, Amit wrote: >> Dear Devels, >> >> I see this after connecting Atos card 5.3 >> # /usr/local/bin/opensc-tool -a -vvv >> 0x7fd485e77880 17:20:53.811 [opensc-tool] >> apdu.c:378:sc_single_transmit: CLA:0, INS:CA, P1:1, P2:8D, data(0) (nil) >> 0x7fd485e77880 17:20:53.811 [opensc-tool] >> reader-pcsc.c:284:pcsc_transmit: reader 'Gemalto PC Twin Reader 00 00' >> 0x7fd485e77880 17:20:53.811 [opensc-tool] >> reader-pcsc.c:285:pcsc_transmit: >> Outgoing APDU (5 bytes): >> 00 CA 01 8D 02 ..... >> 0x7fd485e77880 17:20:53.811 [opensc-tool] >> reader-pcsc.c:213:pcsc_internal_transmit: called >> 0x7fd485e77880 17:20:53.815 [opensc-tool] >> reader-pcsc.c:294:pcsc_transmit: >> Incoming APDU (4 bytes): >> 01 80 90 00 .... >> >> What is 02 in CAPDU (00 CA 01 8D 02)? Is this Le? >> P1=01(1st parameter), P2=8D(2nd parameter) >> >> Is RAPDU correct? (01 80 90 00) >> a. Asked P2 was 8D, but came=80. Does this mean card does not have >> data starting from 01 8D? >> b. Do I need to ask communication specs from manufacturer of card for >> same. >> >> Too early to say but sorry I feel there is lot of repetitive code we >> can optimize it. >> >> >> -- >> Thanks >> Amit Kumar >> !!If you stumble, get back up. >> What happened yesterday, no longer matters. >> Today is another day to move closer to your GOAL!! >> >> >> >> ------------------------------------------------------------------------------ >> >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> >> >> _______________________________________________ >> Opensc-devel mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/opensc-devel >> > -- Thanks Amit Kumar !!If you stumble, get back up. What happened yesterday, no longer matters. Today is another day to move closer to your GOAL!! |
From: Peter P. <pop...@gm...> - 2018-08-14 05:12:13
|
Hi, Partial information is available at http://cardwerk.com/iso-7816-smart-card-standard/ On Mon, Aug 13, 2018 at 4:35 PM Amit <ami...@re...> wrote: > Thanks Douglas, > > https://www.iso.org/standard/70479.html > > This is to be paid version. > > From where you get ISO 7816-4 [1] > > |
From: Amit <ami...@re...> - 2018-08-14 05:22:45
|
Thanks Perter This site I am aware of But Yes indeed its partial. :) Where can we find complete information.. That was my query. On 08/14/2018 10:41 AM, Peter Popovec wrote: > Hi, > > Partial information is available at > http://cardwerk.com/iso-7816-smart-card-standard/ > > > On Mon, Aug 13, 2018 at 4:35 PM Amit <ami...@re... > <mailto:ami...@re...>> wrote: > > Thanks Douglas, > > https://www.iso.org/standard/70479.html > > This is to be paid version. > > From where you get ISO 7816-4 [1] > > -- Thanks Amit Kumar !!If you stumble, get back up. What happened yesterday, no longer matters. Today is another day to move closer to your GOAL!! |