Page 1 of 1

How to decode the response data

Posted: Wed May 24, 2017 10:55 pm
by mukundis
I tried to get data from my java card and got the response data below:

61 39 4f 0b a0 00 00 03 08 00 00 10 00 01 00 79 07 4f 05 a0 00 00 03 08 50 0e 49 44 2d 4f 6e 65 20 50 49 56 20 42 49 4f 5f 50 10 77 77 77 2e 6f 62 65 72 74 68 75 72 2e 63 6f 6d 7f 66 08 02 02 80 00 02 02 80 00 90 00

I know the last two bytes are status word. But the other data is so hard for me to understand. Could anybody help me to decode this to the readable data? Thanks for any help.

Re: How to decode the response data

Posted: Thu May 25, 2017 5:57 am
by chico0609
It seems that it is wrong TLV-coded data.

Re: How to decode the response data

Posted: Thu May 25, 2017 6:10 am
by Tarantino
This is actually two different concatenated TLV objects.

The first one is:

61 39 - tag 61 - application template
4f 0b - tag 4f application identifier
a0 00 00 03 08 00 00 10 00 01 00 -- aid of the application
79 07 -- tag 79 - tag identification scheme.
4f 05
a0 00 00 03 08
50 0e -- application label
49 44 2d 4f 6e 65 20 50 49 56 20 42 49 4f 5f
50 10 -- another application label
77:77:77:2e:6f:62:65:72:74:68:75:72:2e:63:6f:6d

The second one is less clear

7f 66 08 -- tag 7f66, length 8. constructed, (I don't know what tag 7f66 is).
02 02 - integer, length 2
80 00 - 32768 (may be negative, depends on who is interpreting this)
02 02 - integer, length 2
80 00 - 32768 (ditto)