To create a Java card program, you must first understand its basic concepts,
Therefore, this article mainly describes the various concepts of Java card. The following information is not self-written
But I think it is easy to understand. If there is any infringement right, please let us know !! Zookeeper
Java card
1. The smallest subset in the Java platform
2. Java card Platform specification 2.2.1
Robot host, Zookeeper interface (API), and Operation Environment Rules
3. Minimum hardware configuration requirements:
512 bytes RAM
Heap during program running
Storage resources and I/O Region
24kb Rom
Operating environment, such as Vm and Applet
8 KB EEPROM
Development Applet
8-bit Processor
lifecycle of Java card
1. java card
started on OS, Vm, after the API was transferred to the ROM of the card
initialization-the creation of the memory structure (EEPROM)
personal-Attach personal information to a card (physical/electronic sub-course)
physical damage stops, incorrect operation dead or the application period of the card
2. java card-VM
consistent with Java card lifecycle (always running)
3. java card-applet
started when the applet is installed and stored in the Stored Procedure table on the card
later than when the applet is stored in the Stored Procedure table
Java Statement of Java card
1. Due to hardware limitations (memory size and CPU capability), Java card does not support all Java statement features.
2. The following statement does not support Java card.
Object cloning)
Security Manager)
Finalize () method
Data Type: float, double, long, char
Multiple rows
Only one worker column is supported.
Java card APIs [Mark Objective] (c) Class (I) Interface
1. java. lang Package: important class of Java program
Object (C), throwable (c)
2. javacard. Framework Package: Basic applet interface and Tool
Aid (c) APDU (c )~ Byte []
Applet (c) iso7816 (I)
Pin (I )~ Zookeeper ownerpin (c )~ Check () & Update ()
Retriable (I )~ Jcsystem (c) util (c)
3. javacard. Security Package: provides a suite of security mechanisms.
Key (I) keybuilder (c) messagedigest (c)
4. javacardx. crypto package: contains encryption and security objects.
Cipher (c)
Java Card Development Environment
1. Hardware: memory card, Java card (Gemplus)
2. runtime: j2sdk, Java Card Development Kit
3. Java Card Development Kit
Application tools: such as the zookeeper and apdutool)
File: jcdk User Guide, API (DOC)
Exp labels: Required exp labels (api_export_files)
Example: Sample (samples)
The development tool is available on the sun website.
Generate important and relevant files of the Applet
* Original Java program Program
*. Bytecode)
Javac released by VM
*. JCA javacard can be combined with statement
Generated by the zookeeper. You can generate a cap generator in the next step.
*. Exp outputs the token, and the Public Information and token of packages
*. The applet register after cap Authentication
The stoppedable route that can be added to the security group by javacard.
*. Jar Java file producer
Java card applet generation
1. original Java zookeeper collections (*. Java)
2. Java original callback (*. Class)-javac
3. Generate cap converter (*. Cap)-Converter
4. Applet Security
JAVA card coding
Use The APDU (application protocol data unit) command,
The APDU command compliance with ISO7816-4, and the standard defines two types
of APDU:
(1) command apdus-sent by a client application to a card.
(2) response apdus-return by card to a client application.