CRYPTO_RC4FastInit

Syntax

#include <nitro/crypto.h>

void CRYPTO_RC4FastInit(CRYPTORC4FastContext* context, const void* key, u32 key_len);

Arguments

context Specifies the context structure where the RC4 key information and so on is kept.
key Pointer to the byte sequence for the encryption/decryption key used with the RC4 algorithm.
key_len Length of the key specified by key. The length of the key must be 16 bytes or less; longer lengths are truncated to 16 bytes.

Return Values

None.

Description

Initializes the RC4 algorithm encryption structures and sets the encryption/decryption key.

This function is called internally when performing operations with CRYPTO_RC4Fast, so it does not need to be called.

The CRYPTO_RC4* and CRYPTO_RC4Fast* functions are the same except that the CRYPTO_RC4Fast* functions are faster and require more stack memory. The CRYPTORC4Context structure used by the CRYPTO_RC4* functions is 260 bytes, and the CRYPTORC4FastContext structure used by the CRYPTO_RC4Fast* functions is 1032 bytes.
With regard to speed, CRYPTO_RC4FastEncrypt processes data at approximately 1.5 times the normal processing speed when the data is sufficiently large in size.

See Also

CRYPTO_RC4FastEncrypt
CRYPTO_RC4Fast
CRYPTO_RC4Init

Revision History

2008/02/25 Initial version.


CONFIDENTIAL