Concept Classes

The java.security and javax.crypto packages have classes and interfaces that represent the cryptographic concepts that were introduced in Chapter 2. Table 3.2 summarizes the cryptographic concepts represented in the classes included in JDK 1.2 and JCE 1.2.

Table 3-2. Cryptographic Concept Classes

Class or Interface

Description

java.security.cert.Certificate

A cryptographic certificate

javax.crypto.Cipher

A cipher

java.security.Key ,java.security.PrivateKey ,java.security.PublicKey ,javax.crypto.SecretKey

A key, used for signing or encryption

javax.crypto.KeyAgreement

A secret key exchange protocol

java.security.KeyFactory

Translates public and private keys from one format to another

javax.crypto.KeyGenerator

Creates keys for symmetric ciphers

java.security.KeyPairGenerator

Creates pairs of public and private keys for signing or encryption

javax.crypto.Mac

A Message Authentication Code (MAC)

java.security.MessageDigest

A cryptographic hash function

javax.crypto.SecretKeyFactory

Translates secret keys from one format to another

java.security.SecureRandom

A cryptographically strong random number engine

java.security.Signature

A digital signature

Get Java Cryptography now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.