openssl-prebuild/linux_amd64/ssl/share/doc/openssl/html/man3/RC4_set_key.html
2020-03-02 16:50:34 +00:00

112 lines
3.8 KiB
HTML
Executable File

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>RC4_set_key</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body style="background-color: white">
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#return_values">RETURN VALUES</a></li>
<li><a href="#note">NOTE</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#history">HISTORY</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
</ul>
<hr name="index" />
</div>
<!-- INDEX END -->
<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<p>RC4_set_key, RC4 - RC4 encryption</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
#include &lt;openssl/rc4.h&gt;</pre>
<p>Deprecated since OpenSSL 3.0, can be hidden entirely by defining
<strong>OPENSSL_API_COMPAT</strong> with a suitable version value, see
<em>openssl_user_macros(7)</em>:</p>
<pre>
void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);</pre>
<pre>
void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
unsigned char *outdata);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>All of the functions described on this page are deprecated. Applications should
instead use <em>EVP_EncryptInit_ex(3)</em>, <em>EVP_EncryptUpdate(3)</em> and
<em>EVP_EncryptFinal_ex(3)</em> or the equivalently named decrypt functions.</p>
<p>This library implements the Alleged RC4 cipher, which is described for
example in <em>Applied Cryptography</em>. It is believed to be compatible
with RC4[TM], a proprietary cipher of RSA Security Inc.</p>
<p>RC4 is a stream cipher with variable key length. Typically, 128 bit
(16 byte) keys are used for strong encryption, but shorter insecure
key sizes have been widely used due to export restrictions.</p>
<p>RC4 consists of a key setup phase and the actual encryption or
decryption phase.</p>
<p>RC4_set_key() sets up the <strong>RC4_KEY</strong> <strong>key</strong> using the <strong>len</strong> bytes long
key at <strong>data</strong>.</p>
<p>RC4() encrypts or decrypts the <strong>len</strong> bytes of data at <strong>indata</strong> using
<strong>key</strong> and places the result at <strong>outdata</strong>. Repeated RC4() calls with
the same <strong>key</strong> yield a continuous key stream.</p>
<p>Since RC4 is a stream cipher (the input is XORed with a pseudo-random
key stream to produce the output), decryption uses the same function
calls as encryption.</p>
<p>
</p>
<hr />
<h1><a name="return_values">RETURN VALUES</a></h1>
<p>RC4_set_key() and RC4() do not return values.</p>
<p>
</p>
<hr />
<h1><a name="note">NOTE</a></h1>
<p>Applications should use the higher level functions
<em>EVP_EncryptInit(3)</em> etc. instead of calling these
functions directly.</p>
<p>It is difficult to securely use stream ciphers. For example, do not perform
multiple encryptions using the same key stream.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><em>EVP_EncryptInit(3)</em></p>
<p>
</p>
<hr />
<h1><a name="history">HISTORY</a></h1>
<p>All of these functions were deprecated in OpenSSL 3.0.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.</p>
<p>Licensed under the Apache License 2.0 (the &quot;License&quot;). You may not use
this file except in compliance with the License. You can obtain a copy
in the file LICENSE in the source distribution or at
<a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
</body>
</html>