Smart Cards; UICC Application Programming Interface (UICC API) for Java Card (TM) (Release 13)

RTS/SCP-T0310vd00

General Information

Status
Published
Publication Date
02-Nov-2015
Technical Committee
Current Stage
12 - Completion
Due Date
16-Oct-2015
Completion Date
03-Nov-2015
Mandate
Ref Project

Buy Standard

Standard
Smart Cards; UICC Application Programming Interface (UICC API) for Java Card (TM) (Release 13) - SCP TEC
English language
12 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

ETSI TS 102 241 V13.0.0 (2015-11)






TECHNICAL SPECIFICATION
Smart Cards;
UICC Application Programming Interface (UICC API)
for Java Card™
(Release 13)



---------------------- Page: 1 ----------------------
Release 13 2 ETSI TS 102 241 V13.0.0 (2015-11)



Reference
RTS/SCP-T0310vd00
Keywords
API, smart card
ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE

Tel.: +33 4 92 94 42 00  Fax: +33 4 93 65 47 16

Siret N° 348 623 562 00017 - NAF 742 C
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° 7803/88

Important notice
The present document can be downloaded from:
http://www.etsi.org/standards-search
The present document may be made available in electronic versions and/or in print. The content of any electronic and/or
print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any
existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the
print of the Portable Document Format (PDF) version kept on a specific network drive within ETSI Secretariat.
Users of the present document should be aware that the document may be subject to revision or change of status.
Information on the current status of this and other ETSI documents is available at
http://portal.etsi.org/tb/status/status.asp
If you find errors in the present document, please send your comment to one of the following services:
https://portal.etsi.org/People/CommiteeSupportStaff.aspx
Copyright Notification
No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying
and microfilm except as authorized by written permission of ETSI.
The content of the PDF version shall not be modified without the written authorization of ETSI.
The copyright and the foregoing restriction extend to reproduction in all media.

© European Telecommunications Standards Institute 2015.
All rights reserved.

TM TM TM
DECT , PLUGTESTS , UMTS and the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members.
TM
3GPP and LTE™ are Trade Marks of ETSI registered for the benefit of its Members and
of the 3GPP Organizational Partners.
GSM® and the GSM logo are Trade Marks registered and owned by the GSM Association.
ETSI

---------------------- Page: 2 ----------------------
Release 13 3 ETSI TS 102 241 V13.0.0 (2015-11)
Contents
Intellectual Property Rights . 5
Foreword . 5
Modal verbs terminology . 5
1 Scope . 6
2 References . 6
2.1 Normative references . 6
2.2 Informative references . 7
3 Definitions and abbreviations . 7
3.1 Definitions . 7
3.2 Abbreviations . 8
4 Description . 8
4.0 Purpose . 8
4.1 UICC Java Card™ architecture . 9
5 File access API . 10
5.0 Introduction . 10
5.1 FileView objects . 10
5.2 FileView operations . 11
5.3 BERTLVFileView operations . 11
6 Toolkit API and CAT Runtime Environment . 11
6.0 Introduction . 11
6.1 Applet triggering . 11
6.1.0 Triggering mechanism . 11
6.1.1 Exception handling . 12
6.2 Definition of events . 13
6.3 Registration . 19
6.4 Proactive command handling . 19
6.5 Envelope response handling . 20
6.6 System handler management . 20
6.7 CAT Runtime Environment behaviour. 22
6.7.0 Basic rules . 22
6.7.1 System proactive commands. 23
6.7.1.0 Overall behaviour . 23
6.7.1.1 SET UP MENU . 23
6.7.1.2 SET UP EVENT LIST . 24
6.7.1.3 POLL INTERVAL and POLLING OFF . 24
6.7.1.4 NEGOTIATION OF POLL INTERVAL . 24
6.7.2 UICC memory reliability monitoring . 25
7 Toolkit applet . 25
7.1 Applet loading . 25
7.2 Data and function sharing . 25
7.3 Package, applet and object deletion . 25
8 UICC and ADF File System Administration API . 26
8.0 Overview . 26
8.1 AdminFileView objects . 26
8.2 AdminFileView operations . 26
9 UICC Java Card™ Services . 26
9.0 Introduction . 26
9.1 High update arrays. 27
Annex A (normative): Java Card™ UICC API . 28
Annex B (normative): Java Card™ UICC API identifiers . 29
ETSI

---------------------- Page: 3 ----------------------
Release 13 4 ETSI TS 102 241 V13.0.0 (2015-11)
Annex C (normative): UICC API package version management . 30
Annex D (informative): Menu order example . 31
D.0 Preamble . 31
D.1 State after initialization . 31
D.2 Some application installation later . 31
D.3 Installation of application A with position of menu entry set to 3 . 31
D.4 Installation of application B with position of menu entry set to 3 . 31
D.5 Installation of application C with position of menu entry set to 2 and 3 . 32
D.5.1 Insert at position 2 . 32
D.5.2 Insert at position 3 . 32
D.6 Installation of application D with position of menu entry set to "00" . 32
D.7 Installation of application E with position of menu entry set to 20 . 33
D.8 Disabling/Locking of application legacy1 and application A with menu entries at position 1
respectively 6 . 33
D.9 Re-enabling/Unlocking of application legacy1 and application A with menu entries at position 1
respectively 6 . 33
D.10 Deletion of application A with menu entry at position 6 . 34
Annex E (informative): Change history . 35
History . 38


ETSI

---------------------- Page: 4 ----------------------
Release 13 5 ETSI TS 102 241 V13.0.0 (2015-11)
Intellectual Property Rights
IPRs essential or potentially essential to the present document may have been declared to ETSI. The information
pertaining to these essential IPRs, if any, is publicly available for ETSI members and non-members, and can be found
in ETSI SR 000 314: "Intellectual Property Rights (IPRs); Essential, or potentially Essential, IPRs notified to ETSI in
respect of ETSI standards", which is available from the ETSI Secretariat. Latest updates are available on the ETSI Web
server (http://ipr.etsi.org).
Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been carried out by ETSI. No guarantee
can be given as to the existence of other IPRs not referenced in ETSI SR 000 314 (or the updates on the ETSI Web
server) which are, or may be, or may become, essential to the present document.
Foreword
This Technical Specification (TS) has been produced by ETSI Technical Committee Smart Card Platform (SCP).
The present document details the stage 1 aspects (overall service description) for the support of an "Application
Programming Interface and Loader Requirements" [11].
The contents of the present document are subject to continuing work within TC SCP and may change following formal
TC SCP approval. If TC SCP decides to modify the contents of the present document, it will be re-released by TC SCP
with an identifying change of release date and an increase in version number as follows:
Version x.y.z
where:
x: the first digit:
1 presented to TC SCP for information;
2 presented to TC SCP for approval;
3 or greater indicates TC SCP approved document under change control.
y: the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections,
updates, etc.
z: the third digit is incremented when editorial only changes have been incorporated in the document.
Modal verbs terminology
In the present document "shall", "shall not", "should", "should not", "may", "need not", "will", "will not", "can" and
"cannot" are to be interpreted as described in clause 3.2 of the ETSI Drafting Rules (Verbal forms for the expression of
provisions).
"must" and "must not" are NOT allowed in ETSI deliverables except when used in direct citation.
ETSI

---------------------- Page: 5 ----------------------
Release 13 6 ETSI TS 102 241 V13.0.0 (2015-11)
1 Scope
The present document defines the stage two description of the "Application Programming Interface and Loader
Requirements" [11] internal to the UICC.
This stage two describes the functional capabilities and the information flow for the UICC API implemented on the
Java Card™ Platform, 3.0.1 Classic Edition [2], [3] and [4].
The present document includes information applicable to network operators, service providers and UICC, server and
database manufacturers.
2 References
2.1 Normative references
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the
reference document (including any amendments) applies.
Referenced documents which are not found to be publicly available in the expected location might be found at
http://docbox.etsi.org/Reference.
• In the case of a reference to a TC SCP document, a non-specific reference implicitly refers to the latest version
of that document in the same Release as the present document.
NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee
their long term validity.
The following referenced documents are necessary for the application of the present document.
[1] Void.
[2] ORACLE: "Application Programming Interface, Java Card™ Platform, 3.0.1 Classic Edition".
[3] ORACLE: "Runtime Environment Specification, Java Card™ Platform, 3.0.1 Classic Edition".
[4] ORACLE: "Virtual Machine Specification Java Card™ Platform, 3.0.1 Classic Edition".
NOTE: ORACLE Java Card™ Specifications can be downloaded at
http://docs.oracle.com/javame/javacard/javacard.html.
[5] ETSI TS 101 220: "Smart Cards; ETSI numbering system for telecommunication application
providers".
[6] ETSI TS 102 221: "Smart Cards; UICC-Terminal interface; Physical and logical characteristics".
[7] ETSI TS 102 223: "Smart Cards; Card Application Toolkit (CAT)".
[8] ETSI TS 102 222: "Integrated Circuit Cards (ICC); Administrative commands for
telecommunications applications".
[9] ETSI TS 102 225: "Smart Cards; Secured packet structure for UICC based applications".
[10] ETSI TS 102 226: "Smart Cards; Remote APDU structure for UICC based applications".
[11] ETSI TS 102 240: "Smart Cards; UICC Application Programming Interface and Loader
Requirements; Service description".
[12] ETSI TS 123 040 (V6.6.0): "Digital cellular telecommunications system (Phase 2+); Universal
Mobile Telecommunications System (UMTS); Technical realization of Short Message Service
(SMS) (3GPP TS 23.040 version 6.6.0 Release 6)".
[13] ETSI TS 102 241: "Smart Cards; UICC Application Programming Interface (UICC API) for Java
Card™".
ETSI

---------------------- Page: 6 ----------------------
Release 13 7 ETSI TS 102 241 V13.0.0 (2015-11)
[14] ETSI TS 102 671: "Smart Cards; Machine to Machine UICC; Physical and logical characteristics".
[15] GlobalPlatform: "GlobalPlatform Card Specification, version 2.2.1".
NOTE: See http://www.globalplatform.org/.
[16] GlobalPlatform: "Java Card API and Export File for Card Specification, v2.2.1",
(org.globalplatform) v1.5.
NOTE: See http://www.globalplatform.org/.
2.2 Informative references
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the
reference document (including any amendments) applies.
NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee
their long term validity.
The following referenced documents are not necessary for the application of the present document but they assist the
user with regard to a particular subject area.
Not applicable.
3 Definitions and abbreviations
3.1 Definitions
For the purposes of the present document, the following terms and definitions apply:
applet: application built up using a number of classes which will run under the control of the Java Card™ virtual
machine
bytecode: machine independent code generated by a Java compiler and executed by the Java interpreter
class: type that defines the implementation of a particular kind of object
NOTE: A Class definition defines instance and class variables and methods.
framework: defines a set of Application Programming Interface (API) classes for developing applications and for
providing system services to those applications
java: object oriented programming language developed by Sun Microsystems designed to be platform independent
method: piece of executable code that can be invoked, possibly passing it certain values as arguments
NOTE: Every Method definition belongs to some class.
object: principal building block of object oriented programs
NOTE: Each object is a programming unit consisting of data (variables) and functionality (methods).
package: group of classes
NOTE: Packages are declared when writing a Java Card™ program.
toolkit application: application on the UICC card which can be triggered by toolkit events issued by the Terminal and
which can send proactive commands to the terminal
NOTE: These applications can be downloaded via any type of network.
virtual machine: part of the Run-time environment responsible for interpreting the bytecode
ETSI

---------------------- Page: 7 ----------------------
Release 13 8 ETSI TS 102 241 V13.0.0 (2015-11)
3.2 Abbreviations
For the purposes of the present document, the abbreviations given in ETSI TS 102 221 [6] and the following apply:
ADF Application Dedicated File
AID Application IDentifier
APDU Application Protocol Data Unit
API Application Programming Interface
DF Dedicated File (abbreviation formerly used for Data Field)
EF Elementary File
FFS For Further Study
JCRE Java Card™ Runtime Environment
MF Master File
NAA Network Access Application (e.g. SIM, USIM)
RFM Remote File Management
TLV Tag Length Value
4 Description
4.0 Purpose
The present document describes an API and a Runtime Environment for the UICC platform. This API and the Runtime
Environment allows application programmers to get access to the functions and data described in ETSI TS 102 221 [6]
and ETSI TS 102 223 [7] such that UICC based services can be developed and loaded onto a UICC, quickly and, if
necessarily, remotely, after the card has been issued.
This API is an extension to the "Application Programming Interface, Java Card™ Platform, 3.0.1 Classic Edition" [2],
the Runtime Environment is an extension of the "Runtime Environment Specification, Java Card™ Platform, 3.0.1
Classic Edition" [3].
ETSI

---------------------- Page: 8 ----------------------
Release 13 9 ETSI TS 102 241 V13.0.0 (2015-11)
4.1 UICC Java Card™ architecture
The overall architecture of the UICC API is based on Java Card™ Platform, 3.0.1 Classic Edition [2], [3] and [4].

UICC File 102 221 based Other Toolkit Applet
System Applications Applications (e.g . Toolkit
Server (e.g . SIM not based on service,
Applet or 102 221 Remote
USIM Applet) Management
Applications,
ADF File Browser
System Server Applications)
TM
Java Card uicc.access uicc.toolkit uicc.system
Packages package package package
TM
Java Card Runtime Environment CAT Runtime Environment
Toolkit Toolkit Triggering
Handlers Registry Entity
Items that are defined in this specification


Figure 1: UICC Java Card™ architecture
Java Card™ Runtime Environment: this is specified in " Runtime Environment Specification, Java Card™ Platform,
3.0.1 Classic Edition" [3] and is able to select any specific applet and transmit to it the process of its APDU.
CAT Runtime Environment: this is the CAT Runtime Environment composed of, the Toolkit Registry, the Toolkit
Handlers and the Triggering Entity. It is an addition to the JCRE.
Toolkit Registry: this is handling all the registration information of the Toolkit applets, and their link to the JCRE
registry.
Toolkit Handlers: this is handling the availability of the system handler and the toolkit protocol (i.e. Toolkit applet
suspension).
UICC File System Server: it contains the File System of the UICC specified in ETSI TS 102 221 [6] (i.e. the EF and
DF under the MF).
ADF File System Server: it contains the files of an ADF as specified in ETSI TS 102 221 [6] (i.e. the EF and DF under
the ADF).
Applets: these derive from javacard.framework.applet and provide the entry points: process, select, deselect, install as
defined in the " Runtime Environment Specification, Java Card™ Platform, 3.0.1 Classic Edition" [3].
Toolkit Applets: are the Java Card™ based implementation of Toolkit Applications, these derive from
javacard.framework.applet, to provide the same entry points, and provide one object implementing the
uicc.toolkit.ToolkitInterface interface, so that these applets can be triggered by an invocation of the processToolkit()
method. The Toolkit applet(s) AID are defined in ETSI TS 101 220 [5].
ETSI

---------------------- Page: 9 ----------------------
Release 13 10 ETSI TS 102 241 V13.0.0 (2015-11)
Remote Application Management Application: this is handling the loading, installation, management and removal of
applets and packages as specified in ETSI TS 102 226 [10].
Shareable interface: this is defined in the "Runtime Environment Specification, Java Card™ Platform, 3.0.1 Classic
Edition" specifications [2], [3] and [4].
CAT session: card session opened by a terminal supporting proactive UICC, starting with the download of the
Terminal Profile and ending with a subsequent reset or deactivation of the card.
5 File access API
5.0 Introduction
The file access API consists of the uicc.access package, which allows applets to access the file systems of the UICC.
5.1 FileView objects
MF
EF's
e.g.
DF Telecom
ADF 2
ADF 1
DF GSM

Figure 2: Logical structure of FileView
Any applet (not only Toolkit applets) is allowed to retrieve and use a FileView.
A FileView object can be retrieved by invoking one of the getTheFileView() methods defined in the UICCSystem class.
The UICC FileView allows to access the MF and all DFs and EFs that are located under the MF, including DF Telecom
and any access technology specific DF located under the MF, but not the files located under any ADF. This FileView
can be retrieved by invoking the getTheFileView() method from the UICCSystem. The only way to access the DF GSM
is to request the UICC FileView.
An ADF FileView allows to access only the DFs and EFs located under the ADF. It is not possible to access the MF or
any DF or EF located under the MF from an ADF FileView. An ADF FileView can be retrieved by invoking the
getTheFileView(…) method with passing as parameter the full AID of the application owning the ADF.
Each FileView object shall be provided as a permanent JCRE entry point object.
A separate and independent file context shall be associated with each and every FileView object: the operation
performed on files in a given FileView object shall not affect the file context associated with any other FileView object.
This context can be transient or persistent depending on what was required by the applet during the creation of the
FileView object.
Each FileView shall be given the access control privileges associated with the UICC or the corresponding ADF for the
applet. The access control privileges are defined by the UICC access application specific parameters specified in ETSI
TS 102 226 [10]. UICC administrative access application specific parameters shall not apply to objects retrieved from
the uicc.access.UICCSystem class. The access control privileges are verified against the access rules defined in ETSI
TS 102 221 [6] each time a method of the FileView object is invoked.
ETSI

---------------------- Page: 10 ----------------------
Release 13 11 ETSI TS 102 241 V13.0.0 (2015-11)
The root of the context of a FileView object is the MF for the UICC FileView or the ADF for an ADF FileView.
At the creation of a FileView object, the current DF of the FileView's context is the root. When the transient context of a
FileView is cleared, the current DF becomes the root of the FileView.
5.2 FileView operations
The following functions are provided by the methods defined in the uicc.access.FileView interface see annex A:
• ACTIVATE FILE as defined in ETSI TS 102 222 [8].
• DEACTIVATE FILE as defined in ETSI TS 102 222 [8].
• INCREASE as defined in ETSI TS 102 221 [6].
• READ BINARY as defined in ETSI TS 102 221 [6].
• READ RECORD as defined in ETSI TS 102 221 [6].
• SEARCH RECORD as defined in ETSI TS 102 221 [6].
• SELECT by File ID or by Path as defined in ETSI TS 102 221 [6].
• STATUS as defined in ETSI TS 102 221 [6].
• UPDATE BINARY as defined in ETSI TS 102 221 [6].
• UPDATE RECORD as defined in ETSI TS 102 221 [6].
5.3 BERTLVFileView operations
BER TLV files functions may be optionally supported by an implementation. If supported, an implementation shall
provide the uicc.access.bertlvfile package and the 32-bit integer data type support defined optional in "Virtual Machine
Specification Java Card™ Platform, 3.0.1 Classic Edition" [4] is mandatory.
The interface uicc.access.bertlvfile.BERTLVFileView extends the interface uicc.access.FileView, i.e. objects
implementing the interface BERTLVFileView inherit FileView functionality.
If BER TLV files functions are supported by an implementation, the getTheFileView() and getTheUICCView() methods
defined in the UICCSystem class shall return the reference of an object implementing the BERTLVFileView interface.
The following functions are provided by the methods defined in the uicc.access.bertlvfile.BERTLVFileView interface
see annex A:
• RETRIEVE DATA as defined in ETSI TS 102 221 [6].
• SET DATA as defined in ETSI TS 102 221 [6].
6 Toolkit API and CAT Runtime Environment
6.0 Introduction
The toolkit API consists of the uicc.toolkit package, which allows applets to access the toolkit features defined in ETSI
TS 102 223 [7].
6.1 Applet triggering
6.1.0 Triggering mechanism
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.