AI_RC4

AI_RC4

Purpose:

This AI allows you to perform RC4 encryption and decryption. The description of the RC4 stream cipher can be found in B. Schneier's book Applied Cryptography. Because it is a stream cipher, there are no restrictions on the length of input data. A similar algorithm that allows you to authenticate the encrypted data is AI_RC4WithMAC.

Type of information this allows you to use:

the RC4 encryption algorithm.

Format of info supplied to B_SetAlgorithmInfo:

NULL_PTR.

Format of info returned by B_GetAlgorithmInfo:

NULL_PTR.

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.

Due to the nature of the RC4 algorithm, security is compromised if multiple data blocks are encrypted with the same RC4 key. Therefore, B_EncryptUpdate cannot be called after B_EncryptFinal. To begin an encryption operation for a new data block, you must call B_EncryptInit and supply a new key.

Algorithm methods to include in application’s algorithm chooser:

AM_RC4_ENCRYPT for encryption and AM_RC4_DECRYPT for decryption.

Key info types for keyObject in B_EncryptInit or B_DecryptInit:

KI_Item that gives the address and length of the RC4 key.

1 8 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 198
Image 198
RSA Security 5 manual AIRC4, RC4 encryption algorithm, AMRC4ENCRYPT for encryption and AMRC4DECRYPT for decryption