Java Card technology combines a portion of the Java programming language with a runtime environment optimized for smart cards and related, small-memory embedded devices. The goal of Java Card technology is to bring many of the benefits of the Java programming language to the resource-constrained world of smart cards and secure elements.
The Classic Edition of the Java Card platform is defined by three specifications:
This document describes the list of changes introduced in the Version 3.2 of the specifications.
This document is intended both for Oracle Java Card licensees who are implementing the Java Card Platform and for application developers who want an understanding of the changes introduced in this release of the Java Card specifications.
Before reading this guide, you should be familiar with the Java programming language, the Java Card technology specifications, and smart card technology. A good resource for becoming familiar with Java technology and Java Card technology located at:
https://www.oracle.com/technetwork/java/embedded/javacard/overview/.
The following text conventions are used in this document:
| Typeface1 | Meaning | Examples |
|---|---|---|
| The names of commands, files, and directories; onscreen computer output. | Edit your Use
|
AaBbCc123 | What you type, when contrasted with on-screen computer output. | %su Password: |
AaBbCc123 | Book titles, new words or terms, words to be emphasized. Replace command-line variables with real names or values. | Read Chapter 6 in theUser's Guide. These are calledclass options. Youmust be superuser to do this. To delete a file, type |
1 The settings on your browser might differ from these settings.
A list of related documents that may help in understanding this document are:
[JCAPI] - Application Programming Interface Specification, Version 3.2, Classic Edition
[JCVM] -Virtual Machine Specification, Version 3.2, Classic Edition
[JCRE] -Runtime Environment Specification, Version 3.2, Classic Edition
[JLS]The Java Language Specification Third Edition by James Gosling, Bill Joy, and Guy L. Steele (Addison-Wesley, 2005)
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website athttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visithttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visithttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Oracle Welcomes Your Comments
Oracle is interested in improving its documentation and welcomes your comments and suggestions.
Please include the title of your document with your feedback:
Java Card Platform, v3.2, Classic Edition
This release notes describes the list of changes introduced in the Version 3.2 of the Java Card specifications.
This document is intended for both the Oracle Java Card licensees who are implementing the Java Card Platform and for the application developers who want to understand the changes introduced in this release.
This section lists the important changes and features in Java Card Platform Specifications, Version 3.2.
The following table outlines the new features in the Java Card Runtime Environment, Version 3.2.
Table - New Features in Java Card Virtual Machine Specifications
| Feature | Description |
|---|---|
| Logical Channel Configuration | A Java Card implementation must support one of the following configurations:
|
The following table outlines the new features in the Java Card Application Programming Interface (API) specification version 3.2.
Table - New Features in Java Card API Specification
| New Feature | Description |
|---|---|
| Logical channel encoding | Add an API to retrieve the supported logical channel encoding type used by the JCRE . |
| TLS1.3 and DTLS1.3 key schedule | Add key derivation algorithm and intermediate message digest mechanisms to perform TLS1.3 and DTLS1.3 key schedule operations. |
| Additional ISO9796 digital signature with message recovery paddings | Support the trailer field option 2 for all schemes defined in the ISO9796 digital signature with message recovery specification. |
| Extend support to EdDSA digital signature algorithm | Add capability to create a signature instance for predefined edwards25519 and edwards448 curves. |
| Extend support to SM2 key agreement with confirmation values | Add support to SM2 key exchange with and without confirmation values. |
| Configure RSA-OAEP cipher scheme | Add the configuration of the message digest algorithm of the Mask Generation function (MGF1) of the RSA OAEP cipher scheme. |
| Configure RSA-PSS digital signature scheme | Add the configuration of the message digest algorithm of the Mask Generation function (MGF1) of the RSA PSS digital signature scheme. |
| Retrieve available memory value as a byte array | Add an API to retrieve the memory available for a given type as a convenient byte array parameter |
| Instantiate random generator with external access | Add an API to instantiate a random generator instance that can be used even if the current context is not the context of the currently selected Applet. |
| Clear a biometric template | Add an API to clear a biometric template. |
This topic provides comprehensive information about each change made in the specifications for this release.
The list below gives more details about the changes made in this release. They provide information on the following elements:
Support for logical channel encoding.
javacard.framework.APDU classThe Java Card Runtime Environment must support one of the following configurations:
The Java card API provide means to retrieve the supported logical channel encoding of the platform:
| New Constant referring to CLA encoding without logical channel information | javacard.framework.APDU.LC_ENCODING_NO |
| New Constant referring a CLA encoding with Type 4 logical channel information | javacard.framework.APDU.LC_ENCODING_TYPE_4 |
| New Constant referring to CLA encoding with Type 4 and Type 16 logical channel information | javacard.framework.APDU.LC_ENCODING_TYPE_4_TYPE_16 |
| New method to retrieve the logical channel encoding type used by the JCRE to interpret the CLA byte of the current APDU | javacard.framework.APDU.getLogicalChannelEncoding() |
Support for the TLS1.3 and DTLS1.3 interfaces.
javacardx.security.derivation andjavacard.security.MessageDigest ClassThe new classes, interfaces, methods or constants for this feature must be available in any Java Card 3.2 compliant implementation, but the corresponding algorithm implementation is optional and may throw an exception with the following reason codeCryptoException.NO_SUCH_ALGORITHM.
| New method to determine if intermediate hash calculation is supported | javacard.security.MessageDigest.isIntermediateMessageDigestSupported() |
| New method to generate an intermediate hash calculation | javacard.security.MessageDigest.doIntermediateMessageDigest() javacard.security.MessageDigest.OneShot.doIntermediateMessageDigest() |
| New constant for HKDF-Expand-Label algorithm | javacardx.derivation.DerivationFunction.ALG_HKDF_EXPAND_LABEL_TLS13 |
| New interface for HKDF-Expand-Label algorithm | javacardx.security.derivation.TLSKDFExpandLabelSpec |
Support for ISO9796 signature with message recovery.
javacardx.crypto.Cipher class and javacard.security.Signature classCryptoException.NO_SUCH_ALGORITHM.| New constant for ISO9796 scheme 1 trailer field option 2 | javacardx.crypto.Cipher.PAD_ISO9796_MR_SCHEME_1_OPTION_2 |
| New constant for ISO9796 scheme 2 trailer field option 2 | javacardx.crypto.Cipher.PAD_ISO9796_MR_SCHEME_2_OPTION_2 |
| New constant for ISO9796 scheme 3 trailer field option 2 | javacardx.crypto.Cipher.PAD_ISO9796_MR_SCHEME_3_OPTION_2 |
Support for EdDSA digital signature algorithm.
javacard.security.SignatureThe API for pure and pre-hash EdDSA signatures is extended to bind a signature instance to edwards25519 or edwards448 curves prior knowing the related key type.
The new classes, interfaces, methods or constants for this feature must be available in any Java Card 3.2 compliant implementation, but the corresponding algorithm implementation is optional and may throw an exception with the following reason codeCryptoException.NO_SUCH_ALGORITHM.
| New constant for pure EdDSA for the variant Ed25519 | javacard.security.Signature.SIG_CIPHER_EDDSA_ED25519 |
| New constant for pure EdDSA for the variant Ed448 | javacard.security.Signature.SIG_CIPHER_EDDSA_ED448 |
| New constant for pre-hash EdDSA for the variant Ed25519ph | javacard.security.Signature.SIG_CIPHER_EDDSAPH_ED25519 |
| New constant for pre-hash EdDSA for the variant Ed448ph | javacard.security.Signature.SIG_CIPHER_EDDSAPH_ED448 |
Support for SM2 key agreements with confirmation value.
javacardx.security andjavacard.security.KeyAgreementThe existing API for SM2 is extended to support the SM2 key agreement protocol with and without confirmation values and for both the initiator and the receiver roles.
The new classes, interfaces, methods or constants for this feature must be available in any Java Card 3.2 compliant implementation, but the corresponding algorithm implementation is optional and may throw an exception with the following reason codeCryptoException.NO_SUCH_ALGORITHM.
| New constant to perform an SM2 key agreement operation using confirmation values in and/or out | javacard.security.KeyAgreement.ALG_SM2_WITH_CONFIRMATION |
| New interface to configure the role and the parameters involved during an SM2 key agreement operation | javacard.security.SM2KeyAgreementParameterSpec |
| New method to initialize a key agreement instance based on algorithm parameters such as for SM2 | javacard.security.KeyAgreement.init() |
Configuration of RSA-OAEP cipher scheme.
The RSA-OAEP cipher scheme refers to a message digest algorithm for both the OAEP scheme itself and its underlying mask generation function (MGF1). The API is extended to configure independently the message digest algorithm of the scheme and the message digest algorithm of the MGF1.
The new classes, interfaces, methods or constants for this feature must be available in any Java Card 3.2 compliant implementation, but the corresponding algorithm implementation is optional and may throw an exception with the following reason codeCryptoException.NO_SUCH_ALGORITHM.
The following table lists the method and interfaces added to configure parameters.
| New constant allowing to configure OAEP parameters within Cipher.init() | javacardx.crypto.PAD_PKCS1_OAEP_EXT_PARAMETERS |
Configuration for RSA-PSS digital signature scheme
javacard.security.Signature andjavacardx.crypto.CipherThe RSA-PSS digital signature scheme refers to a message digest algorithm for both the PSS scheme itself and its underlying mask generation function (MGF1). The API is extended to configure independently the message digest algorithm of the scheme and the message digest algorithm of the MGF1 as well as the salt length.
The new classes, interfaces, methods or constants for this feature must be available in any Java Card 3.2 compliant implementation, but the corresponding algorithm implementation is optional and may throw an exception with the following reason codeCryptoException.NO_SUCH_ALGORITHM.
| New constant allowing to configure PSS parameters within Signature.init() | javacardx.crypto.PAD_PKCS1_PSS_EXT_PARAMETERS |
Retrieve available memory as byte array.
javacard.framework.JCSystemTwo methods already exist to retrieve the memory available for a given type either as a short or in a short[]. The API is extended to also retrieve the value as a byte[].
| New method to retrieve memory available as a byte array | javacard.framework.JCSystem.getAvailableMemory() |
Support for instantiating random generator with external access.
javacard.security.RandomData classAs for any other cryptographic objects, the random generator API is extended to request explicitly a RandomData instance with external access. Such an instance can be shared among multiple applet instances and/or can also be accessed (via a Shareable interface) when the owner of the RandomData instance is not the currently selected applet.
The previous method RandomData.getInstance() is deprecated.
The new classes, interfaces, methods, and constants for this feature must be available in any Java Card 3.2 compliant implementation, but the corresponding algorithm implementation is optional and may throw an exception with the following reason codeCryptoExcpetion.NO_SUCH_ALGORITHM reason code.
| New method to instantiate a RandomData object with external access | javacard.security.RandomData.getInstance() |
Support for clearing a biometric template.
The interfaces referring to a biometric template owned by an applet are extended to offer the possibility to clear the biometric template. Doing so, its state becomes uninitialized.
| New method to clear a biometric template in owned by an applet | javacardx.biometry.OwnerBioTemplate.clear() |
| New method to clear a biometric template owned by an applet (1:N biometric framework) | javacardx.biometry1toN.OwnerBioTemplateData.clear() |
Additional information on clarifications and fixes.
This release contains the following clarifications and fixes:
3.1 Java Card Platform Virtual Machine Specification, Classic Edition, Version 3.2
3.1.1 6.16 Static Resource Component
static_resource replaced bystatic_resource_info3.2 Java Card API Specification, Classic Edition, Version 3.2
3.2.1 javacard.framework.MultiSelectable interface
3.2.2 javacard.framework.APDU class
3.2.3 javacard.framework.Applet class
3.2.4 javacard.framework.JCSystem class
3.2.5 javacard.framework.Resources class
3.2.6 javacard.security.ECKey interface
3.2.7 javacard.security.GenericSecretKey interface
3.2.8 javacard.security.HMACKey interface
3.2.9 javacard.security.Key interface
3.2.10 Javacard.security.SignatureMessageRecovery interface
3.2.11 javacard.security.InitializedMessageDigest class
3.2.12 javacard.security.InitializedMessageDigest.OneShot class
3.2.13 javacard.security.KeyAgreement class
3.2.14 javacard.security.KeyPair class
3.2.15 javacard.security.RandomData class
3.2.16 javacard.security.Signature class
3.2.17 javacard.security.Signature.OneShot class
3.2.18 javacardx.apdu.util.APDUUTIL class
3.2.19 javacardx.biometry.OwnerBioTemplate interface
3.2.20 javacardx.biometry1toN.BioMatcher interface
3.2.21 javacardx.biometry1toN.OwnerBioMatcher interface
3.2.22 javacardx.crypto.AEADCipher class
3.2.23 javacardx.crypto.Cipher class
3.2.24 javacardx.security.derivation.DerivationFunction class
The Java Card specification 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.
View the HTML files using any of the following CSS-compliant browsers:
View the PDF files in your web browser with an appropriate plugin or in the Adobe® Acrobat Reader. Most recent browsers include the PDF reader plugin. However, if your browser doesn’t have one, then download the plugin from theInstall Adobe Acrobat Reader website.
Perform the following steps to download the specifications:
javacard_specifications-3_2/classic folder.classic directory has the following sub folders:api_classic: Contains the Java Card API specification for the Classic Edition, Version 3.2 in the JavadocTM tool HTML format. Use the available browsers to view the APIs. However, the APIs might not render well in Mozilla Firefox, version 3.0.10.jcre_classic: Contains the Java Card Runtime Environment specification for the Classic Edition, Version 3.2 in the PDF format (JCREspecCLASSIC-3_2.pdf).jcvm_classic: Contains the Java Card Virtual Machine specification for the Classic Edition, version 3.2 in the PDF format (JCVMspecCLASSIC_3_2.pdf).The Java Card Technology website provides useful information about the Java Card product.
Visit theJava Card Technology website to access the most up-to-date information on the following:
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website athttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visithttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visithttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Java Card Platform Specification Release Notes, Version 3.2
F74152-01
January 2023
Copyright © 1998, 2023, Oracle and/or its affiliates.