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 AESKeycontains a 16/24/32 byte key for AES computations based on the Rijndael algorithm.AlgorithmParameterSpec A (transparent) specification of cryptographic parameters.DESKey DESKeycontains an 8/16/24-byte key for single/2 key triple DES/3 key triple DES operations.DHKey TheDHKeyinterface is the base interface for the DH algorithm's private and public key implementations.DHPrivateKey TheDHPrivateKeyinterface is used to sign data using the DH algorithm.DHPublicKey TheDHPublicKeyinterface is used to verify signatures on signed data using the DH algorithm.DSAKey TheDSAKeyinterface is the base interface for the DSA algorithm's private and public key implementations.DSAPrivateKey TheDSAPrivateKeyinterface is used to sign data using the DSA algorithm.DSAPublicKey TheDSAPublicKeyinterface is used to verify signatures on signed data using the DSA algorithm.ECKey TheECKeyinterface is the base interface for the EC algorithm's private and public key implementations.ECPrivateKey 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.ECPublicKey TheECPublicKeyinterface is used to verify signatures on signed data using the ECDSA algorithm and to generate shared secrets using the ECDH algorithm.GenericSecretKey GenericSecretKeycontains sensitive data value.HMACKey HMACKeycontains a key for HMAC operations.Key TheKeyinterface is the base interface for all keys.KoreanSEEDKey KoreanSEEDKeycontains an 16-byte key for Korean Seed Algorithm operations.PrimalityTestParamSpec ThePrimalityTestParamSpecinterface can be used for key pair generation (e.g RSA) for configuring the primality test algorithm.PrivateKey ThePrivateKeyinterface is the base interface for private keys used in asymmetric algorithms.PublicKey ThePublicKeyinterface is the base interface for public keys used in asymmetric algorithms.RSAPrivateCrtKey TheRSAPrivateCrtKeyinterface is used to sign data using the RSA algorithm in its Chinese Remainder Theorem form.RSAPrivateKey TheRSAPrivateKeyclass is used to sign data using the RSA algorithm in its modulus/exponent form.RSAPublicKey TheRSAPublicKeyis used to verify signatures on signed data using the RSA algorithm.SecretKey TheSecretKeyclass is the base interface for keys used in symmetric algorithms (DES, for example).SignatureMessageRecovery A subclass of the abstractSignatureclass must implement thisSignatureMessageRecoveryinterface to provide message recovery functionality.SM2KeyAgreementParameterSpec 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).SM4Key SM4Keycontains a 128-bit key for SM4 computations.XECKey TheXECKeyinterface is the base interface for all EC keys used for named curves with predefined parameters and encoding.XECPrivateKey TheXECPrivateKeyinterface is the base interface for EC private keys for named curves with predefined parameters.XECPublicKey TheXECPublicKeyinterface is the base interface for EC public keys for named curves with predefined parameters. -
Class Summary Class Description Checksum TheChecksumclass is the base class for CRC (cyclic redundancy check) checksum algorithms.InitializedMessageDigest TheInitializedMessageDigestclass is a subclass of the base classMessageDigest.InitializedMessageDigest.OneShot TheOneShotclass is a specialization of theInitializedMessageDigestclass intended to support efficient one-shot hash operations that may avoid persistent memory writes entirely.KeyAgreement TheKeyAgreementclass is the base class for key agreement algorithms such as Diffie-Hellman and EC Diffie-Hellman [IEEE P1363].KeyBuilder TheKeyBuilderclass is a key object factory.KeyPair This class is a container for a key pair (a public key and a private key).MessageDigest TheMessageDigestclass is the base class for hashing algorithms.MessageDigest.OneShot TheOneShotclass is a specialization of theMessageDigestclass 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 TheRandomDataabstract class is the base class for random number generation.RandomData.OneShot TheOneShotclass is a specialization of theRandomDataclass intended to support efficient one-shot random data generation operations that may avoid persistent memory writes entirely.Signature TheSignatureclass is the base class for Signature algorithms.Signature.OneShot TheOneShotclass is a specialization of theSignatureclass intended to support efficient one-shot signing and verification operations that may avoid persistent memory writes entirely. -
Exception Summary Exception Description CryptoException CryptoExceptionrepresents a cryptography-related exception.