A SERVICE OF

logo

AI_RC2_CBCPad
182 RSA BSAFE Crypto-C Library Reference Manual
AI_RC2_CBCPad
Purpose:
This AI allows you to perform RC2 encryption or decryption in CBC mode with an 8-
byte initialization vector. This algorithms pads as described in PKCS #5, so the input
data does not have to be a multiple of 8 bytes. RC2 is a variable-key-size block cipher
which means that the key can be anywhere between 1 and 128 bytes. The larger the
key, the greater the security. RC2 is described in RFC 2268, and CBC mode is similar
to the one described in RFC 2040.
Other algorithms that can be used for encryption/decryption in CBC mode with
padding are
AI_DES_CBCPadIV8, AI_DES_EDE3_CBCPadIV8, AI_DESX_CBCPadIV8, and
AI_RC5_CBCPad.
Type of information this allows you to use:
an 8-byte initialization vector and effective key size for the RC2-CBC With Padding
encryption algorithm.
Format of info supplied to B_SetAlgorithmInfo:
pointer to an A_RC2_CBC_PARAMS structure:
Format of info returned by B_GetAlgorithmInfo:
pointer to an A_RC2_CBC_PARAMS structure (see above).
Crypto-C procedures to use with algorithm object:
B_EncryptInit, B_EncryptUpdate, B_EncryptFinal, B_DecryptInit,
B_DecryptUpdate, and B_DecryptFinal. You may pass (B_ALGORITHM_OBJ)NULL_PTR
for all
randomAlgorithm
arguments.
typedef struct {
unsigned int effectiveKeyBits; /* effective key size in bits */
unsigned char *iv; * initialization vector */
} A_RC2_CBC_PAR AMS;