Algorithms in Crypto-C

Information Formats Provided by Crypto-C

There are four types of AIs in Crypto-C. These AIs differ in the format in which they provide information:

Basic algorithm info types provide information in Crypto-C’s internal format.

BER-based algorithm info types provide information in a format that complies with Open Systems Interconnection’s Basic Encoding Rules.

PEM-based algorithm info types provide information in a format that complies with the Privacy Enhanced Mail draft standard.

BSAFE1 algorithm info types provide information in a format that is backward- compatible with BSAFE 1.x.

Basic Algorithm Info Types

The basic algorithm is used to start a new process because its info (the accompanying information specific to the AI) is the simplest to format.

BER-Based Algorithm Info Types

BER-based algorithms are algorithms that comply with Basic Encoding Rules, as defined in ANSI X.690. BER-based algorithms are necessary because the format of the info in a basic AI is not standard. Much of the data in cryptography is passed between two or more individuals. Not every cryptographic application uses Crypto-C, and other packages may not organize the necessary information the same way. When one person needs to tell another person which algorithm was used to encrypt, for instance, there needs to be a standard way to present the information. The standard description of information is known as Basic Encoding Rules, or BER, which is a product of Open Systems Interconnection and is defined in ANSI X.690.

BER-based algorithms end with the letters BER. Such AIs will read in or output information according to the BER.

Unfortunately, BER is often complicated, and it is difficult to determine the proper BER encoding without a translator. Therefore, it is simpler to use B_SetAlgorithmInfo to define algorithm objects with the basic algorithm AI, get the information in BER format using B_GetAlgorithmInfo, and send the BER-encoding to those who need the information. The recipient will translate the BER information into something they can understand.

When a Crypto-C application receives information in BER format, it can set using the BER AI and build an algorithm object to match that information.

1 0 2

R S A B S A F E C r y p t o - C D e v e l o p e r ’s G u i d e

Page 124
Image 124
RSA Security 5.2.2 Information Formats Provided by Crypto-C, Basic Algorithm Info Types, BER-Based Algorithm Info Types