There are several types of add-ins for CDSA, each supporting
a different security task:
On OpenVMS, service providers are implemented as sharable
images.
Cryptographic
Service Providers (CSPs)
The Cryptographic Service Providers (CSPs) are add-in modules
to the Common Security Services Manager (CSSM). CSPs perform cryptographic
operations and securely store cryptographic keys for the applications that
call them through the CSSM API. A CSP can be in the form of software,
hardware, or both.
Applications call these CSPs to provide authentication, data
integrity, data and communication privacy, and nonrepudiation of
messages to users.
CSPs implement the following cryptographic algorithms, among
others, in one or more modes:
Bulk encryption
algorithm in modes AES, DES, Triple DES, DESX, RC2, RC4, and RC5
Digital signature algorithm
in modes RSA and DSS
Key negotiation algorithm
in modes Diffie-Hellman and DSA
Cryptographic hash algorithm
in modes MD4, MD5, and SHA1
CSPs also provide the following services:
Unique identification
number: hard coded or random generated
Random number generator:
attended and unattended
Encrypted data: symmetric
keys and private keys
Custom facilities unique
to the CSP
The CSP module manager administers the CSPs that are installed
on the local system. It defines a common API to access all of
the Cryptographic Service Providers that can be attached and used
by any caller in the system.
The specific security services API functions that are defined
by the CSP module manager include the following service categories:
SignData |
VerifyData |
DigestData |
EncryptData |
DecryptData |
GenerateKeyPair |
GenerateRandom |
WrapKey |
UnwrapKey |
CDSA on OpenVMS provides CSPs based on OpenSSL and RSA BSAFE:
OpenSSL CSP
Message
authentication based on MD5 and SHA1
Symmetric encryption based
on DES, Triple DES, and AES
RSA BSAFE CSP
Message
authentication based on MD5 and SHA1
Symmetric encryption based
on DES, triple DES, DESX, and RC2, RC4, and RC5.
Asymmetric encryption based
on RSA, DSA, and Diffie-Hellman
The following sections discuss these topics:
An application establishes a session to select a particular
CSP. Once attached, the application can initiate a cryptographic
login session with the CSP. The application requests additional credentials,
such as a passphrase or PIN, to gain access to specific keys and
services managed by the CSP.
Within a module attach session or a cryptographic login session,
an application creates, uses, and discards cryptographic contexts.
A cryptographic context carries the parameters required to perform
a cryptographic service. The cryptographic context can be used for
the following:
A one-step
cryptographic operation in which only one call is needed to obtain
the result.
A cryptographic session of
a multistaged cryptographic service, in which an initialization
call is followed by one or more update calls, ending with a completion
(final) call. For most cryptographic operations, the result is available
after îthe final function completes its execution. An exception is
staged encryption/decryption, in which each update call generates
a portion of the result.
Depending on the class of cryptographic operations, individualized
attributes are available for the cryptographic context. In addition
to specifying an algorithm when creating the context, the application
can also initialize a session key, pass an initialization vector,
or pass padding information to complete the description of the session.
A successful return value from the create function indicates that
the desired CSP is available.
Functions are also provided to manage the created context.
The cryptographic context contains most or all of the input parameters
required for an operation. Some cryptographic service functions
accept input parameters in addition to the CSP handle and the context
handle. These input parameters always take precedence over any duplicate
or conflicting parameters in the cryptographic context. When a context
is no longer required, the application calls a DeleteContext function.
Resources allocated for that context can then be reclaimed by the
operating system.
Defining
a Security Context
The application's associated security context defines parameter
values for the low-level variables that control the details of cryptographic
operations. For example, an application issuing a request to the
EncryptData call can reference a security context that defines the
following parameters:
The algorithm
to be used (such as DES)
Algorithm-specific parameters
(such as key length)
The object on which the
operation is conducted (such as a set of buffers)
The cryptographic variables
(such as the key)
Most applications use predefined, default contexts. Typically,
a distinct context is used for encrypting, hashing, and signing.
For an initialized application, these contexts change little, if
at all, during the application's execution or between executions.
This allows the application developer to implement security by manipulating
certificates, using previously defined security contexts, and maintaining
a high-level view of security operations.
In CDSA, there are two main types of cryptographic algorithms
that use keys:
Asymmetric
algorithms use one key to encrypt and a second key to
decrypt. They are often called public-key algorithms. One key is
called the public key and the other is called the private key or
secret key. RSA (Rivest-Shamir-Adelman) is the most commonly used
public-key algorithm. It can be used for encryption and for signing.
Symmetric algorithms use
a single secret key for encryption and decryption. Both the sender
and receiver must know the secret key. Well-known symmetric functions
include DES (Data Encryption Standard) and IDEA. DES was endorsed
by the U.S. Government as a standard in 1977. It's an encryption block
cipher that operates on 64-bit blocks with a 56-bit key. It is designed
to be implemented in hardware, and works well for bulk encryption.
IDEA (International Data Encryption Algorithm) uses a 128-bit key.
Every CSP implements its own secure, persistent storage and
management of private keys. To support chains of trust across application
domains, CSPs support importing and exporting of public and private
keys among remote and possibly foreign systems. To transfer keys,
the CSP must be able to convert one key format into any other key
format and to secure the transfer of private and symmetric keys.
Each CSP is responsible for securely storing the private keys
it generates or imports from other sources. Additional storage-related
operations include retrieving a private key when given its corresponding
public key and wrapping private keys as key blobs for secure exportation
to other systems.
On an OpenVMS Alpha system, the CSP stores private key files
in EAYCSP.PRI and MAF_BSAFE.PRI. The protections on the key files
are OWNER:READ,WRITE,DELETE. The key files are user-specific and
are stored in the [.CDSA.PKD] subdirectory in the user's login directory.
Public Key Infrastructure (PKI)
The Public Key Infrastructure (PKI) is the state-of-the-art
method, ultimately to be applied worldwide, for secure and confidential
electronic transactions. It employs public and private keys.
The two PKI algorithms in widespread use are: