1rc4(3) OpenSSL rc4(3)
2
3
4
6 RC4_set_key, RC4 - RC4 encryption
7
9 #include <openssl/rc4.h>
10
11 void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
12
13 void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
14 unsigned char *outdata);
15
17 This library implements the Alleged RC4 cipher, which is described for
18 example in Applied Cryptography. It is believed to be compatible with
19 RC4[TM], a proprietary cipher of RSA Security Inc.
20
21 RC4 is a stream cipher with variable key length. Typically, 128 bit
22 (16 byte) keys are used for strong encryption, but shorter insecure key
23 sizes have been widely used due to export restrictions.
24
25 RC4 consists of a key setup phase and the actual encryption or decryp‐
26 tion phase.
27
28 RC4_set_key() sets up the RC4_KEY key using the len bytes long key at
29 data.
30
31 RC4() encrypts or decrypts the len bytes of data at indata using key
32 and places the result at outdata. Repeated RC4() calls with the same
33 key yield a continuous key stream.
34
35 Since RC4 is a stream cipher (the input is XORed with a pseudo-random
36 key stream to produce the output), decryption uses the same function
37 calls as encryption.
38
39 Applications should use the higher level functions EVP_EncryptInit(3)
40 etc. instead of calling the RC4 functions directly.
41
43 RC4_set_key() and RC4() do not return values.
44
46 Certain conditions have to be observed to securely use stream ciphers.
47 It is not permissible to perform multiple encryptions using the same
48 key stream.
49
51 blowfish(3), des(3), rc2(3)
52
54 RC4_set_key() and RC4() are available in all versions of SSLeay and
55 OpenSSL.
56
57
58
590.9.8b 2000-02-25 rc4(3)