Release Notes - Java Card 3.0.4 Specification, Classic Edition

Table of Contents

1. Overview

These release notes describe the specifications for the Java Card 3 Platform, Version 3.0.4, Classic Edition. The Java Card 3 platform consists of versions 3.0, 3.0.1 and 3.0.4 of the specifications and versions 3.0.1, 3.0.2, 3.0.3 and 3.0.4 of the development kit.

The Java Card platform is available in two editions, Classic and Connected. This Version 3.0.4 release of the specifications is for the Classic Edition; the Connected Edition specifications are not included in this release.

This release of the Classic Edition specifications is based on an evolution of Version 3.0.1 of the Classic Edition specifications, and targets more resource-constrained devices that support applet-based applications. This release introduces the applet programmer productivity features and better alignment with other industry standards. Also included are bug fixes and clarifications against the Java Card Classic Edition specifications, Version 3.0.1, and new security algorithms.

CLASSIC EDITION SPECIFICATION DESCRIPTION

Runtime Environment Specification,

Java Card Platform,

Classic Edition, Version 3.0.4

This specification describes the runtime environment (RE) for the Classic Edition of the Java Card Platform. This RE mirrors those REs found in previous releases of the Java Card platform, including v3.0.1 and v2.2.2.

Application Programming Interface,

Java Card Platform,

Classic Edition, Version 3.0.4

This API defines a set of classes upon which Java Card technology-based applets can be constructed. This API mirrors those APIs found in previous releases of the Java Card platform, including v3.0.1 and v2.2.2.

Virtual Machine Specification,

Java Card Platform,

Classic Edition, Version 3.0.4

This specification describes the virtual machine for the Classic Edition of the Java Card Platform. This VM mirrors those VMs found in previous releases of the Java Card platform, including v3.0.1 and v2.2.2.

2. Supported Platforms

The documents are accessible on any computer system with an unzip utility, Adobe Acrobat Reader (version 4.0 or later), and a CSS-compliant web browser.

HTML can be viewed with any CSS-compliant browser software, such as:

  • Netscape Communicator, version 5.0 or later
  • Mozilla, version 1.1 or later

PDF files can be viewed in your web browser with an appropriate plugin or in AdobeĀ® Acrobat Reader. Most recent browsers include the PDF reader plugin. If your browser does not, you can download the plugin from the browser vendor's web site or the Adobe web site at http://get.adobe.com/reader/.

3. Installation Instructions

Download and unzip the specifications bundle. The bundle unzips into the subdirectory jc3_classic_spec\javacard_specifications-3_0_4-RR, within which you will find the subdirectory classic

Within the classic subdirectory you will find the specifications:

  • api_classic - contains the Java Card API specification for the Classic Edition in JavadocTM tool HTML format. These can be viewed in most browsers but do not render well in Mozilla Firefox 3.0.10.
  • jcre_classic - contains the Java Card runtime environment specification for the Classic Edition in PDF format (JCREspecCLASSIC-3_0_4-RR.pdf) and in HTML.
  • jcvm_classic - contains the Java Card virtual machine specification for the Classic Edition in PDF format (JCVMspecCLASSIC-3_0_4-RR.pdf) and in HTML.

4. Changes in the Classic Edition Specifications Since Version 3.0.1

The following sections describe the changes to the Classic Edition specifications for the Java Card platform since the Version 3.01 release.

Application Programming Interface, Version 3.0.4, Classic Edition

This section describes the changes to the Application Programming Interface Specification, Java Card Platform, Version 3.0.4, Classic Edition since the Version 3.0.1 release.

The export files associated with the API packages of the Java Card Platform, Classic Edition, are included in the reference implementation bundle. The export files are subject to change until the final release. The new package version numbers are:

  • javacard.framework - version 1.5
  • javacard.security - version 1.5
    • Note: An abstract method has been added to the javacard.secuirty package in the non-final Signature class. An applet defined subclass of Signature will get the "No implementation provided for method token 8" verifier error during conversion.
  • javacardx.crypto - version 1.5
  • javacardx.string - version 1.0

Summary

Updates to the API specification, Version 3.0.4, since Version 3.0.1 include:

  • Support for defining String constants in byte arrays
    • Added the new classes - javacardx.annotations.StringDef and javacardx.annotations.StringPool. The annotations package is not intended to be loaded on the card. Annotations defined in the package may be used to declare String constants to be preloaded as pre-initialized byte arrays in the applet. The annotation processor tool included in the Java Card 3.0.4 SDK may be used to preprocess the annotations during source file compilations.
  • javacardx.framework.string package
    • This optional new package includes the new class - StringUtil. This class supports some basic Java SE String class like utility methods using byte array representations of Strings.
  • javacard.framework.Applet
  • Added the new method - reSelectingApplet().This method may be used by the applet to determine if it is being deselected and immediately after being selected again on the same logical channel.
  • javacard.framework.JCSystem
  • Added the new method - makeGloabalArray( byte type, short length ). This method creates a global array with data in CLEAR_ON_RESET transient space. The array is suitable for use in passing data from one applet to another applet via the Shareable interface mechanism.
  • Added the new method - getAvailableMemory(short[] buffer, short offset, byte memoryType). This method returns the available memory of the specified type. It is able to return a value up to 2048 Megabytes.
  • javacard.security.KeyBuilder
    • Added the new method - buildKey( byte algorithmicKeyType, byte keyMemoryType, boolean keyEncryption ). This method allows the applet programmer to specify the key type required by specifying the underlying raw key algorithmic type and memory storage requirements separately. It allows more flexibility in mixing and matching the types of key type choices.
    • Added a new ECC key length constant - LENGTH_EC_FP_521
  • javacard.security.MessageDigest
    • Added the length constant for for SHA-224 hash - LENGTH_SHA_224
  • javacard.security.Signature
    • Added the new method - getInstance(byte messageDigestAlgorithm,byte cipherAlgorithm,byte paddingAlgorithm,boolean externalAccess). This method allows the applet programmer to specify the signature algorithm required by specifying the underlying message digest algorithm, the underlying cipher algorithm and the underlying padding algorithm. It allows more flexibility in mixing and matching the types of signature algorithms choices.
    • Added the new method - signPreComputedHash(byte[] hashBuf,short hashOff,short hashLength,byte[] sigBuff, short sigOffset). This method suports high performance signing operations. The hash of the message may be computed offcard before employing this method on card to securely sign the pre-computed hash.
    • Added the new method - setInitialDigest(byte[] initialDigestBuf,short initialDigestOffset,short initialDigestLength,byte[] digestedMsgLenBuf, short digestedMsgLenOffset, short digestedMsgLenLength). This method suports high performance signing operations. The hash of the partial message may be computed offcard before employing this method on card to securely initialize the Signature operation with that hash value.
    • Added the new algorithm types - ALG_DES_MAC4_ISO9797_1_M1_ALG3 and ALG_DES_MAC8_ISO9797_1_M1_ALG3.
  • javacardx.crypto.Cipher
    • Added the new method - getInstance( byte cipherAlgorithm, byte paddingAlgorithm, boolean externalAccess ). This method allows the applet programmer to specify the cipher algorithm required by specifying the underlying cipher algorithm and the underlying padding algorithm. It allows more flexibility in mixing and matching the types of cipher algorithms choices.
    • Reformatting and bug fixes

Runtime Environment Specification, Version 3.0.4, Classic Edition

This section describes the changes to the Runtime Environment Specification, Java Card Platform, Version 3.0.4, Classic Edition since the Version 3.0.1 release. Change bars indicate changes since the Version 3.0.1 release.

Summary

Updates to the Runtime Environment specification, Version 3.0.4, since Version 3.0.1 include:

  • Reformatting and bug fixes

Virtual Machine Specification, Version 3.0.4, Classic Edition

The changes to the Virtual Machine Specification, Java Card Platform, Version 3.0.4, Classic Edition since the Version 3.0.1 release include:

  • Reformatting and bug fixes

5. Bugs Fixed in Version 3.0.4

This section describes the bugs that have been fixed in this release of the Java Card specifications, Classic Edition, Version 3.0.4.

BUG ID DESCRIPTION
12270739

[SC] ? Which SW code JCRE send back in normal return while applet initiated transaction in progress

12270923 [SC] How must getAppletShareableInsterfaceObject(AID,) behave when a passed AID reference is null
12276097 Missing the description of saying RMI features is an optional one in JCRE3.0.1 spec
12276737 AES algorithms in spec allow non-standard block size
12277324 [SC]? Mismatched keylength btw RSAPrivateKey.setModulus()/HMACKey.setKey() and KeyBuilder.buildKey()
12279370 [SC] Behavior when no candidate applet to be selected for received indirect applet selection cmd?
12281185 response status when classic transaction is aborted by CJCRE from install method should be clarified
12283186 [SC] ? Return value of javacard.framework.APDU.getInBlockSize() in the cases T=CL and SWP
12289331 [RFE] Add some description for ALG_DES_MAC4_ISO9797_1_M2
12290930 [RFE] Incompatible case in rejecting of removing applet instance between JCRE222 spec and GP22 spec
12296013 Incorrect version for JCSystem.getVersion()
12297221 LENGTH_* and ALG_SHA_224 Constants in MessageDigest
12299386 Algorithm identifiers in signature
12304113 Add new crypto algorithm - ALG_DES_MAC8_ISO9797_1_M1_ALG3
12304746 APDU.getInBlockSize() APDU.getOutBlockSize() in the cases T=CL
12305324 [RFE] Description on sample program part for APDU.receiveBytes in JCAPI is not clear
12308329 [SC] ? On which condition JCSystem.isAppletActive() shall return true
12308403 [SC] ? Ownership of array objects created in the <clinit> method
12310287 SHDLC RSET signal should not reset card
12310288 Allow Install() if another applet from the same package is active
12228509 [RFE] Provide ECDSA Signature feature without hashing

6. Product Information

The public Java Card technology web site is http://www.oracle.com/java/technologies/java-card-tech.html.

This site has the most up-to-date information on the following:

  • Product news and reviews
  • Release notes and product documentation
  • Technical support contact information

We greatly appreciate your feedback on these specifications.