Package javacard.security
package javacard.security
Provides classes and interfaces that contain publicly-available functionality
for implementing a security and cryptography framework on the Java Card
platform. Classes
which contain security and cryptography functionality which may be subject to
export controls are contained in the optional package
javacardx.crypto.
Classes in the javacard.security package provide the definitions of
algorithms that perform these security and cryptography functions:
- Implementations for a variety of different cryptographic keys
- Factory for building keys (see
KeyBuilder) - Data hashing (see
MessageDigest) - Random data generation (see
RandomData) - Signing using cryptographic keys (see
Signature) - Session key exchanges (see
KeyAgreement)
-
ClassDescription
AESKeycontains a 16/24/32 byte key for AES computations based on the Rijndael algorithm.A (transparent) specification of cryptographic parameters.TheChecksumclass is the base class for CRC (cyclic redundancy check) checksum algorithms.CryptoExceptionrepresents a cryptography-related exception.DESKeycontains an 8/16/24-byte key for single/2 key triple DES/3 key triple DES operations.TheDHKeyinterface is the base interface for the DH algorithm's private and public key implementations.TheDHPrivateKeyinterface is used to sign data using the DH algorithm.TheDHPublicKeyinterface is used to verify signatures on signed data using the DH algorithm.TheDSAKeyinterface is the base interface for the DSA algorithm's private and public key implementations.TheDSAPrivateKeyinterface is used to sign data using the DSA algorithm.TheDSAPublicKeyinterface is used to verify signatures on signed data using the DSA algorithm.TheECKeyinterface is the base interface for the EC algorithm's private and public key implementations.TheECPrivateKeyinterface is used to generate signatures on data using the ECDSA (Elliptic Curve Digital Signature Algorithm) and to generate shared secrets using the ECDH (Elliptic Curve Diffie-Hellman) algorithm.TheECPublicKeyinterface is used to verify signatures on signed data using the ECDSA algorithm and to generate shared secrets using the ECDH algorithm.GenericSecretKeycontains sensitive data value.HMACKeycontains a key for HMAC operations.TheInitializedMessageDigestclass is a subclass of the base classMessageDigest.TheOneShotclass is a specialization of theInitializedMessageDigestclass intended to support efficient one-shot hash operations that may avoid persistent memory writes entirely.TheKeyinterface is the base interface for all keys.TheKeyAgreementclass is the base class for key agreement algorithms such as Diffie-Hellman and EC Diffie-Hellman [IEEE P1363].TheKeyBuilderclass is a key object factory.This class is a container for a key pair (a public key and a private key).KoreanSEEDKeycontains an 16-byte key for Korean Seed Algorithm operations.TheMessageDigestclass is the base class for hashing algorithms.TheOneShotclass is a specialization of theMessageDigestclass intended to support efficient one-shot hash operations that may avoid persistent memory writes entirely.This class is used to specify any algorithm parameters that are determined by a standard name.ThePrimalityTestParamSpecinterface can be used for key pair generation (e.g RSA) for configuring the primality test algorithm.ThePrivateKeyinterface is the base interface for private keys used in asymmetric algorithms.ThePublicKeyinterface is the base interface for public keys used in asymmetric algorithms.TheRandomDataabstract class is the base class for random number generation.TheOneShotclass is a specialization of theRandomDataclass intended to support efficient one-shot random data generation operations that may avoid persistent memory writes entirely.TheRSAPrivateCrtKeyinterface is used to sign data using the RSA algorithm in its Chinese Remainder Theorem form.TheRSAPrivateKeyclass is used to sign data using the RSA algorithm in its modulus/exponent form.TheRSAPublicKeyis used to verify signatures on signed data using the RSA algorithm.TheSecretKeyclass is the base interface for keys used in symmetric algorithms (DES, for example).TheSignatureclass is the base class for Signature algorithms.TheOneShotclass is a specialization of theSignatureclass intended to support efficient one-shot signing and verification operations that may avoid persistent memory writes entirely.A subclass of the abstractSignatureclass must implement thisSignatureMessageRecoveryinterface to provide message recovery functionality.TheSM2KeyAgreementParameterSpecinterface can be used for KeyAgreement operation as defined in the GM/T 0003.3-2012 (Public Key Cryptographic Algorithm SM2 Based on Elliptic Curves Part 3: Key Exchange Protocol).SM4Keycontains a 128-bit key for SM4 computations.TheXECKeyinterface is the base interface for all EC keys used for named curves with predefined parameters and encoding.TheXECPrivateKeyinterface is the base interface for EC private keys for named curves with predefined parameters.TheXECPublicKeyinterface is the base interface for EC public keys for named curves with predefined parameters.