AI_RC6_CBCPad
204 RSA BSAFE Crypto-C Library Reference Manual
AI_RC6_CBCPad
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. This
algorithm pads, so the total number of input bytes does not have to be a multiple of 16
bytes.
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:
Note: Although one of the parameters is 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.
typedef struct {
unsigned int rounds; /* number of rounds (20) */
unsigned char *iv; /* initialization vector (16 bytes) */
} A_RC6_CBC_PARAMS;