Package Summary

The Security and Trust Services API for J2ME defines four optional packages to support smart card communication, generation of digital signatures, and low-level cryptography operations.

## Generic Connection Framework

The smart card communication API is based on the Generic Connection Framework in the `javax.microedition.io` package. Two smart card connection interfaces are defined for establishing a connection with a smart card. The `APDUConnection` interface is used to communicate with ISO7816-4 compliant smart cards. The `JavaCardRMIConnection` interface is used to initiate a JCRMI session. These connections are defined in the `javax.microedition.apdu` and `javax.microedition.jcrmi` packages respectively.

## SATSA-APDU Optional Package

The optional package SATSA-APDU includes two components to support communication with ISO7816-4 compliant smart cards using the APDU protocol.

- A subset of the `java.lang` package. It supports the exception class `UnsupportedOperationException`, which is not included in the CLDC API or the MIDP API.
- The `javax.microedition.apdu` package. It includes the interface `APDUConnection` to support APDU exchanges.

## SATSA-JCRMI Optional Package

The optional package SASTA-JCRMI includes four components to provide a Java Card RMI client API:

- A subset of the `java.lang` package. It supports the exception class `UnsupportedOperationException`, which is not included in the CLDC API or the MIDP API.
- A subset of the `java.rmi` package in the Java 2 Platform, Standard Edition to provide the basic RMI client interfaces. The subset includes the `Remote` interface and the `RemoteException` class.
- The `javax.microedition.jcrmi` package. It includes the `JavaCardRMIConnection` interface used to initiate a JCRMI session and interfaces used by the stubs generated by the jcrmi stub compiler.
- A subset of the Java Card API. The subset includes the Exception classes defined in the packages `javacard.framework`, `javacard.framework.service`, and `javacard.security` . These exceptions may be thrown during a method invocation of a Java Card object because of cryptographic errors (the `javacard.security` package), card framework access errors (the `javacard.framework` package) or errors detected in accessing the card services (the `javacard.framework.service` package). Therefore, the Java Card exception classes are included to provide the same behavior when the method is invoked remotely.

## SATSA-PKI Optional Package

The optional package SATSA-PKI includes two components to provide generation of digital signatures and basic user credential management (for example, an X.509 certificate is a user credential that includes a public key).

- The `javax.microedition.pki` package. It supports generation of certificate requests and local registration of the user credentials. The user credentials are used in conjunction with other parameters to compute formatted digital signatures. When deployed on the MIDP platform, this package also includes the classes `Certificate` and `CertificateException`, which are defined in the MIDP API.
- The `javax.microedition.securityservice` package. It supports generation of application-level digital signatures that conform to Cryptographic Message Syntax (CMS) format.

## SATSA-CRYPTO Optional Package

The optional package SATSA-CRYPTO is a subset of the Java 2 platform, Standard Edition (J2SE) Cryptography API. When this optional package is implemented on a CDC/FP based platform that already supports some of the classes in this optional package, the whole API is the union of the API in the CDC/FP and the API in the SATSA-CRYPTO optional package.

- The `java.security` and `java.security.spec` packages. They provide the basic support for accessing public keys, computing digests, and verifying digital signatures.
- The `javax.crypto` and `javax.crypto.spec` packages. They provide the basic support for encryption and decryption of data.
- A subset of the j`ava.lang` package. It includes the exception class `IllegalStateException`, which is not included in the CLDC API or the MIDP API.