|
Java Card basics |
| For the purpose of this article, the term Java Card denotes a Java Card technology-enabled smart card. Java Card technology allows applets written in the Java language to be
executed on a smart card. It defines a Java Card Runtime Environment (JCRE) and provides classes and methods to help developers create applets. Applets run within the JCRE. The JCRE and APIs are modeled after the smart card specification
ISO 7816.
When a Java Card is inserted into a card acceptance device (CAD), the CAD selects an applet on the card and sends it a series of commands to execute. Each applet is identified and selected by its application identifier (AID). Commands such as the selection command are formatted and transmitted in the form of application protocol data units (APDUs). Applets reply to each APDU command with a status word (SW) that indicates the result of the operation. An applet can optionally reply to an APDU command with other data. |
As with any software application development, before sitting down and writing a Java Card applet, you should first go through a design phase. In this phase, you define the architecture of the applet.
Four steps comprise the applet-design phase:
In the following sections, we'll use the example of a wallet applet to take a detailed look at each of the steps in the applet-design process.
Our example wallet applet will store electronic money and support credit, debit, and check-balance functions.
To help prevent unauthorized use of the card, it contains a security algorithm. This algorithm requires the user to enter a PIN, a string of eight digits at most. The card user types his or her PIN on a keypad connected to the CAD. The security algorithm causes the card to lock after three unsuccessful attempts to enter the PIN. The PIN is initialized according to the installation parameters when the applet is installed and created.
commentsBy Anonymous on August 25, 2009, 5:19 amvery very good
Reply | Read entire comment
Good tutorial. Thank you.By Anonymous on June 29, 2009, 3:43 amGood tutorial. Thank you.
Reply | Read entire comment
Re: Good. But awful formatting By Anonymous on June 15, 2009, 4:14 amClick the print button above the article. the view is fine in the print version
Reply | Read entire comment
Good. But awful formatting By Anonymous on May 12, 2009, 11:26 amMuch as I enjoy having to go to the page source, find the table containing the code, and paste it into a new HTML document just to be able to view the damn thing,...
Reply | Read entire comment
GoodBy Anonymous on November 7, 2008, 1:25 amGood
Reply | Read entire comment
View all comments