Danny Kumamoto, 2-Nov-1998, Schlumberger APC, 
(History is at the end of the file.)

http://www.cyberflex.slb.com/ for card details.
http://www.linuxnet.com/ for Linux SC software details.



This is a Wallet cardlet (Java Card applet) for Cyberflex Access
(WalletOpen16K.java is for Cyberflex Open16K).


Everything is compiled and ready to be used by xcard.

To compile .java file, you'll need JDK (not supplied in this tar
file).  Make sure your CLASSPATH points to .../lib/access (to pull in
javacard and javacardx packages).  That is for sh/bash:

	JAVAPATH=/usr/local/jdk1.2.2
	export JAVAPATH
	JCPATH=/usr/local/src/cyberflexlinux-2.1/lib/access
	export JCPATH
	CLASSPATH=${JAVAPATH}/lib/classes.zip:${JCPATH}:.
	export CLASSPATH
	PATH=${JAVAPATH}/bin:${PATH}
	export PATH
	javac Wallet.java

(JAVAPATH is the full path to classes.zip for your specific JDK.
JCPATH is to wherever .../lib/access is found at.)

To convert .class files to .bin (format needed for Cyberflex
smart cards), you need to run mksolo found in .../bin directory:

	.../bin/mksolo -usemap=${JCPATH}/Access.map -v -d Wallet.class

(To get help on mksolo options, just type "../bin/mksolo").

To upload Wallet onto the Cyberflex card, you can bring up xcard (follow
the ../README file for details on building xcard) and enter:

1. (If the card reader is not ready, i.e., displays "Reader Fault",
make sure the card is inserted properly in the reader and try the
"RESET" button.)

2. Verify key (AUT0) first (use the "key" icon or go to Administrative
menu and "Verify Key").  

3. Click on the Coffee cup icon or select Java menu "Load Java
Program" and then fill in the fields.  The cardlet field should be
..../sample/Wallet.bin, the AID can be any hex number up to 16 bytes
(32 characters of ASCII) or you can enter a direct string via double
quote: "my wallet bin".  I recommend that you change the data size to
be 0400 [HEX] (NOTE: on the Windows Cyberflex Toolkits, the data size
is in decimal).  If you have non-crypto version of Access card, you
must clear the signing key field (or else xcard will try to validate
it using signed key).

4. Select the cardlet from Java menu and then bring up APDU manager found in
the Administrative menu.  The following are example APDU's
to interact with the cardlet;

                  IO   CLA INS P1  P2  P3  Data
Validate Pin:     send 03  40  00  00  04  00000000
Get Balance:      recv 03  30  00  00  01 (get one byte back: 20)


5. If you get success, then you've successfully uploaded the cardlet to
the Java Card and have a valid, running cardlet on it!

Danny

--- changes since 2-Nov-1998 ---

Danny Kumamoto, 4-Nov-1998, Schlumberger APC

I've updated the instructions above to give a list of detailed steps on 
compiling the cardlet and bringing it up on the xcard.

Danny Kumamoto, 25-Feb-2000, Schlumberger APC

I've updated for Access cards.
