A SERVICE OF

logo

AI_RC4
188 RSA BSAFE Crypto-C Library Reference Manual
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 keyObjec t in B_EncryptInit or B_DecryptInit:
KI_Item that gives the address and length of the RC4 key.