jCardSim - Java Card is Simple!

Tags: Java Card, Java Card 3

Java Card is one of widely deployed Java technology, today we have more then billion devices with Java Card support. Almost all bank cards with a chip and SIMs supports Java Card.
And with the development of NFC-technology area of ​​Java Card applications is expanding even more. In the same time learning of Java Card, development and debugging is a quite difficult process.

The situation is complicated by the fact that there are no single standard simulator for Java Card, except simulator that included in Java Card Development Kit, but this simulator has some limitations. Simulators which provided by vendors of smart cards such as JCOP Tools are paid and it is not so easy to buy it, by the way. And the problem was that here is a developer who have to use Java Card Development Kit's simulator or to buy some commercial kit (card reader, cards and SDK).

Going through all these difficulties on their own we decided to make open source simulator jCardSim. The innovation here is open source, because, mostly, all the available simulators are closed. It was a deliberate step to make it open source, because of the Java Card technology shouldn't be a black box for a developer in our opinion. In world of Java Card we have very high requirements for the applications, so one of the main point for us, was to create solution which gives the way to a developer to test it's applications as easy as it possible. In fine, you can test an application in five lines of code:

//1. create simulator
Simulator simulator = new Simulator();
//2. install applet
simulator.installApplet(appletAID, HelloWorldApplet.class);
//3. select applet
simulator.selectApplet(appletAID);
//4. send apdu
ResponseAPDU response = simulator.transmitCommand(new CommandAPDU(0x01, 0x01, 0x00, 0x00));
//5. check response
assertEquals(0x9000, response.getSW());

We also has been focused on a cryptography implementation as on the one of the most important things. jCardSim fully comply NXP 31/36k with a set of cryptographic algorithms. Today, there are no second simulator with these features.

jCardSim is a very simple to use: just download jar file and follow the Quick Start Guide to execute your first APDU script.

Using Simulator API and emulation of Java Card Terminal you can create prototypes of your applications and write Unit-tests with maximum level of efficiency.

Welcome to the world of Java Card!