AI_RC2_CBCPad

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:

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 8 2

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 192
Image 192
RSA Security 5 manual AIRC2CBCPad, Pointer to an ARC2CBCPARAMS structure