A SERVICE OF

logo

AI_RC6_CBC
202 RSA BSAFE Crypto-C Library Reference Manual
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:
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.
typedef struct {
unsigned int rounds; /* number of rounds (20) */
unsigned char *iv;
/* initialization vector (16 bytes) */
} A_RC6_CBC_PARAMS;