5 RC4_set_key, RC4 - RC4 encryption
9 #include <openssl/rc4.h>
11 void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
13 void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
14 unsigned char *outdata);
18 This library implements the Alleged RC4 cipher, which is described for
19 example in I<Applied Cryptography>. It is believed to be compatible
20 with RC4[TM], a proprietary cipher of RSA Security Inc.
22 RC4 is a stream cipher with variable key length. Typically, 128 bit
23 (16 byte) keys are used for strong encryption, but shorter insecure
24 key sizes have been widely used due to export restrictions.
26 RC4 consists of a key setup phase and the actual encryption or
29 RC4_set_key() sets up the B<RC4_KEY> B<key> using the B<len> bytes long
32 RC4() encrypts or decrypts the B<len> bytes of data at B<indata> using
33 B<key> and places the result at B<outdata>. Repeated RC4() calls with
34 the same B<key> yield a continuous key stream.
36 Since RC4 is a stream cipher (the input is XORed with a pseudo-random
37 key stream to produce the output), decryption uses the same function
42 RC4_set_key() and RC4() do not return values.
46 Applications should use the higher level functions
47 L<EVP_EncryptInit(3)> etc. instead of calling these
50 It is difficult to securely use stream ciphers. For example, do not perform
51 multiple encryptions using the same key stream.
59 Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
61 Licensed under the Apache License 2.0 (the "License"). You may not use
62 this file except in compliance with the License. You can obtain a copy
63 in the file LICENSE in the source distribution or at
64 L<https://www.openssl.org/source/license.html>.