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

NAME

6       RC4_set_key, RC4 - RC4 encryption
7

SYNOPSIS

9        #include <openssl/rc4.h>
10
11       The following functions have been deprecated since OpenSSL 3.0, and can
12       be hidden entirely by defining OPENSSL_API_COMPAT with a suitable
13       version value, see openssl_user_macros(7):
14
15        void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
16
17        void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
18                 unsigned char *outdata);
19

DESCRIPTION

21       All of the functions described on this page are deprecated.
22       Applications should instead use EVP_EncryptInit_ex(3),
23       EVP_EncryptUpdate(3) and EVP_EncryptFinal_ex(3) or the equivalently
24       named decrypt functions.
25
26       This library implements the Alleged RC4 cipher, which is described for
27       example in Applied Cryptography.  It is believed to be compatible with
28       RC4[TM], a proprietary cipher of RSA Security Inc.
29
30       RC4 is a stream cipher with variable key length.  Typically, 128 bit
31       (16 byte) keys are used for strong encryption, but shorter insecure key
32       sizes have been widely used due to export restrictions.
33
34       RC4 consists of a key setup phase and the actual encryption or
35       decryption phase.
36
37       RC4_set_key() sets up the RC4_KEY key using the len bytes long key at
38       data.
39
40       RC4() encrypts or decrypts the len bytes of data at indata using key
41       and places the result at outdata.  Repeated RC4() calls with the same
42       key yield a continuous key stream.
43
44       Since RC4 is a stream cipher (the input is XORed with a pseudo-random
45       key stream to produce the output), decryption uses the same function
46       calls as encryption.
47

RETURN VALUES

49       RC4_set_key() and RC4() do not return values.
50

NOTE

52       Applications should use the higher level functions EVP_EncryptInit(3)
53       etc. instead of calling these functions directly.
54
55       It is difficult to securely use stream ciphers. For example, do not
56       perform multiple encryptions using the same key stream.
57

SEE ALSO

59       EVP_EncryptInit(3)
60

HISTORY

62       All of these functions were deprecated in OpenSSL 3.0.
63
65       Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
66
67       Licensed under the Apache License 2.0 (the "License").  You may not use
68       this file except in compliance with the License.  You can obtain a copy
69       in the file LICENSE in the source distribution or at
70       <https://www.openssl.org/source/license.html>.
71
72
73
743.0.5                             2022-11-01                RC4_SET_KEY(3ossl)
Impressum