This release provides an implementation of basic security and cryptography classes. These implementations are supported by:
The support for security and cryptography allows you to:
SHA1
algorithmECC
and RSA
algorithmsAES
, DES
, 3DES
, ECC
, and RSA
algorithmsAES
, DES
, 3DES
, and RSA
algorithmsAES
, DES
, 3DES
, ECC
, or SHA
and RSA
algorithms
For more information on the SHA1
, DES
, 3DES
, and RSA
encryption schemes, see:
SHA1
—”Secure Hash Standard”, FIPS Publication 180-1: DES
—”Data Encryption Standard (DES)”, FIPS Publication 46-2 and “DES Modes of Operation”, FIPS Publication 81: RSA
—“RSAES-OAEP (Optional Asymmetric Encryption Padding) Encryption Scheme”: AES
—”Advanced Encryption Standard (AES)” FIPs Publication 197:ECC
—”Public Key Cryptography for the Financial Industry: The Elliptic Curve Digital Signature
Algorithm” (ECDSA): X9.62-1998 The implementation of security and cryptography in version 2.2.1 of the Java Card reference implementation supports the use of the following classes:
javacardx.crypto.Cipher
javacard.security.Checksum
javacard.security.KeyAgreement
javacard.security.KeyPair
javacard.security.KeyBuilder
javacard.security.MessageDigest
javacard.security.RandomData
javacard.security.Signature
TABLE 37 lists the cryptography algorithms that are implemented for CREF and Java Card WDE:
Implementations of the cryptography classes extend the corresponding base class with implementations of their abstract methods. All data allocation associated with the implementation instance is performed when the instance is constructed. This is done to ensure that any lack of required resources can be flagged when the applet is installed.
Each cryptography class, except KeyPair
, has a getInstance
method which takes the desired algorithm as one of its parameters. The method returns an instance of the class in the context of the calling applet. Instead of using a getInstance
method, KeyPair
takes the desired algorithm as a parameter in its constructor.
If you request an algorithm that is not listed in TABLE 37 or that is not implemented in this release, getInstance
will throw a CryptoException
with reason code NO_SUCH_ALGORITHM
.
The implementation of the RSA and EC cryptography algorithms in CREF optimizes RAM usage. To do this, CREF dynamically allocates temporary memory areas in RAM. These temporary RAM areas are allocated for the duration of a native method call.
These memory areas are used as temporary RAM in the following order:
Note that the amount of RAM available in the RTR and non-current DTR can be influenced by applets other than the one currently selected. This means that the current applet which uses the RTR and non-current DTR might fail if more applets are installed on the card.
When execution completes, CREF prints maximum memory usage in each of these areas to help you track the memory requirements of the cryptography algorithms in your own Java Card VM implementations.
Development Kit User's Guide
for the Binary Release with Cryptography Extensions Java Card Platform, Version 2.2.1 |
Copyright © 2003 Sun Microsystems, Inc. All rights reserved.