AI_RC2_CBC

AI_RC2_CBC

Purpose:

This AI allows you to perform RC2 encryption or decryption in CBC mode with an 8- byte initialization vector. During encryption, this algorithm does not pad the output. Thus, you must provide input that is a multiple of 8 bytes. See AI_RC2_CBCPad for the same algorithm with padding. 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 the CBC mode is similar to the one described in RFC 2040.

Other algorithms that can be used for encryption/decryption in CBC mode without padding are AI_DES_CBC_IV8, AI_DES_EDE3_CBC_IV8, AI_DESX_CBC_IV8, and AI_RC5_CBC.

Type of information this allows you to use:

an effective key size and an 8-byte initialization vector for the RC2-CBC encryption algorithm.

Format of info supplied to B_SetAlgorithmInfo:

pointer to an A_RC2_CBC_PARAMS structure:

typedef struct

{

 

unsigned int

effectiveKeyBits;

/* effective key size in bits */

unsigned char *iv;

/* initialization vector */

}A_RC2_CBC_PARAMS;

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.

1 7 8

R S A B S A F E C r y p t o - C L i b r a r y R e f e r e n c e M a n u a l

Page 188
Image 188
RSA Security 5 manual AIRC2CBC, Pointer to an ARC2CBCPARAMS structure see above