Wednesday, April 7, 2010

Selects an applet and sends it a series of commands to execute.Each Applet is identified and selected by its AID(Application Identifier). Commands are formatted and transmitted in the form of APDU. Status Word: Applets reply to each APDU commands as SW. Applets can optionally reply to an APDU command with other data.

In both, EEPROM (a type of non-volatile memory) is often used for storing data.

At this point, the Java Card is ready for use. You can get a Java Card from an issuer or buy it from a retailer. Cards sold by a retailer are general-purpose, in which case personalization is often omitted.

Until now, an applet on the Java Card is in an inactive stage, until it is explicitly selected. When a JCRE receives a SELECT APDU command, it searches its internal table for the applet whose AID matches the one specified in the command.

If the match is found, the JCRE prepares a new applet to be selected.

This preparation process consist of two steps:

First, if a currently-selected applet is present, the JCRE deselects it by invoking the deselect( ) method.

The new applet performs any initialization necessary before it actually becomes selected
.

The applet returns true to the select( ) method if it is now ready to become active and to process subsequent APDU commands.

Otherwise, the applet returns false to decline its participation, and if so, no applet will be selected.

Function of process( ) Method

After this Selection of an applet, the JCRE forwards all the command APDU to the process( ) method (including the SELECT Command).

The process( ) method interprets each APDU command and performs the task specified by the command.

The applet for each APDU command sends the results back to the CAD by sending response APDU.

This command and response dialogue continues until a new applet is SELECTED or the card is removed from CAD.

The first if-statement, on the application select, has a 255/256 chance of being overruled by a perturbation attack on the data of the remaining PIN tries (and similar chances on the code execution). All the attacker then needs to do, is deselect the applet and presto, the PIN tries are reset!

It is these kind of items that make smartcard software development unlike most of the other code development (and serious fun if you have the appropriate wicked mind ;-) ).

in my code i used to set no of tries, suppose if i set no of tries 4, if you type the pin wrongly for 4 times, then it will lock, means program code deleted from the card. So, you have to publish your code inside once again through super admin.

Bell ID's I-PIN solution uses web services and Java applet technology to provide cross browser and cross platform communications to a smart card reader. Currently the product offering is aimed at EMV PIN Change, EMV Scripting, and Post Issuance personalisation, but this technology can be licenced for any general communications with a Smart Card.