AI_RC6_CBC

AI_RC6_CBC

Purpose:

This AI allows you to perform RC6 encryption and decryption in CBC mode with a 16-byte initialization vector and 20 rounds, as defined in the AES submission. Since AI_RC6_CBC does not pad, the total number of input bytes must be a multiple of 16 bytes. See AI_RC6_CBCPad for the same algorithm with padding.

Type of information this allows you to use:

a rounds count (currently only 20 is a valid round count), and a 16-byte initialization vector for the RC6 CBC encryption algorithm.

Format of info supplied to B_SetAlgorithmInfo:

pointer to an A_RC6_CBC_PARAMS structure:

typedef struct

{

 

unsigned int

rounds;

/* number of rounds (20) */

unsigned char *iv;

/* initialization vector (16 bytes) */

} A_RC6_CBC_PARAMS;

 

 

 

 

Note: Although one of the parameters is the number of rounds, Crypto-C currently accepts only 20. Future versions may accept other round counts.

Format of info returned by B_GetAlgorithmInfo:

pointer to an A_RC6_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.

Algorithm methods to include in application’s algorithm chooser:

AM_RC6_CBC_ENCRYPT for encryption and AM_RC6_CBC_DECRYPT for decryption.

2 0 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 212
Image 212
RSA Security 5 manual AIRC6CBC, Pointer to an ARC6CBCPARAMS structure see above