AI_RC5_CBCPad

AI_RC5_CBCPad

Purpose:

This AI allows you to perform RC5 encryption or decryption in CBC mode with an 8- byte initialization vector and a variable number of rounds, as defined in RFC 2040. This algorithms pads, so the input data does not have to be a multiple of 8 bytes.

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_RC2_CBCPad.

Type of information this allows you to use:

a version number, a rounds count, a word size, and an 8-byte initialization vector for the RC5 32/r/b CBC encryption algorithm.

Note: To implement the RC5 cipher with a word size other than 32 bits, use AI_FeedbackCipher.

Format of info supplied to B_SetAlgorithmInfo:

pointer to an A_RC5_CBC_PARAMS structure:

typedef struct {

 

 

unsigned int

version;

/* currently 1.0 defined 0x10 */

unsigned int

rounds;

/* number of rounds (0 - 255) */

unsigned int

wordSizeInBits;

/* AI_RC5_CBCPad requires 32 */

unsigned char *iv;

/* initialization vector (8 bytes) */

} A_RC5_CBC_PARAMS;

 

 

 

 

Format of info returned by B_GetAlgorithmInfo:

pointer to an A_RC5_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 9 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 208
Image 208
RSA Security manual AIRC5CBCPad