Java Wallet APDU problem
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, December 12, 2001 03:15 AM

I am trying to run the Java Wallet application shipped along with the java card developement kit by SUN. The constructor of the Wallet tries to set the PIN for the user. The command in the demo.scr file corresponding to the creation of the wallet is 0x80 0xB8 0x00 0x00 0x11 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x05 0x01 0x02 0x03 0x04 0x05 0x7F 1)However, the PIN has a value "0x01 0x02 0x03 0x04 0x05" which is only a part of the data element. What are the other values from Lc (0x11) to the point where the PIN(0x01) starts?? 2)When the APDu buffer containing these values is passed to the method update(byte[] bArray, short bOffset, short bLength) of Owner   More>>


I am trying to run the Java Wallet application shipped along with the java card developement kit by SUN.



The constructor of the Wallet tries to set the PIN for the user. The command in the demo.scr file corresponding to the creation of the wallet is


0x80 0xB8 0x00 0x00 0x11 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x05 0x01 0x02 0x03 0x04 0x05 0x7F



1)However, the PIN has a value "0x01 0x02 0x03 0x04 0x05" which is only a part of the data element. What are the other values from Lc (0x11) to the point where the PIN(0x01) starts??



2)When the APDu buffer containing these values is passed to the method update(byte[] bArray, short bOffset, short bLength) of OwnerPIN class how does the OwnerPIN class pick the PIN which is 5 characers from the entire data element, since we do not specify the offset from where the PIN begins??



Thanks

ashutosh    <<Less

Re: Java Wallet APDU problem

Posted By:   Clement_SIMON  
Posted On:   Thursday, December 13, 2001 03:30 AM

1) The data before the PIN is the applet AID.


To sum it up, the APDU is composed of :

- 80 B8 00 00 11 : Header

- 0A : AID length

- 0A A0 00 00 00 62 03 01 0C 06 01 : Applet AID

- 05 : Installation parameters length

- 01 02 03 04 05 : Install parameters (PIN value)

- 7F : Le parameter


2) In file Wallet.java, line 73 :


pin.update(bArray, bOffset, bLength);


bArray is the APDU buffer.

bOffset is where the install parameters start (located just after the parameters length)

bLength is the length of the install parameters (located just after the applet AID)


Everything is explained in the JavaCard Development Kit User Guide (JCDevKit_User_Guide.pdf).

See page 62, Table 8.

About | Sitemap | Contact