Page 1 of 1

command usage of GET-DATA and STORE-DATA

Posted: Fri Sep 15, 2017 2:40 am
by Anenl
I can store 8 bytes of data using store-data. But when I try to retrieve the data, I got the standard data, Is this the expected behavior of the java card? Hope anyone can give me some clues to help me out.

Code: Select all

cm> store-data 9F66081122334455667788
> 80 E2 80 00 0B 9F 66 08 11 22 33 44 55 66 77 88
< 90 00

cm> get-data 0066
> 80 CA 00 66 00
< 66 4C 73 4A 06 07 2A 86 48 86 FC 6B 01 60 0C 06
0A 2A 86 48 86 FC 6B 02 02 01 01 63 09 06 07 2A
86 48 86 FC 6B 03 64 0B 06 09 2A 86 48 86 FC 6B
04 02 15 65 0B 06 09 2B 85 10 86 48 64 02 01 03
66 0C 06 0A 2B 06 01 04 01 2A 02 6E 01 02 90 00

cm> get-data 9F66
> 80 CA 9F 66 00
< 6A 88

Re: command usage of GET-DATA and STORE-DATA

Posted: Fri Sep 15, 2017 4:15 am
by choimillen
You cannot use all the Data Grouping Index, 2 byte TLV . Some are already populated and can only be read, others cannot be written. Use the 0070 Data Grouping Index to put your data into the Security Domain's data store.