Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Different command using C# and Java

LasaJun 20 2013 — edited Jun 20 2013

Hello!

We have to send a proprietary APDU to an encoder. We are doing it using the SMARTCARDIO library but something strange happens. The command we need to send is the following: 70204000 (as you can see it does not follow the 7816) and when we send it, we get the answer "0B 90 00",

The weird thing is that the manufacturer says that using JNI + JACSPCSC library it works. And another point is that if we try to send the command using a PCSC program written in C# (with winscard.dll) it works!

We have sniffed the USB communication and this is what we got:

We launch command: 70204000

C#

Sent >>

6F 04 00 00 00 01 38 04 00 00 70 20 40 00 05

5C 03 5F C1 0A 00 00 00 00 7A D0 11 00 00 00

00 00 7B CC 20 00 00 00 00 00 7C 0B 18 00 00

00 00 00 FD 58 03 00 00 00 00 00 FE 61 21 00

00 00 00 00

Received <<

80 11 00 00 00 01 38 00 81 00 90 C1 16 9D 9C

DD 7B 9E B4 8E 2F 20 B4 FA DB 2C D6

JAVA


Sent >>

6F 04 00 00 00 01 3D 04 00 00 30 20 40 00 00

00 45 1C 1B 00 00 00 00 00 46 95 19 00 00 00

00 00 C7 42 09 00 00 00 00 00 48 93 08 00 00

00 00 00 C9 14 18 00 00 00 00 00 4A F9 17 00

00 00 00 00

Received <<

80 03 00 00 00 01 3D 00 81 00 0B 90 00

We do not know why but the library seems to change the command code in case of JAVA from 0x70 to 0x30...

A last point, we have tried to encapsulate the command using CLA + INS + ... but we failed!

Is there any suggestion or... should we jump to the river?

Any advice is welcome!

Lasa

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 18 2013
Added on Jun 20 2013
1 comment
865 views