1RC4_SET_KEY(3)                      OpenSSL                     RC4_SET_KEY(3)
2
3
4

NAME

6       RC4_set_key, RC4 - RC4 encryption
7

SYNOPSIS

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

DESCRIPTION

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
26       decryption 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

RETURN VALUES

40       RC4_set_key() and RC4() do not return values.
41

NOTE

43       Applications should use the higher level functions EVP_EncryptInit(3)
44       etc. instead of calling these functions directly.
45
46       It is difficult to securely use stream ciphers. For example, do not
47       perform multiple encryptions using the same key stream.
48

SEE ALSO

50       EVP_EncryptInit(3)
51
53       Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
54
55       Licensed under the OpenSSL license (the "License").  You may not use
56       this file except in compliance with the License.  You can obtain a copy
57       in the file LICENSE in the source distribution or at
58       <https://www.openssl.org/source/license.html>.
59
60
61
621.1.1k                            2021-03-26                    RC4_SET_KEY(3)
Impressum