Tech-
invite
3GPP
space
IETF
space
21
22
23
24
25
26
27
28
29
31
32
33
34
35
36
37
38
4‑5x
TS 31.113
Universal Subscriber Identity Module Application Toolkit (USAT) interpreter
byte codes
3GPP‑Page
ETSI‑search
ToC
↓
V8.0.0 (PDF)
2009/02 136 p.
V7.0.0
2007/06 136 p.
V6.3.0
2005/01 137 p.
V5.6.0
2005/01 98 p.
Rapporteur:
Miss Massascusa, Sofia
full Table of Contents for
TS 31.113
Word version: 8.0.0
1
Scope
p. 10
2
References
p. 10
3
Definitions, abbreviations and symbols
p. 11
3.1
Definitions
p. 11
3.2
Abbreviations
p. 12
3.3
Symbols
p. 13
4
Model of computation
p. 14
4.1
Navigation
p. 15
4.2
Communication with the external system entity
p. 15
4.2.1
Incoming pages from the external system entity
p. 15
4.2.2
Outgoing data to the external system entity
p. 15
4.2.3
Wait State
p. 16
4.3
Terminal response handler mechanism
p. 17
4.3.1
Operation of the Terminal Response Handler
p. 18
4.3.1.1
Definitions
p. 18
4.3.1.2
Operation
p. 18
4.3.2
Default Terminal Response Handler configuration
p. 18
4.4
Activation
p. 19
4.5
Page format overview
p. 21
4.6
History list
p. 21
5
TLV Format
p. 22
5.1
Coding of the tag byte
p. 23
5.2
Attributes in TLVs
p. 23
5.3
Coding of attribute bytes
p. 23
6
Variables
p. 24
6.1
Usage areas
p. 24
6.1.1
Environment variable usage area
p. 25
6.1.1.1
USAT Interpreter system information partition
p. 25
6.1.1.1.1
Write access to the partition
p. 27
6.1.1.1.2
Read access of the partition
p. 27
6.1.1.2
USIM issuer information partition
p. 27
6.1.1.2.1
Write access to the partition
p. 27
6.1.1.2.2
Read access of the partition
p. 27
6.1.1.3
End user information partition
p. 27
6.1.1.3.1
Write access to the partition
p. 27
6.1.1.3.2
Read access of the partition
p. 27
6.1.2
Permanent variable area
p. 28
6.1.2.1
Write access to the permanent variable area
p. 28
6.1.2.2
Read access of the permanent variable area
p. 28
6.1.3
Temporary variable area
p. 29
6.1.3.1
Write access to the temporary variable area
p. 29
6.1.3.2
Read access of the temporary variable area
p. 29
6.1.3.3
Lifetime of temporary variables
p. 30
6.1.4
Page string element
p. 30
6.1.4.1
Write access to page string elements
p. 30
6.1.4.2
Read access of page string elements
p. 30
6.2
Variable values
p. 30
6.3
Variable substitution
p. 30
7
Used USAT Interpreter data structures
p. 32
7.1
Page
p. 32
7.1.1
Attributes
p. 33
7.1.2
Page Identification
p. 33
7.1.3
Page Unlock Code
p. 33
7.1.4
One Time Password
p. 34
7.1.5
Keep Alive List
p. 34
7.1.6
Service ID
p. 34
7.1.7
String Pool
p. 34
7.1.8
Terminal response handler modifier
p. 34
7.1.8.1
Attribute
p. 35
7.1.8.2
General result range
p. 37
7.1.8.3
Text for user notification
p. 37
7.1.8.4
Action
p. 38
7.1.8.4.1
Attributes
p. 38
7.1.8.4.2
Action ID
p. 39
7.1.8.4.3
Action to be performed
p. 39
7.1.8.4.4
Action description
p. 41
7.2
Navigation Unit
p. 42
7.2.1
Attributes
p. 42
7.2.2
Anchor
p. 42
7.2.3
Terminal response handler modifier
p. 43
7.2.4
USAT Interpreter Byte Codes
p. 43
7.3
Anchor Reference
p. 43
7.4
Variable Identifier List
p. 43
7.5
Inline Value
p. 43
7.6
Inline Value 2
p. 44
7.7
Input List
p. 45
7.8
Ordered TLV List
p. 45
7.9
Page Reference
p. 45
7.9.1
Anchor Reference
p. 45
7.9.2
Variable Identifier List
p. 46
7.9.3
Submit Configuration
p. 46
7.9.3.1
Attributes
p. 46
7.9.3.2
Submit Data
p. 47
7.9.3.3
Text to be displayed during the active wait state
p. 47
7.9.3.4
Gateway Address
p. 47
7.10
Submit
p. 48
7.10.1
Submit Data
p. 48
7.10.2
Page Identification
p. 48
8
USAT Interpreter byte codes
p. 48
8.1
Set Variable
p. 49
8.2
Assign and Branch
p. 49
8.2.1
Destination Variable Identifier
p. 50
8.2.2
Inline TLV containing Select Item Title
p. 50
8.2.3
Ordered TLV List TLV
p. 50
8.3
Extract
p. 52
8.4
Go Back
p. 52
8.5
Branch On Variable Value
p. 53
8.5.1
Variable ID
p. 53
8.5.2
Ordered TLV List
p. 53
8.5.3
Page Reference
p. 53
8.6
Exit
p. 53
8.7
Execute USAT Command
p. 54
8.7.1
Attributes
p. 56
8.7.2
Simple TLV
p. 56
8.7.3
Simple TLV Indicator
p. 56
8.7.4
Sequence of Simple TLVs and Simple TLV Indicators
p. 57
8.7.5
Result of an Execute USAT Command
p. 57
8.7.5.1
Optimisation not Required
p. 57
8.7.5.2
Optimisation Required
p. 58
8.8
Execute Native Command
p. 58
8.8.1
Attributes
p. 58
8.8.2
Result of a Native Function Call
p. 59
8.9
Get Length
p. 59
8.10
Get TLV Value
p. 59
8.11
Display Text
p. 60
8.12
Get Input
p. 60
9
Native Commands
p. 61
9.1
Security Plug-ins
p. 62
9.1.1
Common Topics
p. 62
9.1.1.1
Security Policy
p. 62
9.1.1.2
Classification of PINs
p. 62
9.1.1.3
Key Diversification
p. 62
9.1.1.4
Output Parameters
p. 62
9.1.2
PKI Plug-ins
p. 63
9.1.2.1
P7 - PKCS#7 Signature Plug-In
p. 63
9.1.2.1.1
Description
p. 63
9.1.2.1.2
NCI
p. 63
9.1.2.1.3
Arguments
p. 63
9.1.2.1.4
Output Parameters
p. 64
9.1.2.1.5
Execution
p. 64
9.1.2.1.6
Errors
p. 64
9.1.2.2
FP - Fingerprint Plug-In
p. 64
9.1.2.2.1
Description
p. 64
9.1.2.2.2
NCI
p. 65
9.1.2.2.3
Arguments
p. 65
9.1.2.2.4
Output Parameters
p. 66
9.1.2.2.5
Execution
p. 66
9.1.2.2.6
Errors
p. 66
9.1.2.3
AD - Asymmetric Decryption Plug-In
p. 66
9.1.2.3.1
Description
p. 66
9.1.2.3.2
NCI
p. 66
9.1.2.3.3
Arguments
p. 66
9.1.2.3.4
Output Parameters
p. 66
9.1.2.3.5
Execution
p. 67
9.1.2.3.6
Errors
p. 67
9.1.3
Triple DES Plug-ins
p. 67
9.1.3.1
DE - Triple DES Encryption Plug-In
p. 67
9.1.3.1.1
Description
p. 67
9.1.3.1.2
NCI
p. 67
9.1.3.1.3
Arguments
p. 67
9.1.3.1.4
Output Parameters
p. 68
9.1.3.1.5
Execution
p. 68
9.1.3.1.6
Errors
p. 68
9.1.3.2
DD - Triple DES Decryption Plug-In
p. 68
9.1.3.2.1
Description
p. 68
9.1.3.2.2
NCI
p. 68
9.1.3.2.3
Arguments
p. 68
9.1.3.2.4
Output Parameters
p. 69
9.1.3.2.5
Execution
p. 69
9.1.3.2.6
Errors
p. 69
9.1.3.3
DS - Triple DES Sign Plug-In
p. 69
9.1.3.3.1
Description
p. 69
9.1.3.3.2
NCI
p. 70
9.1.3.3.3
Arguments
p. 70
9.1.3.3.4
Output Parameters
p. 70
9.1.3.3.5
Execution
p. 70
9.1.3.3.6
Errors
p. 70
9.1.3.4
DU - Triple DES Unwrap Plug-In
p. 71
9.1.3.4.1
Description
p. 71
9.1.3.4.2
NCI
p. 71
9.1.3.4.3
Arguments
p. 71
9.1.3.4.4
Output Parameters
p. 71
9.1.3.4.5
Execution
p. 71
9.1.3.4.6
Errors
p. 71
9.1.4
PIN Management Plug-ins
p. 72
9.1.4.1
CP - Change PIN Plug-In
p. 72
9.1.4.1.1
Description
p. 72
9.1.4.1.2
NCI
p. 72
9.1.4.1.3
Arguments
p. 72
9.1.4.1.4
Output Parameters
p. 72
9.1.4.1.5
Execution
p. 72
9.1.4.1.6
Errors
p. 72
9.1.4.2
RP - Reset PIN Plug-In
p. 73
9.1.4.2.1
Description
p. 73
9.1.4.2.2
NCI
p. 73
9.1.4.2.3
Arguments
p. 73
9.1.4.2.4
Output Parameters
p. 73
9.1.4.2.5
Execution
p. 74
9.1.4.2.6
Errors
p. 74
10
End to End Security
p. 74
10.1
Encrypt
p. 74
10.2
Decrypt
p. 74
11
Modes of operation
p. 74
11.1
Pull
p. 74
11.2
Push / Cell Broadcast
p. 74
12
Error handling and coding
p. 74
12.1
Setting of the environment variable "error code"
p. 74
12.2
User notification of the execution
p. 75
12.3
Error coding
p. 75
13
Tag Values
p. 76
A
Terminal Response Handler Flow Charts
p. 77
B
Example of Accessing USAT Interpreter Functionality in Wireless Mark-up Language
p. 79
B.1
Introduction
p. 79
B.1.1
Purpose
p. 79
B.1.2
Terminology
p. 79
B.1.3
Definitions and abbreviations
p. 80
B.2
Namespace
p. 80
B.2.1
The USAT Interpreter EF Class
p. 80
B.2.2
Examples
p. 80
B.3
WML
p. 81
B.3.1
WML Syntax
p. 81
B.3.1.1
The WML page
p. 81
B.3.1.2
Entities
p. 81
B.3.1.3
Elements
p. 82
B.3.1.4
Attributes
p. 82
B.3.1.5
Variables
p. 82
B.3.2
Extended functionality interface
p. 82
B.4
Implicit calls using WML syntax
p. 82
B.4.1
Prologue
p. 82
B.4.2
Character encoding
p. 82
B.4.3
Elements
p. 83
B.4.3.1
wml element
p. 83
B.4.3.2
card element
p. 84
B.4.3.3
p element
p. 84
B.4.3.4
br element
p. 84
B.4.3.5
input element
p. 84
B.4.3.6
select Element
p. 85
B.4.3.7
option element
p. 85
B.4.3.8
go element
p. 86
B.4.3.9
setvar element
p. 87
B.4.3.10
noop element
p. 87
B.4.3.11
do element
p. 88
B.4.3.12
refresh Element
p. 88
B.5
Explicit calls using WML syntax
p. 88
B.5.1
Services for USAT Commands
p. 88
B.5.1.1
Launch Browser
p. 89
B.5.1.2
Play tone
p. 89
B.5.1.3
Provide Local Information
p. 90
B.5.1.4
Refresh
p. 90
B.5.1.5
Run AT Command
p. 91
B.5.1.6
Send USSD
p. 91
B.5.1.7
Send SM
p. 91
B.5.1.8
Set up call
p. 92
B.5.1.9
Set Idle Mode Text
p. 92
B.5.2
Services for Interpreter Commands
p. 93
B.5.2.1
Get Interpreter Version Information
p. 93
B.5.2.2
Get Interpreter Buffer Size
p. 93
B.5.2.3
Get Native Command List
p. 93
B.5.2.4
Get Terminal Profile
p. 94
B.5.2.5
Get Error Code for Last Byte Code Command
p. 94
B.5.2.6
Get Maximum Size for Temporary Storage of Page
p. 94
B.5.2.7
Get USAT Interpreter Issuer URL
p. 94
B.5.2.8
Get USAT Interpreter Issuer URL Hash
p. 94
B.5.2.9
Get User Name
p. 94
B.5.2.10
Get User Email
p. 95
B.5.3
Services for Calling Client Plug-Ins
p. 95
B.6
Access to Special Features
p. 96
B.6.1
Variable Management
p. 96
B.6.1.1
Keep Alive and Protect Variables
p. 96
B.6.2
Terminal Response Handler Modifier
p. 96
B.6.2.1
Replace
p. 97
B.6.2.2
Add
p. 98
B.6.2.3
Restore
p. 98
B.6.2.4
Remove
p. 99
B.7
References
p. 99
C
Terminal Response Handler Modifier examples
p. 100
C.1
Replace Operation
p. 101
C.2
Add/Append Operation
p. 102
C.3
Remove Operation
p. 103
C.4
Restore Operation
p. 104
C.5
Special case: Empty text for user notification
p. 105
C.6
Special case: No text for user notification
p. 106
C.7
Special case: Modify a single exception case
p. 107
D
(Normative) PKI Plug-ins Implementation Specification
p. 108
D.1
P7
p. 108
D.1.1
Plug-in Execution
p. 108
D.1.1.1
User Identification
p. 109
D.1.2
Signature Calculation
p. 113
D.1.2.1
Template Expansion
p. 113
D.1.2.2
Signature Generation Operation
p. 113
D.1.2.3
Output data formatting
p. 114
D.2
FP
p. 115
D.2.1
Plug-in Execution
p. 115
D.2.2
Signature Calculation
p. 116
D.2.2.1
Signature Generation Operation
p. 116
D.2.2.2
Output data formatting
p. 117
D.2.3
Format of WrappedContent
p. 117
D.3
AD
p. 119
D.3.1
Plug-in Execution
p. 119
D.3.2
Decryption calculation
p. 120
D.4
Non-functional Requirements
p. 120
D.4.1
Customisation Requirements
p. 120
D.4.2
Architectural Requirements
p. 120
E
(Normative) PIN Management Plug-ins Implementation Specification
p. 121
E.1
CP
p. 121
E.1.1
Plug-in Execution
p. 121
E.2
RP
p. 122
E.2.1
Plug-in Execution
p. 122
E.2.2
Decryption and Verification
p. 122
E.2.2.1
3DES EDE CBC with two keys + SHA-1 MDC
p. 122
E.2.2.2
3DES EDE CBC with two keys + ISO/IEC 9797 MAC
p. 123
E.2.2.3
3DES EDE CBC with three keys + SHA-1 MDC
p. 124
E.2.2.4
3DES EDE CBC with three keys + ISO/IEC 9797 MAC
p. 124
E.3
Non-functional Requirements
p. 124
E.3.1
Customisation Requirements
p. 124
E.3.2
Architectural Requirements
p. 124
F
(Normative) Triple DES Plug-ins Implementation Specification
p. 126
F.1
DE
p. 126
F.1.1
Plug-in Execution
p. 126
F.1.2
Encrypt Procedure
p. 126
F.2
DD
p. 127
F.2.1
Plug-in Execution
p. 127
F.2.2
Decrypt Procedure
p. 127
F.3
DS
p. 129
F.3.1
Plug-in Execution
p. 129
F.3.2
MAC Calculation Procedure
p. 130
F.4
DU
p. 130
F.4.1
Plug-in Execution
p. 130
F.4.2
Decryption and Verification Procedure
p. 131
F.4.2.1
3DES EDE CBC with two keys + SHA-1 MDC
p. 131
F.4.2.2
3DES EDE CBC with two keys + ISO/IEC 9797 MAC
p. 132
F.4.2.3
3DES EDE CBC with three keys + SHA-1 MDC
p. 132
F.4.2.4
3DES EDE CBC with three keys + ISO/IEC 9797 MAC
p. 132
F.5
Non-functional Requirements
p. 133
F.5.1
Customisation Requirements
p. 133
F.5.2
Architectural Requirements
p. 133
G
Change History
p. 134