RSA BSAFE Crypto-C

Cryptographic Components for C

Search

AI_RC4_BER

Parses and creates ASN.1 AIs such as those used in PKCS #7 and other protocols. Call B_SetAlgorithmInfo() to initialize an algorithm object from the encoded AI. Call B_GetAlgorithmInfo() with this AI to create an encoded AI from an algorithm object created using AI_RC4 or AI_RC4_BER.

This AI is similar to AI_RC4 except that it uses the ASN.1 BER format.

The OID for this algorithm, excluding the tag and length Bytes, in decimal is 42, 134, 72, 134, 247, 13, 3, 4.

info Format

B_SetAlgorithmInfo() A pointer to ITEM that gives the address and length of the BER-encoded AI. The encoding is converted to DER before it is copied to the algorithm object.
B_SetAlgorithmInfo() returns BE_WRONG_ALGORITHM_INFO if the AI specifies an algorithm other than RC4.
B_GetAlgorithmInfo() A pointer to ITEM that gives the address and length of the DER-encoded AI.

AI_RC4_BER Information

Functions to use B_EncryptInit(), B_EncryptUpdate(), B_EncryptFinal(), B_DecryptInit(), B_DecryptUpdate(), B_DecryptFinal(), B_SetAlgorithmState() and B_GetAlgorithmState().
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, call B_EncryptInit() and supply a new key.

AMs to include AM_RC4_ENCRYPT for encryption and AM_RC4_DECRYPT for decryption.
KIs for keyObject in B_EncryptInit() or B_DecryptInit() KI_Item that gives the address and length of the RC4 key.
Compatible representation AI_RC4.


Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 068-001001-6210-001-000 - 6.2.1