| By Jim Milbery | Article Rating: |
|
| November 1, 1998 12:00 AM EST | Reads: |
10,187 |
Product Installation
The Cyberflex kit ships with a Litronic 210 card reader, two Cyberflex smart cards and the development software on a CD-ROM. The installation process itself is straightforward; it's built with DemoShield so it behaves like a typical product installation. There are four pieces of software to install: the Microsoft Smart Card Base Components, the Litronic 210 Reader Driver, the Cyberflex Toolkit and the Cyberflex Documentation and Samples. Each installation requires a reboot operation, which slows down the overall installation, but it still took only ten minutes to install everything. The biggest challenge is getting the Litronic card reader plugged in and operating, as it uses a 25-pin serial adapter to connect to your workstation. Since I was running on a laptop, I was forced to dig into my bag of tricks and find a 25-pin to 9-pin converter (which Schlumberger is now including in their kits). The reader is powered off the keyboard connector, and I was able to connect my external mouse and the reader power supply into the same port without difficulty.
Developing a Java Card
Application
I'd advise you to read through the Programmer's Guide and the Java Card 2.0 specification document before you try working with the software. The Java Card 2.0 API is based on the ISO 7816 framework for smart cards, and not all smart card vendors implement all features for all parts of the ISO 7816 standard. Although I don't have a background in smart-card programming, I could follow the manual fairly easily. There are several key terms to understand before you get rolling. The first is Application Protocol Data Unit (APDU), the message you send between your application and the smart card. The Card Acceptance Device (CAD) is the physical device into which the smart card is inserted. The Java Card Runtime Environment (JCRE) is the Java Card Virtual Machine and core Java Card API classes. You should also remember that, by definition, objects on the Java Card are persistent, i.e., values persist from one CAD session to the next.
Schlumberger provides a number of sample applications as Java source files along with the development kit, and I suggest you start with the examples before striking out on your own. While the Java Card technology is powerful, you have to get used to working in a 16 K environment again, and the command language for ISO 7816 can be somewhat limiting if you aren't used to it. The Java applications you build use only Boolean, byte and short data types; your code must be derived from the applet class and compiled with the debugging option set, even for production code.
I ignored convention and started with the most complex of the four sample applications, the Wallet application. I used Oracle's JDeveloper 1.0 to open the Java source code for Wallet and followed the instructions in the tutorial for compiling and testing the application. You'll find the instructions at this point a trifle unclear since you need to use the simulator class libraries to test your program and the tutorial doesn't explicitly point you toward that. In general, I found the printed documentation a bit skimpy, but the Cyberflex Web site (www.cyberflex.slb.com) has a good newsgroup bulletin board. Thanks to the numerous postings from Schlumberger's Anthony Chen, I quickly figured out that I had the wrong libraries. Once I fixed that problem, I used the APDU simulator to test the Wallet program (see Figure 1).
Deploying the Code
The APDU Manager, part of the Cyberflex toolkit, allows you to input commands and data to your program as if the code was running on the Java Card itself. On the left-hand side of the panel is the input window, which you can use to input a command string to your Java program. The right-hand panel of the form shows the output from the program after processing your command. The simulator offers some clever additions, such as the ability to save commands for later reuse. Once I successfully tested the program with the simulator, I used the MakeSolo utility to convert my Java class file into a stand-alone executable program and deployed the code to the Java Card without difficulty.
Building Your Own Program
from Scratch
Once you're ready to begin developing programs from scratch, Schlumberger provides a simple, elegant skeleton Java program from which you can base your code. The skeleton code is derived from the Java applet class, and there is basically a five-step process to build your own program. First you create the applet name and class of instruction (CLA), then definitions for the primitive commands you'll be supporting. Next you define and allocate your instance variables for the application and create your class methods for the processing you plan to support in your program. The final step is to connect your methods to the APDU framework, which connects the messaging from the card to your application. Some restrictions are imposed on your code by the framework, and I'd suggest that you read the "Programming Requirements" section of the Developer's Guide before you start designing your own custom program.
Final Notes
Schlumberger is branding a complete line of smart technology under the Smart Village trademark, and they can print their Cyberflex cards with your company logo and information. The cards themselves have the same dimensions as a credit card with a small gold chip on the surface. Schlumberger's Cyberflex Open 16k Development Kit is worth looking into if you're considering using the technology for security or payment systems. Some other things you can get involved with are ID/personnel information, health care and telecommunications.
Published November 1, 1998 Reads 10,187
Copyright © 1998 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Jim Milbery
Jim Milbery is a Vice President with William Blair Capital Partners, a venture capital firm based in Chicago. He has over 19 years of experience in application development and relational databases. He is the former applications editor for "Wireless Business and Technology", the past product reviews editor for Java Developer Journal and the author of "Making the Technical Sale". Jim can be reached at jmilbery@williamblair.com, or via the company web site at http://www.wbcapitalpartners.com
- Kindle 2 vs Nook
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- Confessions of a Ulitzer Addict
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- It's the Java vs. C++ Shootout Revisited!
- Cloud Computing Can Revitalize Your Career as Software Developer
- IBM Could "Reinvent" Java: Mills
- Oracle & Cloud Computing: Exclusive Q&A with SVP Richard Sarwal
- A Brief History of Cloud Computing
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- JavaServer Faces (JSF) vs Struts
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- What's New in Eclipse?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- i-Technology Predictions for 2007: Where's It All Headed?







































