Development of Java Smart Card RMI Technology in Mobile Communication

1 Introduction

Java Smart Card (Java Card) technology is extremely widely used in the third generation of mobile communications (3G1. The emergence of Jaya smart card. It allows multiple applications to coexist in a smart card. These applications can come from the same card supplier. Can also come from different card suppliers. Users only need to refresh the program on the smart card. You can get different applications. Operators and developers get rid of the dependence on the card vendor. Greatly reduced costs. In the SIM card of mobile communications The application of Java smart cards is more and more extensive, and the prospect is extremely optimistic. Because the amount of Java smart cards used by SIM cards is increasing, the frequency of use is getting higher and higher. In order to better play the processing of the network and the computers distributed in the network Capability. The RMI technology of Java smart card in mobile communication becomes more and more important in the development and application.

2. The main features of Java smart card in mobile communication

In mobile communications, a Java smart card refers to a smart card that runs a Java applet. The corresponding Java virtual machine must be present on the card. Applets that comply with the Java Card technical specifications can run on the virtual machine. Sun has proposed the Java Card technical specifications. This includes detailed information about creating the Java Card virtual machine on the smart card and application programming interface 1: 3 (API). Compared with the traditional smart card system, the Java smart card platform has the following characteristics:

1. Cross-platform

At present, most SIM cards in mobile communication already support the technical specifications of the Java card. All Java Card Applets that meet the technical specifications of the Java Card API can run in the Java Card Runtime Environment (JCRE: Java Card RunTIme Environment). Developers are allowed to use the same The Applets of Java cards run on smart cards of different manufacturers, realizing the function of programming once and running everywhere, that is, to achieve the purpose of cross-platform through the mechanism of JVM.

2. Application development convenience

For applications on Java smart cards in mobile communications, developers can develop smart card applications without understanding the complex smart card hardware and smart card-specific technologies, thereby greatly reducing development time, reducing development difficulty and cost. And can make the original Java program developers to write smart card programs. Human resources are fully utilized to better meet the needs of the exponential growth of applications. At the same time, it is also the needs of the development of the times.

3. Security

In mobile communications, Java smart cards are one of the most critical issues. Security involves multiple aspects. The security mode of the Java smart card system has been improved in many aspects. Its security strategy is implemented by the Java Card Virtual Machine (fJCVM) and the Java Card Runtime Environment. Considering the application scope of the smart card and the particularity of the application, the Java card supports the protection of data integrity and prevents unauthorized access to sensitive data.

4. Multiple applications

In a Jaya card operating environment, you can run a variety of different applications (Applets) with very different functions, such as mobile Internet access, mobile securities trading, mobile phone games, etc. These applications can come from the same card supplier or from Different card suppliers, this is a very important feature of the new generation of mobile phones.

3. RMI technology and RMI technology of smart card in mobile communication and its application

3.1 RMI technology

RMI (Remote Method InvocaTIon) technology in J2SE is the core technology for developing Java distributed network applications. Unlike traditional RPC (Remote Procedure Call, remote procedure call) calling remote procedures, RMI is used to call remote objects. Method. Support communication between objects stored in different address spaces. Let objects located in different JVM spaces be used like local objects in appearance and behavior. It is the core solution of developing network distributed application system in pure object-oriented Java program.

The application program developed by RMI is composed of two parts: server program and client program. The server-side program will create multiple object instances at runtime (called remote objects). These object instances are used to provide some kind of service to customers. At the same time, the server opens the listening port and waits for the client program to call. The client program obtains the reference of the remote object from the server through the RMI mechanism at runtime. Call the party

The architecture of RMI can be represented by Figure 1:

RMI architecture

As can be seen from Figure 1, the RMI architecture is composed of multiple layers. The stub / skeleton layer uses the stub framework (ske1eton) method to hide the implementation details of the underlying communication. The stub represents the client object of the remote object. Has the same interface or method list as the remote object. When a client program calls a method of a remote object, it actually calls a method in the stub object. The stub forwards the request to the remote object. The skeleton object on the server side is responsible for decoding the information from the stub. The decoded information is handed over to the actual remote object for processing. After the remote object is processed, the result is passed to the skeleton object. Then the skeleton object is passed to the client's stub object, and finally the stub object passes this information to the client program.

3.2 RMI technology and application of Java smart card in mobile communication

In addition to being very similar to the RMI technology in J2SE, due to the limitations of smart card resources, the RMI technology in Java smart cards is different from the RMI technology in J2SE. In the Java smart card, the JavaCard applet is the server. The main application is the client. The main differences between the Java Smart Card RMI and the RMI in J2SE are as follows:

1) The RMI protocol communication in J2SE is accomplished through the stub implemented by the remote interface and the framework implemented by the remote interface, and in the RMI application in the Java smart card. The communication process between the client application and the server application is to first obtain an RMIService service, and then the service program communicates with the server application.

2) In the RMI model of the Java smart card. The process of APDU (Applicafion PintocolData Unit, application protocol data unit) communication is abstracted. Not directly through the APDU command, but through the processing of objects.

3) The software package in the Java smart card RMI model is also different from the RMI software in J2SE, namely jave. Rmi and javacard.framework.service. The java.rmi package defines the Remote interface and RemoteExcepfion class, and the javacard.framework.service package defines the JavaCard applet service class, including the CardRemoteObject and RMISenrice classes. The CardRemoteObject class defines methods to enable and prohibit remote access to objects outside the card. RMIServiee is used to process RMI requests and convert the input APDU commands into remote method calls.

Writing a Jaya smart card application generally includes the following steps (the examples given below are typical electronic wallets):

1) Define a remote service interface

This interface is responsible for defining the services that the Jaya smart card applet can provide. Similarly, this interface must extend java.rmi.Remote.

import java.rmi. *;

importjavaeard.framework. *;

public interface EPInterfaee extends Remote {

public short getBalance0 throw RemoteExeepTIon;

// About the method statement in the electronic wallet application

...

}

2) Write the server implementation of the remote class and the corresponding support class

In the Java smart card, the applet is the RMI server side, and a typical applet is shown as n1 in Figure 2:

In the picture, MyRemoteC1ass is a remote server class. You can implement the remote interface MyRemote to realize Remote. Remote can also be achieved by extending a corresponding smart card remote object class f-card (CardRemoteObject). In short, all remote application implementation classes must implement the Remote interface RMIService responsible for converting APDU calls into RMI calls. Dispatcher is responsible for distributing the received APDU commands to RMIService. From the figure, the server implementation mainly includes Jaya smart card applet, remote Service interface implementation class and application-related classes. The following is the structure of the applet:

3) Write a client-side program that uses the remote service class

Client programs usually include methods for initializing the OpenCard framework, waiting for a new card to be inserted, obtaining an OCFCardAccessor instance, creating a JavaCardRMIConnect instance, selecting a smart card applet, and calling remote objects. (Limited to space, the program is omitted)

3.3 Flow of RMI program of Java smart card in mobile communication

The flow of the RMI program of the Java smart card can be represented by the following figure [l].

Flow of RMI program of Java smart card

In the picture, HostAppheafion is a client application. Make RMI calls by sending APDUs to the JCRE on the card. Transfer to the (MyApplet) in the f of the applet on the smart card in sequence. The applet distributes the received APDUs command to RMIService through Dis.Datcher. RMIService processes APDUs one by one and converts these commands into remote method calls.

4. Summary

The application of Java smart cards in mobile communications is becoming more and more widespread, in the current software design. Distributed programming is increasingly valued by software developers. With the continuous expansion of applications in mobile communications. There will be a very large swell in programs and data traffic that needs to be processed. These programs and processed data and actual calculations are widely distributed on the network. RMI-based applications can share software and hardware resources such as networks and computers in the network. You can also balance the processing power of each computer.

Welcome to reprint, this article comes from the electronic enthusiast network (http: //)

Other Capacitors

Other Capacitors

Ac Filter Capacitor,Power Saver Capacitor,Line Filter Capacitor,Low Voltage Capacitor

YANGZHOU POSITIONING TECH CO., LTD , https://www.yzpstcc.com