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
)
-
Interface Summary Interface Description AESKey AESKey
contains a 16/24/32 byte key for AES computations based on the Rijndael algorithm.AlgorithmParameterSpec A (transparent) specification of cryptographic parameters.DESKey DESKey
contains an 8/16/24-byte key for single/2 key triple DES/3 key triple DES operations.DHKey TheDHKey
interface is the base interface for the DH algorithm's private and public key implementations.DHPrivateKey TheDHPrivateKey
interface is used to sign data using the DH algorithm.DHPublicKey TheDHPublicKey
interface is used to verify signatures on signed data using the DH algorithm.DSAKey TheDSAKey
interface is the base interface for the DSA algorithm's private and public key implementations.DSAPrivateKey TheDSAPrivateKey
interface is used to sign data using the DSA algorithm.DSAPublicKey TheDSAPublicKey
interface is used to verify signatures on signed data using the DSA algorithm.ECKey TheECKey
interface is the base interface for the EC algorithm's private and public key implementations.ECPrivateKey TheECPrivateKey
interface 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.ECPublicKey TheECPublicKey
interface is used to verify signatures on signed data using the ECDSA algorithm and to generate shared secrets using the ECDH algorithm.GenericSecretKey GenericSecretKey
contains sensitive data value.HMACKey HMACKey
contains a key for HMAC operations.Key TheKey
interface is the base interface for all keys.KoreanSEEDKey KoreanSEEDKey
contains an 16-byte key for Korean Seed Algorithm operations.PrimalityTestParamSpec ThePrimalityTestParamSpec
interface can be used for key pair generation (e.g RSA) for configuring the primality test algorithm.PrivateKey ThePrivateKey
interface is the base interface for private keys used in asymmetric algorithms.PublicKey ThePublicKey
interface is the base interface for public keys used in asymmetric algorithms.RSAPrivateCrtKey TheRSAPrivateCrtKey
interface is used to sign data using the RSA algorithm in its Chinese Remainder Theorem form.RSAPrivateKey TheRSAPrivateKey
class is used to sign data using the RSA algorithm in its modulus/exponent form.RSAPublicKey TheRSAPublicKey
is used to verify signatures on signed data using the RSA algorithm.SecretKey TheSecretKey
class is the base interface for keys used in symmetric algorithms (DES, for example).SignatureMessageRecovery A subclass of the abstractSignature
class must implement thisSignatureMessageRecovery
interface to provide message recovery functionality.SM4Key SM4Key
contains a 128-bit key for SM4 computations.XECKey TheXECKey
interface is the base interface for all EC keys used for named curves with predefined parameters and encoding.XECPrivateKey TheXECPrivateKey
interface is the base interface for EC private keys for named curves with predefined parameters.XECPublicKey TheXECPublicKey
interface is the base interface for EC public keys for named curves with predefined parameters. -
Class Summary Class Description Checksum TheChecksum
class is the base class for CRC (cyclic redundancy check) checksum algorithms.InitializedMessageDigest TheInitializedMessageDigest
class is a subclass of the base classMessageDigest
.InitializedMessageDigest.OneShot TheOneShot
class is a specialization of theInitializedMessageDigest
class intended to support efficient one-shot hash operations that may avoid persistent memory writes entirely.KeyAgreement TheKeyAgreement
class is the base class for key agreement algorithms such as Diffie-Hellman and EC Diffie-Hellman [IEEE P1363].KeyBuilder TheKeyBuilder
class is a key object factory.KeyPair This class is a container for a key pair (a public key and a private key).MessageDigest TheMessageDigest
class is the base class for hashing algorithms.MessageDigest.OneShot TheOneShot
class is a specialization of theMessageDigest
class intended to support efficient one-shot hash operations that may avoid persistent memory writes entirely.NamedParameterSpec This class is used to specify any algorithm parameters that are determined by a standard name.RandomData TheRandomData
abstract class is the base class for random number generation.RandomData.OneShot TheOneShot
class is a specialization of theRandomData
class intended to support efficient one-shot random data generation operations that may avoid persistent memory writes entirely.Signature TheSignature
class is the base class for Signature algorithms.Signature.OneShot TheOneShot
class is a specialization of theSignature
class intended to support efficient one-shot signing and verification operations that may avoid persistent memory writes entirely. -
Exception Summary Exception Description CryptoException CryptoException
represents a cryptography-related exception.