B Annex - Application Management

A subset of GlobalPlatform Card Specification 2.3.1 [GPCS] is implemented by the simulator to support application management.

More precisely, the Simulator implements the subset defined in the GlobalPlatform Common Implementation Configuration 2.1. This includes loading CAP files, creating and deleting applet instances, and deleting packages. The following section describes the GPCS features implemented by the Simulator.

Refer to the following publications for more information about GlobalPlatform specifications. See the GlobalPlatform website.

Mapping of GlobalPlatform terminology to Java Card Simulator terminology:

Table B-1 Mapping terminology

GlobalPlatform Java Card
Card Content Management Application Management
Executable Load File (ELF) CAP File
Executable Module Package
Application Applet

Before you can run the Simulator with the GP functionality, ensure that the initial Issuer Security Domain (ISD) keys and the Global PIN are configured correctly using the Configurator tool. Refer to the Installation section for additional information and instructions.

The Issuer Identification Number (IIN) and Card Image Number (CIN) are set to default values but can be configured through the command line when launching the Simulator. For instructions, refer to the Java Card Development Kit Simulator Command Line section.

Supported GlobalPlatform Features

The ISD with the default AID defined by (GPCS) is the default selected applet after the start of the Simulator.

The ISD implements the secure channel protocol SCP03 with option i=’70’ specified in GP Amendment D. This implementation supports initial AES keys of length 128, 192 or 256 bit length. The initial keyset can be configured with the Configurator tool, please refer to the Configuring the Java Card Development Kit Simulator section of this document for the configuration of the keyset. The keys can be updated using STORE DATA or PUT KEY commands. Supplementary Security Domains (SSDs) can be installed and granted privileges (e.g., AM and DM). Additional hierarchies can be established if an SSD has the AM privilege and is extradited to itself. The SSDs are implementing SCP03 with a configurable option ‘i’ (including S16 mode). The Security Domains can allocate up to 250 bytes for the Data Store.

All the card lifecycle states specified in (GPCS) are supported. The Simulator is in lifecycle state OP_READY after the installation of the Simulator. It is possible to change the lifecycle state according to the rules defined in (GPCS). The ISD is in lifecycle state PERSONALIZED after the installation of the Simulator.

Privileges Supported by the Implementation

Privilege Can be assigned to Details
Security Domain ISD, SSD N/A
DAP Verification ISD, SSD AES scheme, RSA scheme Variant 1 and Variant 2, ECC scheme
Delegated Management SSD N/A
Card Lock ISD, SSD, Application N/A
Card Terminate ISD, SSD, Application N.A
Card Reset ISD, SSD, Application N.A
CVM Management ISD, SSD, Application N/A
Mandated DAP Verification ISD, SSD Same as DAP Verification
Trusted Path ISD, SSD, Application N/A
Authorized Management ISD, SSD N/A
Token Verification ISD, SSD AES scheme, RSA scheme Variant 1 and Variant 2, ECC scheme
Global Delete ISD, SSD N/A
Global Lock ISD, SSD N/A
Global Registry ISD, SSD, Application N/A
Final Application ISD, SSD, Application N/A
Global Service ISD, SSD, Application N/A
Receipt Generation ISD, SSD AES scheme.
Ciphered Load File Data Block ISD, SSD AES scheme, Initial Chaining Vector (ICV)
Contactless Activation Not supported N/A
Contactless Self Activation Not supported N/A

The SDs support the following APDU commands. Refer to GPCS for details of each command.

Supported APDU Commands

DELETE

The DELETE command is used to delete applet instances and packages.

GET DATA

The GET DATA command is used to retrieve a single or a set of BER-TLV-coded objects. The ISD supports the following objects identified by their TAG:

GET STATUS

The GET STATUS command is used to retrieve ISD, CAP file, package and applet status information.

INSTALL

The INSTALL command is used to initiate and perform the various steps of the Card Content management defined in the (GPCS).

GP Command chaining is supported for INSTALL with these limitations:

The following command data fields are supported. Refer to GPCS for details of these fields:

LOAD

The LOAD command is used to load a CAP file (compact as well as extended format) into the Simulator. A CAP file is usually loaded with multiple LOAD commands with a sequential numbering as described in (GPCS). Load File Data Block Hash (LFDBH) algorithms that are supported are SHA-1, SHA-256, SHA-384 and SHA-512.

MANAGE CHANNEL

This command is used to open and close logical channels. The Simulator’s -lcEncoding=<type> command-line option selects the APDU logical channel encoding. The default value, type4type16, supports 20 logical channels (0–19): the basic channel (0) and 19 supplementary channels (1–19). This value is used when the option is omitted or when the Simulator is started with -lcEncoding=type4type16. When started with -lcEncoding=type4, the Simulator supports four logical channels (0–3): the basic channel (0) and three supplementary channels (1–3). See Java Card Development Kit Simulator Command Line for details about this option.

The processing of the MANAGE CHANNEL command follows the rules described in the JCRE specification and in the (GPCS).

MANAGE ELF UPGRADE

The MANAGE ELF UPGRADE command manages a CAP File upgrade session through START, RESUME, RECOVERY, ABORT, and STATUS operations, as defined in Amendment H. The supported capabilities, behavior, and implementation limitations are described below.

SELECT

The SELECT command is used for selecting an Applet or a Security Domain (SD). The processing of the SELECT command follows the rules described in the JCRE specification and in the (GPCS).

SET STATUS

The SET STATUS command can be used to manage the card lifecycle state or the application life cycle state.

PUT KEY

The PUT KEY command can be used for key loading. GP Command chaining is supported with a maximum of three consecutive APDUs.

STORE DATA

The STORE DATA command is used to transfer data to an Applet or the ISD. If an Applet wants to receive these data, it has to use the mechanism described in the GlobalPlatform API. The Simulator supports key loading for the ISD or SSDs with the STORE DATA command. The command can be used to change the default Secure Channel Key Set.

GlobalPlatform API

The Simulator implements the GlobalPlatform API v. 1.6 (org.globalplatform). The documentation and the export files are available on the GlobalPlatform website. Refer to the link at the beginning of this chapter. The entire package is available in the Simulator but not all services are enabled. The following interfaces are not implemented:

GlobalPlatform Upgrade API

The Simulator provides the GlobalPlatform Upgrade API v1.1 (org.globalplatform.upgrade).