Java Reference
In-Depth Information
APPLICATION
MD5 MessageDigest
from Provider WE45
MessageDigest . getInstance(“MD5”, “WE45”)
PROVIDER FRAMEWORK
Message
Digest
MD5
SHA-512
Message
Digest
MD5
SHA-1
Message
Digest
MD5
SHA-256
Provider Y
Provider X
Provider WE45
Figure 8.12
Request for the MD5 hashing algorithm function from provider We45.
8.3.5.1 The Provider and Security Classes
he java.security.Provider is the base class for all security providers. Each CSP contains
an instance of this class that contains the provider's name and lists all of the security services/
algorithms it implements. he Provider class of the JCA has been designed in such a way that
several types of services that can be implemented by provider packages, based on this class. his
class represents a “provider” for the Java Security API, where a provider implements some or all
parts of Java Security. A subset of services that a provider may implement includes the following:
Key generation, conversion, and management facilities
Algorithms (such as DSA, MD5, RSA, or SHA-1)
Each provider, in his implementation, provides a name and a version number and is conigured to
provide services in each runtime it is installed in. When an instance of a particular algorithm is
needed, the JCA framework consults the provider's database, and if a suitable match is found, the
instance is created. Table 8.1 presents an overview of the Provider class and its functionality.
he Security class manages installed providers and security-wide properties. It only contains
static methods and is never instantiated. he methods for adding or removing providers and for
setting security properties can only be executed by a trusted program. Table 8.2 provides an over-
view of the Security class.
8.3.5.2 Engine Classes and Algorithms
An engine class in JCA (or JCE) is designed to provide the interface to a speciic type of cryp-
tographic service that is independent of a particular cryptographic algorithm or provider. he
engines provide one of the following:
Search WWH ::




Custom Search