News

Java Card Applet

Applications that run on Java smart cards are called applets. This chapter describes the applet development environment. The chapter consists of seven sections. The first section discusses the general principles of how applets work in the JCRE environment. The remaining sections are devoted to the methods of applet development.The properties of applets are described in detail throughout the book. For example, Chapters 8 and 9 discuss the processing of APDU commands and the sharing of objects by different applets. The Java Card applet is an...

read more

Java Card Exceptions and Exception Handling

An exception is an event that interrupts the normal flow of instructions during the execution of a program. Exceptions are an important component of the Java language. They provide a simple and elegant method of error handling in programs. The Java Card platform supports all Java programming language constructs related to exceptions. In Java Card applets, you can use the keywords throw, try, catch and finally. They work exactly the same as on the Java platform.Exceptions are raised by the JCRE classes and the Java Card Virtual Machine in the...

read more

Atomicity and Transactions

Smart cards are becoming increasingly popular devices for applications such as storing personal confidential information, as well as providing authorized access in mobile and distributed environments. However, when executing an applet in a smart card, there is a possibility of an error. The interruption of work may occur due to an error in calculations, butmost often this happens when the user unexpectedly removes the card from the reader. At the same time, the power supply to the card stops, and the execution of all applets is interrupted....

read more

Java Card Objects

In accordance with the Java Card technology, the JCRE runtime environment and applets create objects for representing, storing and processing data. Applets are written in the Java programming language. Executable applets on the card are objects of applet classes.Java Card platform objects obey the rules of the Java programming language:· All Java Card platform objects are instances of classes or arrays that share a common java.lang.Object root class.· The fields of the new object or the components of the new array are assigned default values...

read more

Applet development process

AID is also assigned to each Java package. During the process of uploading a package to the card, their identifiers are used to link with other packages on the card.The ISO 7816 standard specifies that AID should be used in smart card systems as unique identifiers of applications and files of certain types. AID is a byte array consisting of two independentparts. The first part is 5 bytes long and is called RID (resource identifier). The second part has a variable length and is called PIX (internal identifier extension). The length of the PIX...

read more

Java Card programming interfaces

Java Card programming interfaces include a set of specialized classes that are designed to program smart card applications in accordance with the model defined in the ISO 7816 standard. These APIs include three basic packages and one extension package. Basic packages – java.lang, javacard.framework and javacard.security. The extension package is called javacardx.crypto. Developers who are familiar with the Java platform may notice that many classes of this platform are not supported by Java Card programming interfaces. For example, Java...

read more

Java Card Execution Environment

The Java Card interpreter does not load CAP files on its own. It only executes the code that is contained in the CAP file. In Java Card technology, the mechanisms for downloading and installing CAP files are implemented in a program called an installer. The Java Card installer is located on the card. It is paired with an external installation program. This program transmits executable binary codes to the installer, which are located in the CAP file, through a card reader. The installer writes binary codes to the memory of the smart card,...

read more

Overview of Java Card technology

Java Card technology allows you to execute programs written in the Java programming language on smart cards and other computing devices with limited resources. This chapter provides an overview of the Java Card technology – the architecture of the system and its components. Smart cards are one of the most compact computing systems currently available. Smart cards usually contain 1 KB of RAM, 16 KB of programmable memory (EEPROM) and 24 KB of permanent memory (ROM). One of the most difficult tasks during the development of Java Card technology...

read more

Smart Card Standards and Specifications

ISO 7816 standards The ISO 7816 document “Identification cards – contact cards with an integrated microprocessor” is published by the International Organization for Standardization (ISO). It contains the main standards defining the characteristics of microprocessor cards with electrical contacts [6]. The ISO 7816 standard regulates various parameters of smart cards:· Section 1 – Physical characteristics· Section 2 – Card sizes and location of contacts· Section 3 – Electronic signals and transmission protocols· Section 4 –...

read more

EMV model of interaction with smart cards

APDU Protocol The APDU protocol is defined in the ISO 7816-4 standard. (Later in this book we will refer to the sections of the standard as follows: ISO 7816-X – specification X of the ISO 7816 standard.) This is an application-level protocol for data exchange between a smart card and a host application. According to the ISO 7816-4 specification, APDU messages come in two formats: the first format is used by the host application on the CAD side to transmit commands to the card, the second format is used by the card to send response messages...

read more