Introduction
Summary
Scope
Audience
Normative References
List of References
GlobalPlatform Document Navigation
Terminology and Definitions
Abbreviations and Notations
Conventions
Revisions History
Overview of Changes in Version 1.1.0 over Version 1.0
Overview
GlobalPlatform Initiative
GlobalPlatform Card Customization Requirements
ECMAScript Language Choice
GlobalPlatform Scripts Overview
Script Language
Script Processing
Creating Objects for an Application (excluding Security Domain)
Creating Objects for a Security Domain Application (including Card Manager)
Creating Objects for a Smart Card
Script Object Categories
Overview of GP Scripting Language Native ECMAScript Objects
Deserializing Profile XML Content into Scripting Objects
Deserializing the XML Documents into the Profile Property
Deserialization of Elements with Multiple Occurrances
Deserializing DataElement and Declaration Elements into the Data Property
Impact of the ReadWrite Attribute on Deserialization
Impact of the Encoding Attribute on Deserializiation
Impact of the Tag Attribute on Deserializiation
Impact of the Value, External and Optional Attributes on Deserializiation
Executing Successive Scripts and Data Scoping Between Scripts
Deserializing Key and KeyDeclaration Elements into the Key Property
Executing Successive Scripts and Key Scoping Between Scripts
Deserializing Function Elements into Scripting Language Functions
Creating and Using Secure Channel Objects
Creating Secure Channel Objects
Opening Secure Channels
Using Secure Channels
Global GP Scripting Language Constants
GlobalPlatform Object Error Handling
GlobalPlatform Scripting Objects
GP Scripting Language Native ECMAScript Objects
GPError
Summary
Constants
Properties
className
error
message
name
reason
Methods
Constructor
Crypto
Summary
Constants
Properties
Methods
Constructor()
decrypt()
decryptEncrypt()
deriveKey()
digest()
encrypt()
generateKey()
generateKeyPair()
generateRandom()
sign()
unwrap()
unwrapWrap()
verify()
wrap()
GPSystem
Summary
Constants
Properties
Methods
Constructor
dateTimeByteString()
getSystemID()
getVendorObject()
getVersion()
trace()
wait()
Application
Summary
Constants
Properties
aid
card
crypto
data[]
key[]
lifecycle.name
lifecycle.value
order
profile
secureChannel
Methods
Constructor
openSecureChannel()
select()
sendApdu()
GPApplication
Summary
Constants
Properties
aid
appSpecificInstallParams
card
crypto
data[]
key[]
lifecycle.name
lifecycle.value
nonVolatileDataSpaceLimit
order
privilege
profile
securityDomain
volatileDataSpaceLimit
Methods
Constructor
getData()
getStatus()
putKey()
select()
sendApdu()
setStatus()
storeData()
GPSecurityDomain
Summary
Constants
Properties
aid
appSpecificInstallParams
card
crypto
data[]
key[]
lifecycle.name
lifecycle.value
nonVolatileDataSpaceLimit
order
privilege
profile
secureChannel
securityDomain
volatileDataSpaceLimit
Methods
Constructor
deleteAID()
getData()
getStatus()
installForExtradition()
installForInstall()
installForInstallAndSelectable()
installForLoad()
installForPersonalization()
load()
loadByName()
loadWithProfile()
openSecureChannel()
putKey()
select()
sendApdu()
setStatus()
storeData()
SecureChannel
Summary
Constants
Properties
crypto
state
GPScp01
Summary
Constants
Properties
cardChallenge
cardCryptogram
crypto
diversificationData
hostChallenge
keyIndex
keyVersion
mac
option
securityLevel
state
Methods
Constructor
decryptEncryptKek()
encryptKek()
externalAuthenticate()
getDekKey()
initializeUpdate()
setDekKey()
setEncKey()
setMacKey()
unwrapWrapKek()
GPScp02
Summary
Constants
Properties
cardChallenge
cardCryptogram
crypto
diversificationData
hostChallenge
keyVersion
option
rmac
securityLevel
sequenceCounter
smac
state
Methods
Constructor
beginRMac()
decryptEncryptDek()
encryptDek()
endRMac()
externalAuthenticate()
getDekKey()
initializeUpdate()
setBaseKey()
setDekKey()
setEncKey()
setMacKey()
unwrapWrapDek()
Card
Summary
Constants
Properties
profile
response
SW
SW1
SW2
Methods
Constructor
baudRate()
clock()
powerDown()
pps()
reset()
sendApdu()
vcc()
Key
Summary
Constants
Properties
Methods
Constructor
getAttribute()
getComponent()
getEnd()
getKcv()
getOwner()
getProfileID()
getSize()
getStart()
getType()
getUsage()
getVersion()
getWrapKey()
setAttribute()
setComponent()
setEnd()
setOwner()
setSize()
setStart()
setType()
setUsage()
setVersion()
Atr
Summary
Constants
Properties
formatByte
historicalBytes
interfaceBytes
tckByte
Methods
Constructor
toByteString()
ByteBuffer
Summary
Constants
Properties
length
Methods
Constructor
append()
byteAt()
clear()
copy()
find()
insert()
toByteString()
toString()
ByteString
Summary
Constants
Properties
length
Methods
Constructor
and()
byteAt()
bytes()
concat()
crc()
equals()
find()
getL()
getLV()
left()
neg()
not()
or()
pad()
right()
startsWith()
toBase64()
toBcd()
toHex()
toSigned()
toString()
toUnsigned()
xor()
TLV
Summary
Constants
Properties
encodingMode
size
Methods
Constructor
getL()
getLV()
getTag()
getTLV()
getTV()
getValue()
TLVList
Summary
Constants
Properties
encodingMode
length
Methods
Constructor
append()
appendValue()
appendValueIndex()
deleteByIndex()
deleteByTag()
find()
findIndex()
index()
toByteString()
updateValue()
updateValueIndex()
Sample Scripts
Example Scripts for Data Preparation
Example Open Secure Channel Script
Example Script for Loading Applets
Example Script for Installing Applet
Complete Example with Scripts for Data Preparation and Personalization
TLV Length Coding
Implicit Secure Channel Modification of APDU Commands