org.globalplatform
Interface GlobalService


public interface GlobalService

This interface may be used by an applet for requesting a Global Service Application to provide its actual service interface. The Global Service Application uses this interface to check the validity of the request presented by an on-card entity. Prior to using this interface, an Application is required to obtain a handle to the Global Services Application by invoking the GPSystem.getService() method.


Field Summary
static byte KEY_ACCESS_ANY
          Key Access indicating key may be used by the Security Domain and any associated application (0x00).
static byte KEY_ACCESS_APPLICATION
          Key Access indicating key may be used by any associated application but not by the Security Domain (0x02).
static byte KEY_ACCESS_SECURITY_DOMAIN
          Key Access indicating key may be used by the Security Domain but not by any associated application (0x01).
static byte KEY_TYPE_3DES
          Key type indicating Triple DES reserved for specific implementations (0x81).
static byte KEY_TYPE_3DES_CBC
          Key type indicating Triple DES in CBC mode (0x82).
static byte KEY_TYPE_AES
          Key type indicating AES (0x88).
static byte KEY_TYPE_DES
          Key type indicating DES with ECB/CBC implicitly known (0x80).
static byte KEY_TYPE_DES_CBC
          Key type indicating DES in CBC mode (0x84).
static byte KEY_TYPE_DES_ECB
          Key type indicating DES in ECB mode (0x83).
static byte KEY_TYPE_EXTENDED
          Key type indicating extended key format (0xFF).
static byte KEY_TYPE_HMAC_SHA1
          Key type indicating HMAC SHA1, length of HMAC implicitly known (0x90).
static byte KEY_TYPE_HMAC_SHA1_160
          Key type indicating HMAC SHA1, length of HMAC is 160 bits (0x91).
static byte KEY_TYPE_RSA_PRIVATE_CRT_DP1
          Key type indicating RSA Private Key Chinese Remainder dp1 component (0xA7).
static byte KEY_TYPE_RSA_PRIVATE_CRT_DQ1
          Key type indicating RSA Private Key Chinese Remainder dq1 component (0xA8).
static byte KEY_TYPE_RSA_PRIVATE_CRT_P
          Key type indicating RSA Private Key Chinese Remainder p component (0xA4).
static byte KEY_TYPE_RSA_PRIVATE_CRT_PQ
          Key type indicating RSA Private Key Chinese Remainder pq component (0xA6).
static byte KEY_TYPE_RSA_PRIVATE_CRT_Q
          Key type indicating RSA Private Key Chinese Remainder q component (0xA5).
static byte KEY_TYPE_RSA_PRIVATE_EXPONENT
          Key type indicating RSA Private exponent (0xA3).
static byte KEY_TYPE_RSA_PRIVATE_MODULUS
          Key type indicating RSA Private Key modulus (0xA2).
static byte KEY_TYPE_RSA_PUBLIC_EXPONENT
          Key type indicating RSA Public Key exponent (0xA0).
static byte KEY_TYPE_RSA_PUBLIC_MODULUS
          Key type indicating RSA Public Key modulus (0xA1).
static byte KEY_USAGE_COMPUTATION_DECIPHERMENT
          Key usage indicating computation and decipherment (0x40).
static byte KEY_USAGE_CONFIDENTIALITY
          Key usage indicating sensitive data confidentiality (0x08).
static byte KEY_USAGE_CRYPTOGRAPHIC_AUTHORIZATION
          Key usage indicating cryptographic authorization (0x01).
static byte KEY_USAGE_CRYPTOGRAPHIC_CHECKSUM
          Key usage indicating cryptographic checksum e.g.
static byte KEY_USAGE_DIGITAL_SIGNATURE
          Key usage indicating Digital Signature (0x02).
static byte KEY_USAGE_SM_COMMAND
          Key usage indicating Secure Messaging in command data field (0x10).
static byte KEY_USAGE_SM_RESPONSE
          Key usage indicating Secure Messaging in response data field (0x20).
static byte KEY_USAGE_VERIFICATION_ENCIPHERMENT
          Key usage indicating verification and encipherment (0x80).
 
Method Summary
 Shareable getServiceInterface(GPRegistryEntry clientRegistryEntry, short sServiceName, byte[] baBuffer, short sOffset, short sLength)
          This method returns a handle to the requested service interface of a Global Services Application.
 

Field Detail

KEY_ACCESS_ANY

public static final byte KEY_ACCESS_ANY
Key Access indicating key may be used by the Security Domain and any associated application (0x00).

See Also:
Constant Field Values

KEY_ACCESS_SECURITY_DOMAIN

public static final byte KEY_ACCESS_SECURITY_DOMAIN
Key Access indicating key may be used by the Security Domain but not by any associated application (0x01).

See Also:
Constant Field Values

KEY_ACCESS_APPLICATION

public static final byte KEY_ACCESS_APPLICATION
Key Access indicating key may be used by any associated application but not by the Security Domain (0x02).

See Also:
Constant Field Values

KEY_TYPE_AES

public static final byte KEY_TYPE_AES
Key type indicating AES (0x88).

See Also:
Constant Field Values

KEY_TYPE_3DES

public static final byte KEY_TYPE_3DES
Key type indicating Triple DES reserved for specific implementations (0x81).

See Also:
Constant Field Values

KEY_TYPE_3DES_CBC

public static final byte KEY_TYPE_3DES_CBC
Key type indicating Triple DES in CBC mode (0x82).

See Also:
Constant Field Values

KEY_TYPE_DES

public static final byte KEY_TYPE_DES
Key type indicating DES with ECB/CBC implicitly known (0x80).

See Also:
Constant Field Values

KEY_TYPE_DES_CBC

public static final byte KEY_TYPE_DES_CBC
Key type indicating DES in CBC mode (0x84).

See Also:
Constant Field Values

KEY_TYPE_DES_ECB

public static final byte KEY_TYPE_DES_ECB
Key type indicating DES in ECB mode (0x83).

See Also:
Constant Field Values

KEY_TYPE_EXTENDED

public static final byte KEY_TYPE_EXTENDED
Key type indicating extended key format (0xFF).

See Also:
Constant Field Values

KEY_TYPE_HMAC_SHA1

public static final byte KEY_TYPE_HMAC_SHA1
Key type indicating HMAC SHA1, length of HMAC implicitly known (0x90).

See Also:
Constant Field Values

KEY_TYPE_HMAC_SHA1_160

public static final byte KEY_TYPE_HMAC_SHA1_160
Key type indicating HMAC SHA1, length of HMAC is 160 bits (0x91).

See Also:
Constant Field Values

KEY_TYPE_RSA_PRIVATE_CRT_P

public static final byte KEY_TYPE_RSA_PRIVATE_CRT_P
Key type indicating RSA Private Key Chinese Remainder p component (0xA4).

See Also:
Constant Field Values

KEY_TYPE_RSA_PRIVATE_CRT_Q

public static final byte KEY_TYPE_RSA_PRIVATE_CRT_Q
Key type indicating RSA Private Key Chinese Remainder q component (0xA5).

See Also:
Constant Field Values

KEY_TYPE_RSA_PRIVATE_CRT_PQ

public static final byte KEY_TYPE_RSA_PRIVATE_CRT_PQ
Key type indicating RSA Private Key Chinese Remainder pq component (0xA6).

See Also:
Constant Field Values

KEY_TYPE_RSA_PRIVATE_CRT_DP1

public static final byte KEY_TYPE_RSA_PRIVATE_CRT_DP1
Key type indicating RSA Private Key Chinese Remainder dp1 component (0xA7).

See Also:
Constant Field Values

KEY_TYPE_RSA_PRIVATE_CRT_DQ1

public static final byte KEY_TYPE_RSA_PRIVATE_CRT_DQ1
Key type indicating RSA Private Key Chinese Remainder dq1 component (0xA8).

See Also:
Constant Field Values

KEY_TYPE_RSA_PRIVATE_EXPONENT

public static final byte KEY_TYPE_RSA_PRIVATE_EXPONENT
Key type indicating RSA Private exponent (0xA3).

See Also:
Constant Field Values

KEY_TYPE_RSA_PRIVATE_MODULUS

public static final byte KEY_TYPE_RSA_PRIVATE_MODULUS
Key type indicating RSA Private Key modulus (0xA2).

See Also:
Constant Field Values

KEY_TYPE_RSA_PUBLIC_EXPONENT

public static final byte KEY_TYPE_RSA_PUBLIC_EXPONENT
Key type indicating RSA Public Key exponent (0xA0).

See Also:
Constant Field Values

KEY_TYPE_RSA_PUBLIC_MODULUS

public static final byte KEY_TYPE_RSA_PUBLIC_MODULUS
Key type indicating RSA Public Key modulus (0xA1).

See Also:
Constant Field Values

KEY_USAGE_COMPUTATION_DECIPHERMENT

public static final byte KEY_USAGE_COMPUTATION_DECIPHERMENT
Key usage indicating computation and decipherment (0x40).

See Also:
Constant Field Values

KEY_USAGE_CONFIDENTIALITY

public static final byte KEY_USAGE_CONFIDENTIALITY
Key usage indicating sensitive data confidentiality (0x08).

See Also:
Constant Field Values

KEY_USAGE_CRYPTOGRAPHIC_AUTHORIZATION

public static final byte KEY_USAGE_CRYPTOGRAPHIC_AUTHORIZATION
Key usage indicating cryptographic authorization (0x01).

See Also:
Constant Field Values

KEY_USAGE_CRYPTOGRAPHIC_CHECKSUM

public static final byte KEY_USAGE_CRYPTOGRAPHIC_CHECKSUM
Key usage indicating cryptographic checksum e.g. MAC (0x04).

See Also:
Constant Field Values

KEY_USAGE_DIGITAL_SIGNATURE

public static final byte KEY_USAGE_DIGITAL_SIGNATURE
Key usage indicating Digital Signature (0x02).

See Also:
Constant Field Values

KEY_USAGE_SM_COMMAND

public static final byte KEY_USAGE_SM_COMMAND
Key usage indicating Secure Messaging in command data field (0x10).

See Also:
Constant Field Values

KEY_USAGE_SM_RESPONSE

public static final byte KEY_USAGE_SM_RESPONSE
Key usage indicating Secure Messaging in response data field (0x20).

See Also:
Constant Field Values

KEY_USAGE_VERIFICATION_ENCIPHERMENT

public static final byte KEY_USAGE_VERIFICATION_ENCIPHERMENT
Key usage indicating verification and encipherment (0x80).

See Also:
Constant Field Values
Method Detail

getServiceInterface

public Shareable getServiceInterface(GPRegistryEntry clientRegistryEntry,
                                     short sServiceName,
                                     byte[] baBuffer,
                                     short sOffset,
                                     short sLength)
                              throws ISOException
This method returns a handle to the requested service interface of a Global Services Application.

Notes: The Global Services Application verifies the validity of the request according to its own security policies for this sServiceName and based on the identity of the requesting on-card entity and its characteristics as registered in the clientRegistryEntry; On a valid service request, the Global Service Application returns the reference of the Shareable Interface Object implementing the actual service: this Shareable Interface Object may either be this Global Service interface or another Java Card shareable interface; Depending on its own security policy, the Global Service Application may reject an invalid service request by either throwing an exception or just returning Null.

Returns:
the specific service interface reference or null.
Throws:
ISOException - with the following reason codes: ISO7816.SW_CONDITIONS_NOT_SATISFIED ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED